[FFmpeg-user] Why does fps == 1 for a webm videos?

Misha Penkov misha.penkov at gmail.com
Thu Mar 21 15:38:59 CET 2013


Carl,

Thank you for helping me with this.

On 21 March 2013 22:34, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Misha Penkov <misha.penkov <at> gmail.com> writes:
>
> >
> > ~/git/video-signature/gitignore/cz_clusters/0003$ ffmpeg -y
> > -i 8szDFB30azA.webm -vcodec rawvideo -acodec none -s qcif test.yuv
>
> > The problem is that test.yuv now contains many more frames that there
> > really were in the webm file, with a majority of those frames being
> > duplicates.  This is not what I want -- I want to extract all the frames
> > from the webm file as they are, without any duplicates.
>
> Use -vsync 0 to avoid the duplicates.
>

OK, that gets rid of the duplicates.  Why is this option required in this
particular case?  Is something special about this particular webm file, or
webm files in general?


> > If I play the resulting file (ffplay test.yuv -s qcif), it plays back
> > approximately 30 times slower than the original file:
>
> The default for yuv is 25fps, 1k would allow correct playback
> (but your hardware will not support it).
>
> Generally, you cannot test fps or A/V sync with a yuv file.
>
> It may help to find a solution for your problem (assuming you
> have one) if you describe your use case: I find it unlikely
> that your usecase is to output rawvideo files, or is it?
>

Unfortunately, my use case actually is to output raw video.  I'm passing it
into an in-house application that that only accepts raw video.  The app
performs shot segmentation, so it needs to be accurate about frame numbers.
 Specifically, I want the frame numbers in the YUV file to match the frame
numbers in the original video.

My options are to either 1) work this out; 2) rewrite the in-house app to
use the ffmpeg library to read webm directly; or 3) don't use webm, since
all other formats seem to work OK.  I'm planning to do 2) in the long run,
but really don't have time for it right now.  3) works most of the time,
when I can get some other format instead of webm (but not all the time).
 I'm most interested in option 1).

It seems that -vsync 0 fixes the problem of duplicate frames.  Could it
cause the frame numbers in the YUV and webm files to no longer match up?

Cheers,
Michael


More information about the ffmpeg-user mailing list