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

Support nested audio dissolve #21

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

markreidvfx
Copy link
Member

This fixes an odd structure I've found in a few timelines generated from Media Composer.
It's a Transition inside an OperationGroup

weird_operation_group

It just ends up becoming a dissolve on the end of a audio clip.
image

I'm not entirely sure how Media Composer creates this structure, but I've run into on a few timelines.
Without the the fix the adapter raise this exception:

  File "d:/dev/otio-aaf-adapter/src/otio_aaf_adapter\adapters\advanced_authoring_format.py", line 1574, in read_from_file
    result = _transcribe(mobs_to_transcribe, parents=list(), edit_rate=None)
  File "d:/dev/otio-aaf-adapter/src/otio_aaf_adapter\adapters\advanced_authoring_format.py", line 821, in _transcribe
    result.append(_transcribe(child, parents + [item], edit_rate, indent + 2))
  File "d:/dev/otio-aaf-adapter/src/otio_aaf_adapter\adapters\advanced_authoring_format.py", line 413, in _transcribe
    track = _transcribe(slot, parents + [item], edit_rate, indent + 2)
  File "d:/dev/otio-aaf-adapter/src/otio_aaf_adapter\adapters\advanced_authoring_format.py", line 639, in _transcribe
    child = _transcribe(item.segment, parents + [item], edit_rate, indent + 2)
  File "d:/dev/otio-aaf-adapter/src/otio_aaf_adapter\adapters\advanced_authoring_format.py", line 631, in _transcribe
    result = _transcribe_operation_group(item, parents, metadata,
  File "d:/dev/otio-aaf-adapter/src/otio_aaf_adapter\adapters\advanced_authoring_format.py", line 1148, in _transcribe_operation_group
    child = _transcribe(segment, parents + [item], edit_rate, indent)
  File "d:/dev/otio-aaf-adapter/src/otio_aaf_adapter\adapters\advanced_authoring_format.py", line 625, in _transcribe
    child = _transcribe(component, parents + [item], edit_rate, indent + 2)
  File "d:/dev/otio-aaf-adapter/src/otio_aaf_adapter\adapters\advanced_authoring_format.py", line 621, in _transcribe
    metadata["PhysicalTrackNumber"] = list(parent.slots).index(item) + 1
AttributeError: 'Sequence' object has no attribute 'slots'

The fix is to only set PhysicalTrackNumber if the parent is a MobSlot

@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.17%. Comparing base (74298e1) to head (9dce4c3).
Report is 4 commits behind head on main.

❗ Current head 9dce4c3 differs from pull request most recent head 8c50ef1. Consider uploading reports for the commit 8c50ef1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   90.12%   90.17%   +0.04%     
==========================================
  Files           3        3              
  Lines        1124     1109      -15     
==========================================
- Hits         1013     1000      -13     
+ Misses        111      109       -2     
Flag Coverage Δ
unittests 90.17% <100.00%> (+0.04%) ⬆️

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.

@roger-sacilotto
Copy link

FYI, this structure is the result of a track effect that applies pan to the original audio timeline sequence, thus the nesting.

Only look for slot index if parent is mobslot

Signed-off-by: Mark Reid <[email protected]>
@markreidvfx
Copy link
Member Author

I rebased this on top of the current main. It will cleanly merge now

@apetrynet apetrynet merged commit a354a81 into OpenTimelineIO:main Mar 25, 2024
36 checks passed
markreidvfx added a commit to markreidvfx/otio-aaf-adapter that referenced this pull request Mar 28, 2024
Only look for slot index if parent is mobslot

Signed-off-by: Mark Reid <[email protected]>
markreidvfx added a commit to markreidvfx/otio-aaf-adapter that referenced this pull request Mar 31, 2024
Only look for slot index if parent is mobslot

Signed-off-by: Mark Reid <[email protected]>
markreidvfx added a commit to markreidvfx/otio-aaf-adapter that referenced this pull request Apr 1, 2024
Only look for slot index if parent is mobslot

Signed-off-by: Mark Reid <[email protected]>
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.

5 participants