-
Notifications
You must be signed in to change notification settings - Fork 309
Closed
Milestone
Description
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))
'01:00:02;05'
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)
'00:59:58:17'
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/opentime.py", 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:
Metadata
Metadata
Assignees
Labels
No labels