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

Add marker to timeline when we can't find valid track #41

Conversation

austinwitherspoon
Copy link
Contributor

Fixes #40

Certain AAF files generated by Avid Media Composer with "Use Selected Tracks" may contain markers with invalid PhysicalTrackNumber properties.

The current behavior is to raise an exception when this occurs, but it seems preferable to handle this situation gracefully.
Avid currently handles these AAFs by dropping the marker entirely.
DaVinci Resolve handles these AAFs by adding the marker to the timeline, rather than a clip.

I personally prefer the Resolve approach, since we don't delete the data entirely. It means we always have somewhere where the marker data will end up.

I have update the AAF parser to do this approach - instead of raising an exception when OTIO can't find a matching track, we apply the marker to the timeline itself (or rather, the tracks property on the timeline. This is how OTIO files generated by Resolve represent timeline markers.)

Here is a screenshot of otioview running on this AAF, where the marker is applied to the timeline itself rather than the clip:
image

Tests

I've added a test for this case in contrib/opentimelineio_contrib/adapters/tests/test_aaf_adapter.py called test_aaf_marker_with_bad_track()
This test currently only ensures that we don't raise an exception when parsing a file like this.

Copy link

linux-foundation-easycla bot commented Feb 14, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: austinwitherspoon / name: Austin Witherspoon (e13b3f7)

@austinwitherspoon austinwitherspoon force-pushed the fix_parse_aaf_marker_with_bad_track branch from 5d690f6 to e13b3f7 Compare February 14, 2024 21:26
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (00ca601) 90.00% compared to head (e13b3f7) 90.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   90.00%   90.12%   +0.11%     
==========================================
  Files           3        3              
  Lines        1121     1124       +3     
==========================================
+ Hits         1009     1013       +4     
+ Misses        112      111       -1     
Flag Coverage Δ
unittests 90.12% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@reinecke
Copy link
Member

Copy link
Member

@markreidvfx markreidvfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks adding a test :)

@reinecke reinecke merged commit 74298e1 into OpenTimelineIO:main Mar 14, 2024
20 checks passed
markreidvfx pushed a commit to markreidvfx/otio-aaf-adapter that referenced this pull request Apr 1, 2024
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.

OpenTimelineIO raises exception when trying to load AAF exported from Avid with "Use Selected Tracks" selected
3 participants