[FFmpeg-user] FFMPEG dropping the first two frames of segments generated through seeking

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Feb 5 14:18:20 EET 2018


2018-02-01 21:28 GMT+01:00 Fernando Peña D'Andrea <fernando.dandrea at gmail.com>:
> Hello, all!
>
> I'm trying to script-cut a 24 fps video and it gets close to the right
> thing, except for two missing frames at the beginning of every segment I
> cut with seeking.
>
> I've found out that index-frames (keyframes) could become an issue for
> seeking, so I first create an intermediate file with every frame as a index
> frame using this line:
>
> ffmpeg -i input.mov -c:v libx264 -g 1 -c:a copy intermediate.mp4
>
> Then I proceed to make a cut with this line. Notice I'm drawing some text
> on top of it:
>
> ffmpeg -hide_banner -y -i intermediate.mp4 -ss 00:00:02.083333333333
> -to 00:00:02.875000000000 -vf
> drawtext=fontfile=DroidSans.ttf:fontsize=48:text="segment2":fontcolor=yellow:box=1:boxborderw=16:boxcolor=black at 0.5:x=w/32:y=h/18
> output.mp4
>
> No matter the length of the segment, the first two frames get dropped.

Which of the two commands you provided drop two frames?

Please test current FFmpeg git head and provide the command line
you tested together with the complete, uncut console output.

Carl Eugen


More information about the ffmpeg-user mailing list