OpenTimelineIO / otio-cmx3600-adapter

OpenTimelineIO CMX 3600 EDL adapter
Apache License 2.0
4 stars 3 forks source link

Parser Rebuild #9

Open reinecke opened 11 months ago

reinecke commented 11 months ago

Overview

EDL can be a tricky format to get right in the details - our original parser worked well in controlled situations, but also had issues like not adopting global_start_time support, not fully baked transition support, and brittleness when sources were in frame rates that didn't match the timeline rate.

This refactor separates the reader code into two separate disciplines:

  1. A parser that yields an edl statement per line with parsed fields but does not resolve timing and represents the facts of exactly what's in the EDL as closely as possible.
  2. The Reader which interprets the statements grouped by event into their resolved timing, converts them to OpenTimelineIO schema objects, and applies them to a timeline

Changes and Enhancements

Adapter Args

The adapter has been updated with new controls on parsing behavior based on our more current knowledge of the format:

Note that setting ignore_invalid_timecode_errors and discard_unsupported_events to False (the default) will preserve the old behavior of erroring when correctness can't be trusted.

Parsing

TODOs

reinecke commented 4 months ago

@douglascomet Thanks for the feedback!

The M2 issues are with M2 motion effects - see page 20 in the cmx spec.

A docstring pass is a good idea - I need to make sure I share some of the ideas I had behind this stuff to help future us.

The code density stuff is good feedback - we can think about driving sections of this toward being more approachable.

I'll try to carve some time for this to try and get it out in the coming weeks.