[FFmpeg-user] ffmpeg -i reports a video of length 03:17.53, but splitting into frames at 2 fps only results in one frame
Gyan
ffmpeg at gyani.pro
Tue Jul 16 21:59:59 EEST 2019
On 17-07-2019 12:08 AM, Stéphane Chauveau wrote:
> It seems that the pts value depends of the stream time_base so the
> formula 'N*30' is probably not valid in the general case.
>
> So if FR is not available in you meg file then I propose the following:
>
> Find the time_base value with
>
> ffprobe -hide_banner -show_streams -select_streams v input.mpg | grep
> time_base
>
> For example, that could be 1/1000
>
> Then use the formula 'N/(30*(1/1000))' assuming fps=30 and
> time_base=1/1000
>
> If you get the right formula then the frame n=30 should have
> pts_time=1.00 in the showinfo dump.
The constant TB is available, so to retime the stream as a 30 fps
stream, it would be
-vf setpts=N/30/TB
If a framerate value has been set then
-vf setpts=N/FR/TB
Gyan
More information about the ffmpeg-user
mailing list