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

James Board jpboard2 at yahoo.com
Thu Sep 5 18:51:01 CEST 2013


>> 1: I'm using ffmpeg to separate a video file into a sequence of frames.
>
>You should probably not be doing that in the first place, since this is
>losing information.

But I have a unique and unusual requirement.  I want to do frame-exact editing. 
I split the file into a sequence of frames so I know at exactly which
frame the cuts should begin and at which frame they should end.

>> 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.
>
>That is completely untrue. A frame is identified by its timestamp just as
>well, and in fact better, than any kind of "frame number".

Okay good.  All I need is a formula for determining what the timestamp
is a for a specific frame (and vice versa).  What is that formula?
  
>> 3: Timestamps are floating-point numbers, and floating-point numbers are
>> not exact.
>
>That is untrue. 

Really?  You might want to rewrite the Wikipedia page on floating-point numbers:
    http://en.wikipedia.org/wiki/Floating-point_arithmetic
Those guys think floating-point numbers aren't 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
>
>You did not get an answer because it does not exist.


Bummer.   You had my hopes up earlier when you said each frame can
be identified by it's timestamp.  So which is it?

Either way, unless I can uniquely and consistently determine the frame 
number from the timestamp, and also determine the timestamp from the
frame number, I don't see how I can do frame exact editing with time stamps.
That's why I use frame numbers.

>  Nicolas George

Thnaks for explaining things.


More information about the ffmpeg-user mailing list