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

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 pyaaf>=1.7.0

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.

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.

None yet

1 participant