[FFmpeg-user] extract 1 image every 0.04s (25fps) whatever fps

Robert Krüger krueger at lesspain.de
Fri Mar 15 16:35:02 CET 2013

On Fri, Mar 15, 2013 at 4:01 PM, James Darnley <james.darnley at gmail.com> wrote:
> On 2013-03-15 14:47, Robert Krüger wrote:
>> Hi,
>> On Fri, Mar 15, 2013 at 2:35 PM, Sebastien WILLEMIJNS
>> <sebastien at willemijns.com> wrote:
>>> Hello,
>>> I'd like to extract one image every 0.04s (25 fps) whatever the fps...
>>> some images can be the same also if i extract a file with less than 25
>>> fps.
>> Why don't you convert the video to 25 FPS first and then dump every
>> frame in a second run? The first conversion will do exactly what you
>> want, i.e. duplicate/drop frames if necessary and then you will be
>> done in two ffmpeg runs. If you are worried about loss, use a lossless
>> format like ffv1 for the first conversion. Maybe someone even knows
>> how to to that in one step. I don't know if that is possible.
> You should be able to do this in one go.
> ffmpeg -i INPUT -r 25 -s cif d:\image%%06d.bmp
> -r 25 will convert to 25fps by duplicating or dropping frames.
> Then ffmpeg will write to a series of bitmap files starting with
> image000001.bmp and continue until the end.

*slap on the forehead*

of course, thanks.

I always forget that even when converting to still images it still is
just a video stream until it goes on disk. more coffee ...

More information about the ffmpeg-user mailing list