[FFmpeg-user] Image extraction broken with ffmpeg, but not with mencoder. How can I fix this?

James Board jpboard2 at yahoo.com
Mon Sep 2 23:11:08 CEST 2013


>Sorry, but how can I reproduce that bug?


I run ffmpeg on a file to produce jpeg (or pnm or whatever) images as output.
At seemingly random locations in the sequence, some image files
are duplicated. This causes the frame numbers of those files
to be incorrect.  Why?  Because those are extra frames not present in
the original source video.  For example, let's say my input video
had frames like this
    A B C D E
When I use ffmpeg to extract jpeg images from the video, I might get
    A B C D D E
See the difference?  In one sequence, there is a single 'D'.  In the other
there are two 'D's.  That means there will be one extra image file in the
output.  Also, all file names, which hold the frame number, after 'D' will
then be incorrect.  And if you're video editor is based on ffmpeg to
do this, it will be incorrect.

This is a bug with ffmpeg.  If I run the same test with mencoder (actually mplayer),
then I don't see the bug.  For example, if the input video had frames like this
    A B C D E
When I use mencoder to extract jpeg images from the video, I get
    A B C D E
mencoder produces the correct files.


More information about the ffmpeg-user mailing list