[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:28:31 EEST 2019
The documenation to setpts says that the FR value may is only defined in
constant frame-rate videos.
If its does not exists in your mpeg file then you could try something
like 'setpts=N*30'
ps: the -vf argument in the first command in my previous message was
supposed to be showideo (so without the setpts part).
On 7/16/19 7:20 PM, Stéphane Chauveau wrote:
> 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.
>
>
>
>
>
>
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list