Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writer: Added pre- / post-transcribe hooks to facilitate media essence embedding #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timlehr
Copy link
Collaborator

@timlehr timlehr commented Mar 14, 2024

Link the Issue(s) this Pull Request is related to.

Requires #49

Requires change to OTIO core (for tests to pass):
AcademySoftwareFoundation/OpenTimelineIO#1711

Summarize your change.

This PR adds AAF adapter specific hooks that can be used to implement just-in-time transcoding of media for embedding purposes. It also adds the embed_essence argument to the write functionality, which will attempt to import media references. The new create_edgecode argument allows to control if an edge code should be applied to the AAF. Only .wav, .dnx and .aaf can be embedded. Thanks a lot @markreidvfx for your help with the embedding code.

New hooks introduced:

  • otio_aaf_pre_write_transcribe: useful for transcoding media for embedding
  • otio_aaf_post_write_transcribe: useful for cleaning up in-memory timeline / reverting to original media
  • otio_aaf_pre_read_transcribe: useful to modify AAF structure in-memory before read
  • otio_aaf_post_read_transcribe: useful to extract media from AAF file post timeline transcription

Reference associated tests.

Draft PR since I'm missing a test for .aaf embedding still

tests/test_aaf_adapter.py

@timlehr
Copy link
Collaborator Author

timlehr commented Mar 20, 2024

@markreidvfx I confirmed all but one of the tests producing valid results in Avid MC. However I can't get the audio import test test_transcribe_embed_wav_audio to produce results that MC can load. It errors out on import. Any chance you could have a look at this? Otherwise this PR is good for review now. :)

Screenshot 2024-03-19 at 16 42 26

@timlehr
Copy link
Collaborator Author

timlehr commented Mar 20, 2024

@reinecke @jminor After our discussion I reworked the code a little and it now offers both read and write hooks to facilitate embedding & extracting of media. I also added test coverage for all supported media types using snippets from Picchu.

@timlehr timlehr force-pushed the embed_hook_tlehr branch 2 times, most recently from 32f4364 to 00f482d Compare March 20, 2024 00:41
@timlehr timlehr changed the title Added pre- / post-transcribe hooks to facilitate media essence embedding Writer: Added pre- / post-transcribe hooks to facilitate media essence embedding Jul 20, 2024
@timlehr timlehr force-pushed the embed_hook_tlehr branch 4 times, most recently from b533738 to 8d18f5c Compare October 8, 2024 02:49
…e embedding

Signed-off-by: Tim Lehr <tim.lehr@disneyanimation.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant