-
Notifications
You must be signed in to change notification settings - Fork 309
Remove "rate" argument from "opentime.to_timecode" #613
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
Remove "rate" argument from "opentime.to_timecode" #613
Conversation
ddc40d7
to
3125016
Compare
I prefer this explicit conversion to the embedded rate, rather than the existing code where the rate must be passed around. The existing code seems prone to coding errors. |
Here's my thinking. When you pass If you want to actually rescale the time value to be at a different moment in time (e.g. scaling from 30fps playback to 30000/1001 NTSC playback) then the caller can do the rescale themselves based on the desired workflow. For cases where you're going to/from matching pairs of integer and NTSC rates, the rate difference is subtle, but important. In practice, I would guess, that you often don't want to rescale the value, but rather just set the rate, keeping the value as an integer frame number: However, if you're switching from wildly different rates (e.g. 24 to 60) then the rescale is more likely to be desired. Again, the caller will know what they want, and If these are too verbose, then perhaps two variants could be supported?
|
This solution trusts the embedded |
We talked about this further offline and I understand better what @reinecke is driving at. He points out that as a result of normal math, |
Another way to make this clear would be to change That would completely separate the responsibility for rescaling, snapping, etc. |
follow on to #612 - remove the rate argument and avoid the implicit
rescale_to
into_timecode
.The confusing thing is when rate and dropframe/non-dropframe get conflated.
See this: