[FFmpeg-user] Decimal times to frame numbers
amindfv at mailbox.org
amindfv at mailbox.org
Thu Aug 19 06:26:03 EEST 2021
How are frame numbers converted to and from decimal numbers of seconds in ffmpeg and related tools?
For example, given a file foo.mp4 at 24fps, when I run a command like:
ffmpeg -i foo.mp4 -t 0.72 bar.mp4
0.72 is a time between frame 18 (0.70833... seconds) and frame 19 (0.75 seconds).
In my tests, it seems that the number of seconds is rounded down, i.e. any value less than 0.75 is equivalent to the earlier frame.
Is this always true? Is this the best way to think about the decimal seconds<->frame number conversion? Is there any difference (e.g. in audio track duration) between saying 0.71 or 0.73 in the above?
Thanks,
Tom
More information about the ffmpeg-user
mailing list