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

James Board jpboard2 at yahoo.com
Tue Sep 3 16:41:53 CEST 2013

>In the future, maybe you will remember you should never work with frame

>numbers but always with timestamps.

1: I'm using ffmpeg to separate a video file into a sequence of frames.  In
doing so, ffmpeg generates extra frames.  This is the problem.  Whether or
not I used frame numbers, or timestamps, this would still be the case.

2: Ultimately I must use frame numbers because I need to know which
frames (which are stored as distinct files) to include and which not to include.  

3: Timestamps are floating-point numbers, and floating-point numbers are not exact.
Frame numbers are integers and integers are exact. I asked previously for a 
formula to map timestamps to frame numbers and didn't get an answer.  Here's
the issue: If I try to use a time stamp that falls midway between two frames, which frame will ffmpeg
select?  What if I try to use a timestamp that is .000001 less than the timestamp of 
the frame I want?  Will ffmpeg round to the nearest frame, or round down to the previous
frame, or round up to the next frame, or does ffmpeg even do anything consistent?

More information about the ffmpeg-user mailing list