-
Notifications
You must be signed in to change notification settings - Fork 35
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
Timecode.to_realtime(as_float=False)
returns incorrect value for "00:00:00:00" at low frame rates.
#58
Comments
Also, just wanted to say thanks for maintaining this library, it's super lightweight and fits our usecase perfectly 😄 |
@lucien-flwls thank you. I think we loose quite a bit of resolution for very high frame rates and it cannot represent it properly. Otherwise yes "00:00:00:00" is the timecode of the first frame, so there is 1 frame, you're correct. |
Hi, I believe you are better off producing your own precise timestamp string with the result of As to the correctness at the standard framerate of 24 fps: 00:00:00:00 is the timecode of the first frame. This frame takes 41.6 ms to be drawn and displayed on your screen. Hence the real time is not Here's what SMPTE-12M says:
We can verify this: assert 30 == Timecode(30, "00:00:00:29").frames ## There are 30 frames
assert 1.0 == Timecode(30, "00:00:00:29").to_realtime(True) ## Exactly 1 s elapsed in real time. |
Simply put, using the
to_realtime
method for low and higher frame rates on a "00:00:00:00" timecode produces the following inconsistent results:which I believe is incorrect. My hunch is the addition of 42ms is due to the
Timecode
object always requiring a frame count of 1; 1000/24 = 41.66The text was updated successfully, but these errors were encountered: