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

Error converting ASWF sample Picchu to AAF #42

Open
vade opened this issue Feb 16, 2024 · 6 comments
Open

Error converting ASWF sample Picchu to AAF #42

vade opened this issue Feb 16, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@vade
Copy link

vade commented Feb 16, 2024

Bug Report

Incorrect Functionality and General Questions

Attempting to convert https://dpel.aswf.io/aws-picchu-edit/ fails using both release OTIO and OTIO 0.17-dev and associated plugins

To Reproduce

In a clean v-env or conda env, install OTIO:

pip install opentimelineio==v0.17.0.dev1
pip install opentimelineio-plugins==0.17.0.dev1

Then run

otioconvert -i ~/Downloads/aws-picchu-edit-4096x2048.otioz -o ~/Downloads/aws-picchu-edit-4096x2048.aaf -O 'AAF' -A use_empty_mob_ids="True"

  1. Operating System

macOS 13.4

  1. Python version

3.10.0

  1. OpenTimelineIO release version or commit hash

0.17.0.dev1

Expected Behavior

Successful AAF conversion

Description of the expected behavior.

Logs

  1. Output from otioconvert which fails on transitions and timing:
Traceback (most recent call last):
  File "/Users/vade/miniconda3/envs/otio/bin/otioconvert", line 8, in <module>
    sys.exit(main())
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/opentimelineio/console/otioconvert.py", line 278, in main
    otio.adapters.write_to_file(
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/opentimelineio/adapters/__init__.py", line 192, in write_to_file
    return adapter.write_to_file(
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/opentimelineio/adapters/adapter.py", line 189, in write_to_file
    result = self._execute_function(
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/opentimelineio/plugins/python_plugin.py", line 142, in _execute_function
    return (getattr(self.module(), func_name)(**kwargs))
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/otio_aaf_adapter/adapters/advanced_authoring_format.py", line 1604, in write_to_file
    aaf_writer.validate_metadata(timeline)
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/otio_aaf_adapter/adapters/aaf_adapter/aaf_writer.py", line 179, in validate_metadata
    raise AAFValidationError("\n" + "\n".join(
otio_aaf_adapter.adapters.aaf_adapter.aaf_writer.AAFValidationError: 
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['PointList'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['DataDefinition']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Description'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['CutPoint'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['PointList'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['DataDefinition']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Description'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['CutPoint'] does not exist, 'AAF'
Carolina_Galarza_11 years old.mov<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 59.94005994005994 (actual)
Carolina_Galarza_11 years old.mov<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 59.94005994005994 (actual)
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['PointList'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['DataDefinition']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Description'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['CutPoint'] does not exist, 'AAF'
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 30.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 30.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 30.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 30.0 (actual)
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['PointList'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['DataDefinition']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Description'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['CutPoint'] does not exist, 'AAF'
519291-139337-felix-blume-wind-is-blowing-in-the-grass-of-a-patagonian-plain-wind-is-blowing-in-the-trees-in-background-tier.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 25.0 (actual)
519291-139337-felix-blume-wind-is-blowing-in-the-grass-of-a-patagonian-plain-wind-is-blowing-in-the-trees-in-background-tier.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 25.0 (actual)
519291-139337-felix-blume-wind-is-blowing-in-the-grass-of-a-patagonian-plain-wind-is-blowing-in-the-trees-in-background-tier.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 25.0 (actual)
519291-139337-felix-blume-wind-is-blowing-in-the-grass-of-a-patagonian-plain-wind-is-blowing-in-the-trees-in-background-tier.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 25.0 (actual)
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['PointList'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['DataDefinition']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Description'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['CutPoint'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['PointList'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['DataDefinition']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Description'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['CutPoint'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['PointList'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['DataDefinition']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Description'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['OperationGroup']['Operation']['Name'] does not exist, 'AAF'
Cross Fade 0 dB<class 'opentimelineio._otio.Transition'> Transition.metadata['AAF']['CutPoint'] does not exist, 'AAF'
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 30.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 30.0 (actual)
  1. Using otiotool to convert and strip transitions:

otiotool -i ~/Downloads/aws-picchu-edit-4096x2048/content.otio --remove-transitions -o ~/Downloads/aws-picchu-edit-4096x2048/content-no-transition.otio

(I did this on an unzipped otioz structure, just for clarity)

And then running otioconvert again removes the transition errors, but of course timing is still a concern:

otioconvert -i ~/Downloads/aws-picchu-edit-4096x2048/content-no-transition.otio -o ~/Downloads/aws-picchu-edit-4096x2048/content-no-transition.aaf -O 'AAF'
Traceback (most recent call last):
  File "/Users/vade/miniconda3/envs/otio/bin/otioconvert", line 8, in <module>
    sys.exit(main())
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/opentimelineio/console/otioconvert.py", line 278, in main
    otio.adapters.write_to_file(
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/opentimelineio/adapters/__init__.py", line 192, in write_to_file
    return adapter.write_to_file(
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/opentimelineio/adapters/adapter.py", line 189, in write_to_file
    result = self._execute_function(
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/opentimelineio/plugins/python_plugin.py", line 142, in _execute_function
    return (getattr(self.module(), func_name)(**kwargs))
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/otio_aaf_adapter/adapters/advanced_authoring_format.py", line 1604, in write_to_file
    aaf_writer.validate_metadata(timeline)
  File "/Users/vade/miniconda3/envs/otio/lib/python3.10/site-packages/otio_aaf_adapter/adapters/aaf_adapter/aaf_writer.py", line 179, in validate_metadata
    raise AAFValidationError("\n" + "\n".join(
otio_aaf_adapter.adapters.aaf_adapter.aaf_writer.AAFValidationError: 
Carolina_Galarza_11 years old.mov<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 59.94005994005994 (actual)
Carolina_Galarza_11 years old.mov<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 59.94005994005994 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 30.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 30.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 30.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 30.0 (actual)
519291-139337-felix-blume-wind-is-blowing-in-the-grass-of-a-patagonian-plain-wind-is-blowing-in-the-trees-in-background-tier.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 25.0 (actual)
519291-139337-felix-blume-wind-is-blowing-in-the-grass-of-a-patagonian-plain-wind-is-blowing-in-the-trees-in-background-tier.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 25.0 (actual)
519291-139337-felix-blume-wind-is-blowing-in-the-grass-of-a-patagonian-plain-wind-is-blowing-in-the-trees-in-background-tier.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 25.0 (actual)
519291-139337-felix-blume-wind-is-blowing-in-the-grass-of-a-patagonian-plain-wind-is-blowing-in-the-trees-in-background-tier.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 25.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.duration.rate not equal to 24.0 (expected) != 30.0 (actual)
250376-Pigs_shriek_and_squeals_chewing_and_rumble_sheep_bells.wav<class 'opentimelineio._otio.Clip'> Clip.media_reference.available_range.start_time.rate not equal to 24.0 (expected) != 30.0 (actual)
  1. Running otiostat on the original timeline nets:
otiostat ~/Downloads/aws-picchu-edit-4096x2048/content.otio
parsed: True
top level object: Timeline.1
number of tracks: 26
There was a system error: track 5 is not the same duration as the other tracks. Track RationalTime(10547, 24) duration, vs: RationalTime(10588, 24)
deepest nesting: 4
number of clips: 508
total duration: RationalTime(10588, 24)
total duration in timecode: 00:07:21:04
top level rate: 24.0
clips with cdl data: 0
Tracks with non standard types: 0

Any insight is helpful!

@markreidvfx
Copy link
Member

There are 2 main issues here.

The first is issue is transitions currently require additional AAF metadata to output correctly. This shouldn't be necessary. Sensible defaults for a transitions should be chosen if metadata is not supplied. Transitions are done differently in AAF compared to OTIO, its get really confusing quickly :p

The second issue is difference in frame rates between a clip and media_reference. This is a little more tricky to deal with. Will need to investigate what media composer does for this. I believe it adds some kind of retime operation to keep the correct playback speed.

@vade
Copy link
Author

vade commented Feb 20, 2024

Thanks @markreidvfx - I understand about the former, the latter seems more pertinent to tackle.

Would it be helpful if I can find a round-about way of getting a viable AAF (perhaps OTIO -> Resolve -> AAF?)

I was curious if in cases with mixed frame rates / time bases if AAF requires a 'conform' retiming effect added vs it just working.

I also have some contacts at Avid I can ask. I'll send them this thread.

Thank you!

@markreidvfx
Copy link
Member

It should be a matter of creating some timelines with mixed framerate footage in Media Composer. Export AAF files of a few isolated cases and identify the structure. The audio frame rate differences is a little strange, I'm not entirely sure whats going on there.

I've only played around briefly with this project for the first time this weekend. The source media is missing things like embed timecode, so it took me a fair bit of time to relink everything with the free version of Resolve.

We could definitely look at the AAF Resolve generates for reference. I did think of doing that but haven't really dug into it.

@markreidvfx
Copy link
Member

markreidvfx commented Feb 20, 2024

Digging a little into this, all the rate changes on audio clips. The AAF exported from Resolve uses no effect to deal with the changes in edit_rate between SourceClip references. Maye the validation check of the media_reference's rate compared to the sourclip's rate is over zealous.

image

This AAF imports into Media Composer, but has some errors. Exception: PMM_INSUFFICIENT_MEDIA which normally mean a clip is short on media.

aws-picchu-edit_resolve.otio.aaf.zip

@Jameclarke
Copy link

Here are some test files from Avid, each file has an AAF and OTIO file to test frame rates. Each file was linked into the 24FPS project and transcoded to the original framerate of the clip.
Archive.zip
Specs Below:

Avid Project: 24 FPS
Clip 1: Cosmos 24 FPS
Clip 2: Chimera 23.98 FPS
Clip 3: Chimera 59.94 FPS

Let me know if you need anymore files, I'm happy to help out.

@Jameclarke
Copy link

Attached is a cleaned up version of the Picchu Timeline
Picchu_Clean_Timeline.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants