Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTime: Non-Drop-frame Timecode not supported at some rates #476

reinecke opened this Issue Apr 2, 2019 · 3 comments


None yet
3 participants
Copy link

reinecke commented Apr 2, 2019

Given the ground truth values for drop-frame timecode, non-drop timecode, and frame number at 29.97fps:

DF_TC = "01;00;02;05"
NDF_TC = "00:59:58:17"
frames = 107957

Converting the time corresponding to the frame count gives the correct Drop-Frame value:

>>> opentime.to_timecode(opentime.RationalTime(frames, 29.97))

Converting that same time, but forcing the rate arg to 30 give the correct non-drop value:

>>> opentime.to_timecode(opentime.RationalTime(frames, 29.97), 30)

Converting from Drop-Frame timecode gives a value that matches frame count:

>>> opentime.from_timecode(DF_TC, 29.97)
otio.opentime.RationalTime(value=107957, rate=29.97)

Converting from non-drop does not:

>>> opentime.from_timecode(NDF_TC, 29.97)
otio.opentime.RationalTime(value=107849, rate=29.97)

If you attempt to use 30fps with the Non drop-frame to force correct value and override rate, you get an error:

>>> t = opentime.from_timecode(NDF_TC, 30)
>>> t
otio.opentime.RationalTime(value=107957, rate=30)
>>> t.rate = 29.97
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ereinecke/Projects/github/OpenTimelineIO/opentimelineio/", line 72, in __setattr__
    raise AttributeError("RationalTime is Immutable.")
AttributeError: RationalTime is Immutable.

Here is an example from Premiere of valid drop-frame, non drop-frame, and frame count values from a 29.97fps sequence:
Premiere TC examples

apetrynet added a commit to apetrynet/OpenTimelineIO that referenced this issue Apr 12, 2019

ssteinbach added a commit that referenced this issue Apr 12, 2019

Suggested fix for #476 (#488)
* Added a test to make sure only dropframe timecodes get treated like such
* added test for passing NDF timecode to  as described in #476

This comment has been minimized.

Copy link

ssteinbach commented Apr 12, 2019

@reinecke @apetrynet this has been landed, can we consider this issue 'closed'?


This comment has been minimized.

Copy link

apetrynet commented Apr 12, 2019

I would assume so.

@ssteinbach ssteinbach added this to the Public Beta 10 milestone Apr 12, 2019


This comment has been minimized.

Copy link

ssteinbach commented Apr 12, 2019

Thanks! I've confirmed it.

@ssteinbach ssteinbach closed this Apr 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.