Gstreamer synch/drop problems.

Jaka Hudoklin jakahudoklin at gmail.com
Thu Sep 15 02:22:37 PDT 2011


Hello!

I have the following script to start stream and record to avi file.
gst-launch-0.10 \
        v4l2src device=/dev/video0 ! queue ! ffmpegcolorspace ! tee
name=raw_camera \
        v4l2src device=/dev/video1 ! queue ! ffmpegcolorspace ! tee
name=raw_camera2 \
        raw_camera. ! videorate ! \
                video/x-raw-yuv,framerate=20/1 ! tee name=t_video1 \
        raw_camera2. ! videoscale ! video/x-raw-yuv,width=133,height=100 !
videorate ! \
                video/x-raw-yuv,framerate=20/1 ! tee name=t_video2 \
        multifilesrc location="logo.png" caps="image/png,framerate=1/1" !
pngdec ! freeze ! alpha method=0 alpha=1 ! ffmpegcolorspace$
        videomixer name=pip sink_0::xpos=0 sink_0::ypos=0 sink_0::zorder=0
sink_1::xpos=449 sink_1::ypos=334 sink_1::alpha=0.8 sink_1$
        alsasrc device=hw:0,0 ! queue !
audio/x-raw-int,rate=44100,depth=16,channels=2,signed$
        t_video1. ! queue ! pip.sink_0 \
        t_video2. ! queue ! pip.sink_1 \
        t_logo. ! queue ! pip.sink_2 \
        t_video. ! queue ! vp8enc ! queue ! avimux name=mux ! filesink
location=test.avi sync=false \
        t_audio. ! audioconvert ! alawenc ! .mux

The problem is with mux component, which doesn't want to mix audio and video
together and just drops frames. If i change last two lines to:
        t_video. ! queue ! vp8enc ! queue ! filesink location=test.vid
sync=false \
        t_audio. ! audioconvert ! alawenc ! filesink location=test.snd
sync=false
everything works fine, except that i don't get muxed audio and video. I can
see in log that videframes have timestamps starting from 0, but audio has
timestamps, from some higher numbers. Could this be the problem? Does
anybody have any idea what could be the problem and why avimux doesn't mix
streams? It's clearly problem with gstreamere and not hardware, because in
case no. 2 cpu is not nearly fully loaded.

Have a nice day, Jaka Hudoklin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110915/b07ea278/attachment.html>


More information about the gstreamer-devel mailing list