My bambuser client doesn't like dv1394 + alsasrc

Mathias Gyllengahm lunarshuttle at gmail.com
Fri Feb 18 07:06:39 PST 2011


Hi all!

Hope I'm posting this to the right place... I've made a Bambuser
client that works fine with audio when using a v4l2src, but it simply
doesn't work when trying to get both dv1394src and alsasrc together,
and I'm feeling pretty clueless right now...

I'm feeding video to ffmpeg via a fifo in order to send it to the
server via rtmp - so this one actually works:

/usr/local/bin/gst-launch-0.10 -v
--gst-plugin-path=/usr/local/lib/gstreamer-0.10 \
    --gst-debug=alsa*:5,fsink*:5 \
    dv1394src port=0 \
    ! stamp sync-margin=1 sync-interval=1 silent=false \
    ! dvdemux \
    ! ffdec_dvvideo \
    ! ffmpegcolorspace \
    ! deinterlace \
    ! ffmpegcolorspace \
    ! videoscale \
    ! videorate \
    ! video/x-raw-yuv,width=320,height=240,framerate=30/1,format=\(fourcc\)Y42B
\
    ! queue \
    ! ffmpegcolorspace \
    ! y4menc \
    ! filesink location=outfile.yuv sync=true

However, putting alsa into play makes the whole thing unstable. The
closest thing I've gotten to work is to first encode everything to
theora-vorbis ogg (yes, I know, it has to be reencoded to flv then,
which sucks - but encoding to a flv file directly makes ffmpeg bail
out completely on first alsa buffer underrun), but it fails with video
locking up a really long time, not getting back on track for 30 secs
or so, if ever. Since everything works smooth without audio and when
using USB webcam, I'm thinking clock synchronization issues.
Suggestions, anyone?

Here's the problematic setup. May run from anywhere to 10 mins to 10 seconds:
/usr/local/bin/gst-launch-0.10 -v
--gst-plugin-path=/usr/local/lib/gstreamer-0.10 \
    --gst-debug=alsa*:5,fsink*:5 \
    dv1394src port=0 \
    ! stamp sync-margin=1 sync-interval=1 silent=false \
    ! dvdemux \
    ! ffdec_dvvideo \
    ! ffmpegcolorspace \
    ! deinterlace \
    ! ffmpegcolorspace \
    ! videoscale \
    ! videorate \
    ! video/x-raw-yuv,width=320,height=240,framerate=30/1,format=\(fourcc\)Y42B
\
    ! queue \
    ! ffmpegcolorspace \
    ! theoraenc bitrate=312 \
    ! oggmux name=mux \
    alsasrc device=hw:0,0 \
    ! audiorate \
    ! audio/x-raw-int,rate=44100,channels=2,depth=16 \
    ! queue2 use-buffering=true use-rate-estimate=false \
    ! audioconvert \
    ! vorbisenc \
    ! mux. mux. \
    ! filesink location=outfile.ogg sync=true

BR,
Mathias
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list