Git Product home page Git Product logo

otio-aaf-adapter's People

Contributors

andrewmoore-nz avatar apetrynet avatar austinwitherspoon avatar dependabot[bot] avatar jchen9 avatar jeanchristophemorinperso avatar jminor avatar joshburnell avatar markreidvfx avatar reinecke avatar ssteinbach avatar stefanschulze avatar timlehr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

otio-aaf-adapter's Issues

Error converting ASWF sample Picchu to AAF

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!

Format adapter Python code with black

Feature Request

Description

Code formatting using black has become a bit of a standard in the Python community and it would be great to see the us adopt it. We could apply it to the entire codebase and then add the commit to .git-blame-ignore-revs so it won't mess with the git blame output.

OpenTimelineIO AAF Adapter Removal Tasks

The following tasks need to be resolved before AAF Adapter can safely be removed from OpenTimelineIO.
Please let me know if there are any other blocking issues to add to this task list.

The pull request to remove the AAF Adapter from OTIO is here
AcademySoftwareFoundation/OpenTimelineIO#1348

Blocking Tasks

  • Fix test coverage lost in OTIO due to the AAF adapter AcademySoftwareFoundation/OpenTimelineIO@913f540
  • Enable EasyCLA enforcement if possible
  • Enable Developer Certificate of Origin (DCO) enforcement
  • Enable pull request reviews settings in repository
  • Enable CodeCov CI and pull request reports
  • Enable Dependabot
  • Create / Verify PyPi package publishing works
  • Create PyPi package alias for OTIO AcademySoftwareFoundation/OpenTimelineIO#1386
  • Linking docs to OTIO strategy and publishing
  • Add Code of Conduct and Contributing docs
  • Fix CI pip install OTIO URL
  • Fix Badge path in Readme
  • Add issue and pull request templates

Possible Blocking Tasks

  • Migrate OTIO AAF Adapter Issues or link
  • Migrate OTIO AAF Adapter Pull Requests?
  • What OTIO version do we test against? multiple?
  • Any additional docs need to move/remove from OTIO?
  • Improve front page README

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

Bug Report

I’ve found a bug in Avid Media Composer AAF file generation:

  • Make 3 video tracks
  • On the third track, place a clip with a marker
  • Deselect track 2
  • Export an AAF with “selected tracks only” setting
    Since track 2 is excluded from the AAF, track 3 gets assigned PhysicalTrackNumber = 2 in the AAF (reasonable!)
    BUT - the marker doesn’t get updated! The Marker in the AAF still points at track 3! If you try to import this AAF back into Avid, that marker just disappears.
    If you import that AAF into DaVinci Resolve, the marker gets added to the timeline itself instead of a clip.

Currently OTIO will raise an exception when trying to load this AAF:

raise AAFAdapterError(
    "Marker '{}' cannot be attached to an item. SlotID: '{}', "
    "PhysicalTrackNumber: '{}'".format(
        marker.name, slot_id, track_number
    )
)

Since this is a "valid" aaf generated by Avid Media Composer, OpenTimelineIO shouldn't explode when reading in the file.

To Reproduce

Here's an AAF file generated by Avid Media Composer 2021.12.2.55649.0, using the instructions above:
bad_marker_track_from_avid.aaf.zip

Logs

Traceback (most recent call last):
  File "/Users/awitherspoon/src/studio/otio-aaf-adapter/.venv/bin/otioview", line 8, in <module>
    sys.exit(main())
  File "/Users/awitherspoon/src/studio/otio-aaf-adapter/.venv/lib/python3.9/site-packages/opentimelineview/console.py", line 300, in main
    window.load(args.input)
  File "/Users/awitherspoon/src/studio/otio-aaf-adapter/.venv/lib/python3.9/site-packages/opentimelineview/console.py", line 191, in load
    file_contents = otio.adapters.read_from_file(
  File "/Users/awitherspoon/src/studio/otio-aaf-adapter/.venv/lib/python3.9/site-packages/opentimelineio/adapters/__init__.py", line 137, in read_from_file
    return adapter.read_from_file(
  File "/Users/awitherspoon/src/studio/otio-aaf-adapter/.venv/lib/python3.9/site-packages/opentimelineio/adapters/adapter.py", line 116, in read_from_file
    result = self._execute_function(
  File "/Users/awitherspoon/src/studio/otio-aaf-adapter/.venv/lib/python3.9/site-packages/opentimelineio/plugins/python_plugin.py", line 142, in _execute_function
    return (getattr(self.module(), func_name)(**kwargs))
  File "/Users/awitherspoon/src/studio/otio-aaf-adapter/src/otio_aaf_adapter/adapters/advanced_authoring_format.py", line 1609, in read_from_file
    result = _attach_markers(result)
  File "/Users/awitherspoon/src/studio/otio-aaf-adapter/src/otio_aaf_adapter/adapters/advanced_authoring_format.py", line 1259, in _attach_markers
    raise AAFAdapterError(
opentimelineio.adapters.AAF.AAFAdapterError: Marker 'Marker on Track 3! When exported with Track 2 deselected and exported with "Selected Tracks Only", this marker will incorrectly point at track 2 in the AAF even though it doesn't exist (since the original track 2 was ommitted, and track 3 was renamed to 2 by avid!)' cannot be attached to an item. SlotID: '9', PhysicalTrackNumber: '3'

AAFWriter: add support for comments

Feature Request

Description

Currently the AAF writer doesn't translate user comments generated by the AAF reader (or manually by the user).

The adapter should translate comments from the clip / media reference onto the MasterMob and comments from the timeline onto the CompositionMob.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.