[FFmpeg-user] ffmpeg -i reports a video of length 03:17.53, but splitting into frames at 2 fps only results in one frame

Stéphane Chauveau stephane at chauveau-central.net
Tue Jul 16 20:20:05 EEST 2019


In your ffmpeg output, all frames have the same time=26:19:06.00 and 
that could indicate an overflow in the PTS (presentation time stamp) 
values probably because your video is part of a very long video stream.

Add the filter showinfo to your command.

ffmpeg -i input.mpg -vf  setpts='N*FR',showvideo  .......

That should give out information about each decoded video frame. 
Something like that

[Parsed_showinfo_0 @ 0x7f5e58cfe580] n: 122 pts:   3160 pts_time:3.16    
pos:   981301 fmt:yuv420p ...

In a proper video, pts and pts_time are expected to be strictly 
increasing. If this is not the case then you could try to reassign the 
pts using the setpts filter.

ffmpeg -i input.mpg  -vf  setpts='N*FR',showvideo   .......

I am not sure that 'N*FR' is the appropriate formula. The idea is to 
recreate a pts value that makes sense. (N=the frame numeber, FR=the 
framerate).

See http://ffmpeg.org/ffmpeg-all.html#setpts_002c-asetpts for the other 
variables that can be used in setpts.

PS: When I use setpts=10000 on a valid video, I only get 1 output jpeg 
file so that tells me that a constant pts could be the problem.










More information about the ffmpeg-user mailing list