[FFmpeg-user] Extract all keyframes
Moritz Barsnick
barsnick at gmx.net
Mon Jun 30 11:21:52 CEST 2014
On Sun, Jun 29, 2014 at 23:01:31 -0400, Matthew Bondy wrote:
> My command(s):
> ffmpeg -i my_input_file.avi -r 17 -f image2 image%4d.bmp
> or (before I started specifying a frame rate of 17 fps):
> ffmpeg -i my_input_file.avi -f image2 image%4d.bmp4
Carl Eugen also specifically asked for _the console output_ of your
commands. It helps us to identify what ffmpeg is making of your input.
Kindly for both cases, though your latter case should just work, and is
the one of more interest.
> I have never tried removing image2 and I have no idea what it does. I did
> try to google this before and made no headway.
"-f image2" forces the output to be single images. The format is
guessed via the extension given (I hope the "4" in "bmp4" is a typo) or
apparently defaults to JPEG otherwise.
> At this point all I need to do is figure out how to get rid of those
> duplicate frames.
Providing an input sample would be a good idea as well, just in case.
ffmpeg shouldn't be duplicating anything by itself. Either the creating
SW is already doing that, or you are fooling ffmpeg by telling it to
interpret the input as X fps. My guess is that your measurement systems
happens to create about 17.1 fps, but at a variable frame rate (like
whenever an image happens to be ready). ffmpeg would usually retain
that frame rate and re-use the timestamps, if the output format allows.
Moritz
More information about the ffmpeg-user
mailing list