[gst-devel] Streaming H.264 / Vorbis

cammille at polytech.unice.fr cammille at polytech.unice.fr
Tue Mar 24 10:08:50 CET 2009


Hi,

I would like to stream the video taken from my webcam and the sound taken
from my micro.

I tried that :

To send on Windows :
--------------------

gst-launch -v gstrtpbin name=rtpbin \
    dshowvideosrc ! decodebin name=dec \
    dec. ! queue ! x264enc byte-stream=true bitrate=300 ! rtph264pay !
rtpbin.send_rtp_sink_0 \
    rtpbin.send_rtp_src_0 ! udpsink port=5000 host=192.168.X.X ts-offset=0
name=vrtpsink \
    rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=192.168.X.X sync=false
async=false name=vrtcpsink \
    udpsrc port=5005 name=vrtpsrc ! rtpbin.recv_rtcp_sink_0 \
    dshowaudiosrc ! queue ! audioresample ! audioconvert ! alawenc !
rtppcmapay ! rtpbin.send_rtp_sink_1 \
    rtpbin.send_rtp_src_1 ! udpsink port=5002 host=192.168.X.X ts-offset=0
name=artpsink \
    rtpbin.send_rtcp_src_1 ! udpsink port=5003 host=192.168.X.X sync=false
async=false name=artcpsink \
    udpsrc port=5007 name=artpsrc ! rtpbin.recv_rtcp_sink_1



To receive on Linux :
---------------------

gst-launch -v gstrtpbin name=rtpbin latency=200 \
     udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
port=5000 ! rtpbin.recv_rtp_sink_0 \
       rtpbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \
     udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
         rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=192.168.X.X
sync=false async=false \
     udpsrc
caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
port=5002 ! rtpbin.recv_rtp_sink_1 \
       rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample !
alsasink \
     udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
         rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=192.168.X.X
sync=false async=false


This works well.

So I tried to encode with Vorbis and not Alaw.

I tried that :
To send on Windows :
--------------------

gst-launch -v gstrtpbin name=rtpbin \
    dshowvideosrc ! decodebin name=dec \
    dec. ! queue ! x264enc byte-stream=true bitrate=300 ! rtph264pay !
rtpbin.send_rtp_sink_0 \
    rtpbin.send_rtp_src_0 ! udpsink port=5000 host=192.168.X.X ts-offset=0
name=vrtpsink \
    rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=192.168.X.X sync=false
async=false name=vrtcpsink \
    udpsrc port=5005 name=vrtpsrc ! rtpbin.recv_rtcp_sink_0 \
    dshowaudiosrc ! queue ! audioresample ! audioconvert ! vorbisenc !
rtpvorbispay ! rtpbin.send_rtp_sink_1 \
    rtpbin.send_rtp_src_1 ! udpsink port=5002 host=192.168.X.X ts-offset=0
name=artpsink \
    rtpbin.send_rtcp_src_1 ! udpsink port=5003 host=192.168.X.X sync=false
async=false name=artcpsink \
    udpsrc port=5007 name=artpsrc ! rtpbin.recv_rtcp_sink_1


To receive on Linux :
---------------------

gst-launch -v gstrtpbin name=rtpbin latency=200 \
     udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
port=5000 ! rtpbin.recv_rtp_sink_0 \
       rtpbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \
     udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
         rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=192.168.X.X
sync=false async=false \
     udpsrc
caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)VORBIS"
port=5002 ! rtpbin.recv_rtp_sink_1 \
       rtpbin. ! rtpvorbisdepay ! vorbisdec ! audioconvert ! audioresample
! alsasink \
     udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
         rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=192.168.X.X
sync=false async=false


And I have this error :
WARNING: from element
/GstPipeline:pipeline0/GstRtpVorbisDepay:rtpvorbisdepay0: Could not decode
stream.
Additional debug info:
gstrtpvorbisdepay.c(605): gst_rtp_vorbis_depay_process ():
/GstPipeline:pipeline0/GstRtpVorbisDepay:rtpvorbisdepay0:
Could not switch codebooks



What can I do to resolve this problem ?

Thank you.





More information about the gstreamer-devel mailing list