Open reinecke opened 11 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.
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:
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:
ignore_timecode_mismatch
is still present, but is always hard-wiredTrue
and raisesDeprecationWarning
when used. Will be removed in a future release.ignore_invalid_timecode_errors
- When a timecode can't be interpreted due to something likeFrame rate mismatch. Timecode '19:13:21:28' has frames beyond 23
, the start timecode in the source will be rounded up to zero frames in the next second. This helps address issues that can occur from doing things like using a 30 fps source in a 24 fps timeline without retimes.discard_unsupported_events
- enables a mode where events that can't be interpreted (likeKEY
edits) are skipped and the event is noted intimeline.metadata["cmx_3600"]["unsupported_events"]
.Note that setting
ignore_invalid_timecode_errors
anddiscard_unsupported_events
toFalse
(the default) will preserve the old behavior of erroring when correctness can't be trusted.Parsing
Timeline.global_start_time
rather thanTrack.available_range
to signal the timeline start time (#6) (AcademySoftwareFoundation/OpenTimelineIO#1385) (maybe AcademySoftwareFoundation/OpenTimelineIO#346)EDLParseException
instances now include more contextual informationread_from_file
when the operating system default string encoding fails - this has anecdotally been successful in handling some EDLs that would otherwise failTODOs
ignore_invalid_timecode_errors
behavior