Streamig ogg to icecast receiving flow from RTP

gennaro88 gen.sarnataro at gmail.com
Thu Mar 28 12:10:48 PDT 2013


Hello
I've to receive audio-video flows from rtpbin then mux them in an ogg
envelope and stream them to icecast with shout2send.
I designed two pipeline one is for the sender another for the receiver and
the general architecture is this

sender ----->  receiver --------> ICECAST

the my two pipeline

sender

gst-launch gstrtpbin name=rtpbin \
        v4l2src ! queue ! theoraenc ! rtptheorapay ! rtpbin.send_rtp_sink_0
\
                  rtpbin.send_rtp_src_0 ! udpsink port=5000 host=127.0.0.1                          
\
                  rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=127.0.0.1
sync=false async=false    \
                  udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0                          
\
        audiotestsrc ! queue ! vorbisenc ! rtpvorbispay !
rtpbin.send_rtp_sink_1                   \
                  rtpbin.send_rtp_src_1 ! udpsink port=5002 host=127.0.0.1                          
\
                  rtpbin.send_rtcp_src_1 ! udpsink port=5003 host=127.0.0.1
sync=false async=false    \
                  udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1


receiver

gst-launch  gstrtpbin name=rtpbin                                          \
	oggmux name="mux"\
    udpsrc caps="application/x-rtp, media=(string)video,
clock-rate=(int)90000, encoding-name=(string)THEORA,
sampling=(string)YCbCr-4:2:0, width=(string)640, height=(string)480,
configuration=(string)\"AAAAAazWoQqZAio6gHRoZW9yYQMCAQAoAB4AAoAAAeAAAAAAAB4AAAABAAABAAABAAAAAMDAgXRoZW9yYSsAAABYaXBoLk9yZyBsaWJ0aGVvcmEgMS4xIDIwMDkwODIyIChUaHVzbmVsZGEpAAAAAIJ0aGVvcmG+zSj3uc1rGLWpSUoQc5zmMYxSlKQhCDGMYhCEIQhAAAAAAAAAAAAAEfThZC5VSbR2EvVwtJhrlaKpQJZIodBH05m41mQwF0slUpEslEYiEAeDkcDQZDEWiwVigTCURiEQB4OhwMhgLBUJhIIg8GgwFPuZF9aVVVQUEtLRkZBQTw8NzcyMi0tLSgoKCMjIx4eHh4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pKqUBGLKxxv2SuRMonNtX/wyxaZl1rC/r0ieSQgA\\=\\=\",
delivery-method=(string)inline, ssrc=(uint)2163788205, payload=(int)96,
clock-base=(uint)3483838268, seqnum-base=(uint)70" \
            port=5000 ! rtpbin.recv_rtp_sink_0                               
\
        rtpbin. ! rtptheoradepay ! queue ! mux.                   \
     udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0                              
\
     rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=127.0.0.1 sync=false
async=false        \
    udpsrc caps="application/x-rtp, media=(string)audio,
clock-rate=(int)44100, encoding-name=(string)VORBIS,
encoding-params=(string)1,
configuration=(string)\"AAAAAb22OQzuAh5bAXZvcmJpcwAAAAABRKwAAAAAAACAOAEAAAAAALgBA3ZvcmJpcy0AAABYaXBoLk9yZyBsaWJWb3JiaXMgSSAyMDEwMTEwMSAoU2NoYXVmZW51Z2dldCkBAAAAGgAAAERFU0NSSVBUSU9OPWF1ZGlvdGVzdCB3YXZlAQV2b3JiaXMiQkNWAQBAAAAkcxgqRqVzFoQQGkJQGeMcQs5r7BlCTBGCHDJMW8slc5AhpKBCiFsogdCQVQAAQAAAh0F4FISKQQghhCU9WJKDJz0IIYSIOXgUhGlBCCGEEEIIIYQQQgghhEU5aJKDJ0EIHYTjMDgMg+U4+ByERTlYEIMnQegghA9CuJqDrDkIIYQkNUhQgwY56ByEwiwoioLEMLgWhAQ1KIyC5DDI1IMLQoiag0k1+BqEZ0F4FoRpQQghhCRBSJCDBkHIGIRGQViSgwY5uBSEy0GoGoQqOQgfhCA0ZBUAkAAAoKIoiqIoChAasgoAyAAAEEBRFMdxHMmRHMmxHAsIDVkFAAABAAgAAKBIiqRIjuRIkiRZkiVZkiVZkuaJqizLsizLsizLMhAasgoASAAAUFEMRXEUBwgNWQUAZAAACKA4iqVYiqVoiueIjgiEhqwCAIAAAAQAABA0Q1M8R5REz1RV17Zt27Zt27Zt27Zt27ZtW5ZlGQgNWQUAQAAAENJpZqkGiDADGQZCQ1YB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pZRSSiklhBBCCaWUUkoppYQQSiillFJKKaWUEEIppZRSSimllBJCKKWUUkoppZSSQimllFJKKaWUUlIopZRSSimllFJKCaWUUkoppZSUUkkFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAQAAAFMRWU4mdQcwxZ6khCDGoqUJKKYYxQ8ogpilTCiGFIXOKIQKhxVZLxQAAABAEAAgICQAwQFAwAwAMDhA+B0EnQHC0AQAIQmSGSDQsBIcHlQARMRUAJCYo5AJAhcVF2sUFdBnggi7uOhBCEIIQxOIACkjAwQk3PPGGJ9zgBJ2iUgcBAAAAAHAAAA8AAMcFEBHRHEaGxgZHh8cHSEgAAAAAAMgAwAcAwCECREQ0h5GhscHR4fEBEhIAAAAAAAAAAAAEBAQAAAAAAAIAAAAEBA\\=\\=\",
ssrc=(uint)2815720581, payload=(int)96, clock-base=(uint)1129181638,
seqnum-base=(uint)14414" \
            port=5002 ! rtpbin.recv_rtp_sink_1                               
\
        rtpbin. ! rtpvorbisdepay ! queue ! mux.                          \
     udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1                              
\
     rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=127.0.0.1 sync=false
async=false \
mux. ! shout2send ip=127.0.0.1 port=8000 mount=/mount.ogg 


caps for video and audio, as a member suggested  here
<http://gstreamer-devel.966125.n4.nabble.com/problems-sending-a-theora-video-through-rtp-streaming-td969269.html>  
,are necessary.

the problem is that this configuration doesn't work.
it gives me the following error

notification: This doesn't look like a Speex file
notification: Speex header too small
ERRORE: dall'elemento /GstPipeline:pipeline0/GstShout2send:shout2send0:
Impossibile scrivere sulla risorsa.
Informazioni di debug aggiuntive:
gstshout2.c(687): gst_shout2send_render ():
/GstPipeline:pipeline0/GstShout2send:shout2send0:
shout_send() failed: Socket error

I'm going crazy because the only way to make it works is to decode and
encode again flows after depayloading having a configuration like this

Video from RTPBIN --->>  rtptheoradepay ---- theoradec ---- theoraenc ----
queue ----

                                                                                                                      
---- oggmux ---- shout2send --->to Icecast2

Audio from RTPBIN --->> rtpvorbisdepay ---- vorbisdec ---- vorbisenc ----
queue ----

but the two transcoding operation are useless.
i'm working using the C library for Gstreamer for my application with the
same result... 
i hope someone can help me.

regards
Gennaro

ps. the caps are relative to my computer. if you need them try to launch the
sender pipe in the verbose way (-v) and copy the caps of the right udpsink.






--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streamig-ogg-to-icecast-receiving-flow-from-RTP-tp4659306.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list