Skip to content

[otio] Import the EDL of a production at an NTSC frame rate - #1329

Merged
frankrousseau merged 1 commit into
cgwire:mainfrom
NicoPennec:timecode-fps
Oct 29, 2026
Merged

frankrousseau merged 1 commit into
cgwire:mainfrom
NicoPennec:timecode-fps

Conversation

@NicoPennec

Copy link
Copy Markdown
Member

Problem

  • The EDL import passes the production fps to OTIO as is, but OTIO reads timecodes at SMPTE rates only
  • A production at an NTSC rate stores it rounded (29.97, 23.976 or 23.98, 59.94, 47.952), so every EDL import of such a production answers a 400 Failed to parse OTIO file: SMPTE timecode does not support this rate
  • OTIO skips the FCM line of an EDL: a drop-frame EDL whose timecodes have no ; is read as non-drop-frame, 18 frames off every 10 minutes at 29.97 fps

Solution

  • Read the EDL at the SMPTE rate within a hundredth of the production fps (get_timecode_rate): at 30000/1001, non-drop-frame timecodes count 30 frames a second, and drop-frame ones (with ;) skip their frame numbers
  • At 29.97 and 59.94 fps, refuse a drop-frame EDL whose timecodes have no ; (check_drop_frame_separators)
  • Pass any other fps as is, 20 for instance, so OTIO keeps refusing it instead of counting the frames at another rate

The EDL import passed the production fps to OTIO as is. OTIO reads
timecodes at SMPTE rates only, and a production at an NTSC rate stores
it rounded: 29.97 for 30000/1001, 23.976 or 23.98 for 24000/1001, 59.94
for 60000/1001, 47.952 for 48000/1001. Every EDL import of such a
production answered a 400, "Failed to parse OTIO file: SMPTE timecode
does not support this rate".

- Read the EDL at the SMPTE rate within a hundredth of the production
  fps: at 30000/1001, non-drop-frame timecodes count 30 frames a second,
  and drop-frame ones (with ';') skip their frame numbers
- At 29.97 and 59.94 fps, refuse a drop-frame EDL whose timecodes have
  no ';': OTIO skips the FCM line and would read it as non-drop-frame,
  18 frames off every 10 minutes at 29.97
- Pass any other fps as is, 20 for instance: OTIO keeps refusing it,
  where the nearest SMPTE rate would count the frames at another rate

Tests: test_import_edl_at_29_97_fps, test_import_edl_at_59_94_fps,
test_import_edl_at_23_976_fps,
test_import_edl_reads_drop_frame_timecodes_at_29_97_fps,
test_import_edl_reads_drop_frame_timecodes_at_59_94_fps,
test_import_edl_refuses_drop_frame_without_semicolons,
test_import_edl_refuses_a_rate_far_from_every_timecode_rate.
@frankrousseau
frankrousseau merged commit b1bbb5f into cgwire:main Oct 29, 2026
13 checks passed
@NicoPennec
NicoPennec deleted the timecode-fps branch October 29, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants