[gst-devel] video playback fast

Mark Nauwelaerts manauw at skynet.be
Mon Sep 18 22:06:39 CEST 2006


Felipe Contreras wrote:
> On 9/18/06, Pavan Kumar Patale <pavanpatale at hotmail.com> wrote:
>> Hi,
>>
>> I tried to create simple avi file by caputring raw-video from my ibm webcam
>> using pipeline
>> $gst-launch-0.8 -v avimux name=mux ! filesink location=test.avi v4lsrc !
>> ffmpegcolorspace ! mux.
>>
>> When i try to playback using the pipeline
>> gst-launch-0.8 -v filesrc location=test.avi ! avidemux ! ffmpegcolorspace !
>> xvimagesink
>>
>> The video plays back at a very faster rate.
>>
>> The verbose mode shows framerate=25 while both recording as well as
>> playback.
>>
>> Could anyone pls let me know what could be problem ?.  Same is with
>> gstreamer-0.10 also.
> 
> The last time I tried avimux with a camera element I got the same
> issue. I think there's a bug with avimux's timestamp handling. AFAICR
> matroskamux didn't have this issue.
> 

Well, it's sort of good news that both playing and recording show the same frame
rate, in the sense that avimux and avidemux agree :)

Seriously, avimux can't really "handle" timestamps because avi files (typically)
don't store the timestamps of individual buffers, only the framerate is
recorded in the header.  So, avimux reads the framerate from the caps, stores
this in the header, and avidemux re-constructs the framerate from this and
computes timestamps for the buffers based on this.

A matroska file, however, can hold timstamps for each frame, which is what
matroskademux and matroskamux make use of.

As such, another possible explanation is; during recording, some upstream
element produces correct timestamps (so matroska(de)mux OK), but incorrect
framerate, so avi(de)mux get fooled ??
This could be tested by using some element, e.g. identity, to see what is
happening with timestamps.

Regards,
Mark




More information about the gstreamer-devel mailing list