[FFmpeg-user] Error extracting images from .mov with timecode

Mike Scheutzow mike.scheutzow at alcatel-lucent.com
Fri May 20 14:34:55 CEST 2011






Dario wrote:
> Hi,
> 
> We have a .mov file which has a timecode track in it, which seems to be
> causing ffmpeg lots of fits when extracting jpegs out of it. I'm using the
> latest windows binary found on http://ffmpeg.zeranoe.com/builds/
> 
> I first tried extracting the jpegs out like this:
> 
> ffmpeg.exe -i inputmovie.mov -y Output\Image%06d.jpg
> 
> When running the above, I get the first frame of video duplicated about 2700
> times, then I get *948* frames of the actual video.
> 
> ...
> 
> As you can see there are *948* frames in the video (as is confirmed by
> Quicktime). In addition, the start_time in the timecode stream is
> -108.695000.
> 
> So, I then tried to pass the timecode start_time value as the -ss value like
> so:
> 
> ffmpeg.exe -i inputmovie.mov -ss 108.695 -y Output\Image%06d.jpg
> 
> However, this only extracts *947* jpegs. I also tried passing the duration
> as the -t value, but it didn't help. I am stuck either getting tons of
> duplicate images or getting one frame less than the number of frames in the
> video.
> 
> I also tried the -vcodec copy option instead of specifying the -ss option,
> which worked wonderfully and extracted 948 frames, except that it only seems
> to work on motion jpegs and no other codecs... my utility needs to work on
> any type of codec ffmpeg supports.
> 
> So, I'm stuck. I'm wondering if this is a bug or if I'm just using ffmpeg
> improperly. Any help would be appreciated.
> 
> Thanks,
> Dario

Try '-vsync 0', placed before the -i option. This tells ffmpeg not to 
rate match (i.e do not duplicate or drop any video frames.)

 From what I can tell, -ss is not reliable for most of ffmpeg's codecs.

Mike Scheutzow



More information about the ffmpeg-user mailing list