FORUMS: list search recent posts

ffmpeg extracts wrong image

COW Forums : Compression Techniques

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Pandi Ganesh
ffmpeg extracts wrong image
on Sep 13, 2012 at 3:59:16 pm

I am converting a HQ mp4 to flv with the following cmd.

ffmpeg -re -i test.mp4 -acodec copy -vcodec copy -f flv test.flv

I am extracting the frame for 00:01:00 by the below cmd.

ffmpeg -ss 00:01:00 -an -i test.flv test.jpg

The resulting test.jpg is actually the image @ 00:02:50

So What I am doing wrong here?

Return to posts index

Michael Rampe
Re: ffmpeg extracts wrong image
on Sep 16, 2012 at 9:42:45 pm

Hi Pandi,

The behavior of the -ss option varies depending on where it is put in the command line.

If it is placed before the input (as in your case) it will begin decoding from this time. The result with many codecs is that is delivers the first I frame it encounters as it cannot decode the frames before that. This method is very fast but not frame accurate.

If it is placed after the input like:
ffmpeg -an -i test.flv -ss 00:01:00 test.jpg will decode all of the frames and deliver a frame accurate result. As this requires decoding all frames, it is slower and this is compounded by how far you are seeking into the material. (ie. setting to 59.59:00 will be very slow as it has to decode a full hour of frames just to get the one you want.)


Return to posts index

Mika Gands
Re: ffmpeg extracts wrong image
on Sep 17, 2012 at 3:18:42 pm

Hi Michael,

Thank you very much for your reply. The information which you gave is very useful to me.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved