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

James Darnley james.darnley at gmail.com
Fri Mar 15 16:01:18 CET 2013


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20130315/38516469/attachment.asc>


More information about the ffmpeg-user mailing list