OpenTimelineIO / otio-aaf-adapter

OpenTimelineIO Advanced Authoring Format (AAF) Adapter
Apache License 2.0
15 stars 6 forks source link

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

Open timlehr opened 3 months ago

timlehr commented 3 months ago

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

Requires pyaaf>=1.7.0

Requires change to OTIO core (for tests to pass): https://github.com/AcademySoftwareFoundation/OpenTimelineIO/pull/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:

Reference associated tests.

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

tests/test_aaf_adapter.py

timlehr commented 3 months ago

@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 commented 3 months ago

@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.