OpenTimelineIO / otio-aaf-adapter

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

Fix DaVinci Resolve compatibility and export NetworkLocators #9

Closed markreidvfx closed 6 months ago

markreidvfx commented 1 year ago

Fixes https://github.com/AcademySoftwareFoundation/OpenTimelineIO/issues/766

DaVinci Resolve requires top level composition mobs to have a primary timecode track. This is inline with the AAF Edit Protocol

6.3 Top-level Composition ... A top-level composition shall contain one or more timecode tracks and include a Primary timecode track. Timecode tracks shall use the MobSlot::PhysicalTrackNumber property to distinguish their type

This pull request also adds exporting of media references as NetworkLocators, which helps resolve find the media. There are still lots of caveats to getting Resolve to link to media and further testing is required.

Linking image sequences works, the URL needs to be the first frame or this f"[{first_frame:05d}-{last_frame:05d}]" syntax. https://github.com/AcademySoftwareFoundation/OpenTimelineIO/wiki/Editorial-File-Format-Notes#aaf The image sequence needs to be strictly named and numbered, and I believe EXRS need to have embed timecode to work.

codecov-commenter commented 1 year ago

Codecov Report

Attention: Patch coverage is 96.87500% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 90.33%. Comparing base (74298e1) to head (20d29d2). Report is 6 commits behind head on main.

:exclamation: Current head 20d29d2 differs from pull request most recent head da7ba7f. Consider uploading reports for the commit da7ba7f to get more accurate results

Files Patch % Lines
..._aaf_adapter/adapters/advanced_authoring_format.py 71.42% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9 +/- ## ========================================== + Coverage 90.12% 90.33% +0.20% ========================================== Files 3 3 Lines 1124 1179 +55 ========================================== + Hits 1013 1065 +52 - Misses 111 114 +3 ``` | [Flag](https://app.codecov.io/gh/OpenTimelineIO/otio-aaf-adapter/pull/9/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenTimelineIO) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/OpenTimelineIO/otio-aaf-adapter/pull/9/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenTimelineIO) | `90.33% <96.87%> (+0.20%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenTimelineIO#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

austinwitherspoon commented 7 months ago

It looks like this fixes OTIO raising an exception when trying to generate an .aaf with ImageSequenceReferences?

This is something I'd love to see working!

markreidvfx commented 6 months ago

@timlehr if you have some time could you take a look at this? I've been using it for a long time. It would be nice to get it finally merged.

timlehr commented 6 months ago

@markreidvfx I had a look and while I didn't test it myself, the code looks good to me. 👍 I don't seem to have the permission to approve this however.