[FFmpeg-user] Decimal times to frame numbers
cpz at tuunq.com
Fri Aug 20 18:39:42 EEST 2021
I hate to disagree with you, but....
On 8/19/2021 5:56 AM, Nicolas George wrote:
> No, it is the other way around: you should not be thinking about frame
> numbers, you should be thinking about timestamps.
> Timestamps are an inherent property of the frame, they will be preserved
> or converted by filters and storage. Frame numbers are not.
Frame numbers are not an internal property of a frame itself, but I'm sure
you know that in production and editing environments*, nobody cares about a
timestamp, they care that this frame is 3 seconds and 5 frames from that
one, that the clip is 32 seconds and 13 frames long, or that a transition
takes 19 frames. Frame numbers are ordinal from an arbitrary point.
And it's not relevant that they be "preserved by filters" because the don't
exist in that context anyway- kind of like saying that 20 story building
doesn't have a 13th floor; it surely does, even if it's labeled "14".
*which tend to be fixed rate, not variable
It's also quite a lot easier and more clear and precise to specify a point
as 00:00:00.13 (the thirteenth frame interpreted at the current frame rate)
than as 0.43377... (at 29.97); it will always be the 13th frame of the
second and can't mean anything else.
So, yes, frame numbers are meaningful and commonly used. If ffmpeg only
accepts decimal seconds, so be it, but that complicates matters for a fair
few users and they're not likely to change to decimals for their daily work.
More information about the ffmpeg-user