[FFmpeg-user] Controlling Numbering of Extracted Still Frames?

Sam Logan shapableline at gmail.com
Tue Jun 17 03:34:21 CEST 2014

On 6/14/14, Moritz Barsnick <barsnick at gmx.net> wrote:
> So this should do the right thing for you:
> ffmpeg -i "Foobar.mp4" -f image2 -start_number 0 "Frame%05d.png"
> And in this case, you can continue to omit the implicit muxer:
> ffmpeg -i "Foobar.mp4" -start_number 0 "Frame%05d.png"
> Moritz

Thanks, Moritz. That was helpful.

> P.S.: Despite being a programmer, it often riddles me why anyone would
>       like to start counting with 0. ;-)

I need it to sync properly in frame-specific editing because the value
n for the enable and select options in filters counts the first frame
as 0, not as 1.

Also, being able to arbitrarily control the initial/starting counter
value is helpful if we are extracting frames from the middle rather
than the start of the video, if we want to sync the numbering of the
extracted frames to the count of frames within the whole video.

More information about the ffmpeg-user mailing list