opentimelineio.adapters.cmx_3600

OpenTimelineIO CMX 3600 EDL Adapter

class opentimelineio.adapters.cmx_3600.ClipHandler(line, comment_data, rate=24, transition_line=None)
create_imagesequence_reference(comment_data)
image_sequence_pattern = re.compile('.*\\.(?P<range>\\[(?P<start>[0-9]+)-(?P<end>[0-9]+)\\])\\.\\w+$')
is_image_sequence(comment_data)
make_clip(comment_data)
make_transition(comment_data)
parse(line)
class opentimelineio.adapters.cmx_3600.CommentHandler(comments)
comment_id_map = {'ASC_SAT': 'asc_sat', 'ASC_SOP': 'asc_sop', 'FROM CLIP': 'media_reference', 'FROM CLIP NAME': 'clip_name', 'FROM FILE': 'media_reference', 'LOC': 'locators', 'M2': 'motion_effect', 'TO CLIP NAME': 'dest_clip_name', '\\* FREEZE FRAME': 'freeze_frame', '\\* OTIO REFERENCE [a-zA-Z]+': 'media_reference'}
parse(comment)
regex_template = '\\*?\\s*{id}:?\\s*(?P<comment_body>.*)'
class opentimelineio.adapters.cmx_3600.DissolveEvent(a_side_event, transition, b_side_clip, tracks, kind, rate, style, reelname_len)
to_edl_format()

Example output:

Cross dissolve… 002 Clip1 V C 00:00:07:08 00:00:07:08 00:00:01:21 00:00:01:21 002 Clip2 V D 100 00:00:09:07 00:00:17:15 00:00:01:21 00:00:10:05 * FROM CLIP NAME: Clip1 * FROM CLIP: /var/tmp/clip1.001.exr * TO CLIP NAME: Clip2 * TO CLIP: /var/tmp/clip2.001.exr

Fade in… 001 BL V C 00:00:00:00 00:00:00:00 00:00:00:00 00:00:00:00 001 My_Clip V D 012 00:00:02:02 00:00:03:04 00:00:00:00 00:00:01:02 * TO CLIP NAME: My Clip * TO FILE: /var/tmp/clip.001.exr

Fade out… 002 My_Clip V C 00:00:01:12 00:00:01:12 00:00:00:12 00:00:00:12 002 BL V D 012 00:00:00:00 00:00:00:12 00:00:00:12 00:00:01:00 * FROM CLIP NAME: My Clip * FROM FILE: /var/tmp/clip.001.exr

exception opentimelineio.adapters.cmx_3600.EDLParseError
class opentimelineio.adapters.cmx_3600.EDLParser(edl_string, rate=24, ignore_timecode_mismatch=False)
add_clip(line, comments, rate=24, transition_line=None)
guess_kind_for_track_name(name)
parse_edl(edl_string, rate=24)
tracks_for_channel(channel_code)
class opentimelineio.adapters.cmx_3600.EDLWriter(tracks, rate, style, reelname_len=8)
get_content_for_track_at_index(idx, title)
class opentimelineio.adapters.cmx_3600.Event(clip, tracks, kind, rate, style, reelname_len)
to_edl_format()
Example output:

002 AX V C 00:00:00:00 00:00:00:05 00:00:00:05 00:00:00:10 * FROM CLIP NAME: test clip2 * FROM FILE: S:vartmptest.exr

class opentimelineio.adapters.cmx_3600.EventLine(kind, rate, reel='AX')
is_dissolve()
to_edl_format(edit_number)
opentimelineio.adapters.cmx_3600.read_from_string(input_str, rate=24, ignore_timecode_mismatch=False)

Reads a CMX Edit Decision List (EDL) from a string. Since EDLs don’t contain metadata specifying the rate they are meant for, you may need to specify the rate parameter (default is 24). By default, read_from_string will throw an exception if it discovers invalid timecode in the EDL. For example, if a clip’s record timecode overlaps with the previous cut. Since this is a common mistake in many EDLs, you can specify ignore_timecode_mismatch=True, which will supress these errors and attempt to guess at the correct record timecode based on the source timecode and adjacent cuts. For best results, you may wish to do something like this:

Example:
>>> try:
...     timeline = otio.adapters.read_from_string("mymovie.edl", rate=30)
... except EDLParseError:
...    print('Log a warning here')
...    try:
...        timeline = otio.adapters.read_from_string(
...            "mymovie.edl",
...            rate=30,
...            ignore_timecode_mismatch=True)
...    except EDLParseError:
...        print('Log an error here')
opentimelineio.adapters.cmx_3600.write_to_string(input_otio, rate=None, style='avid', reelname_len=8)