<div dir="ltr">Hi,<div><br></div><div>I have created a pipeline based on the gstreamer test examples:</div><div><a href="http://mandrillapp.com/track/click/30003446/cgit.freedesktop.org?p=eyJzIjoiN243MURKMkJqZUpkS1FDTEdlLWtIOWg4QVE0IiwidiI6MSwicCI6IntcInVcIjozMDAwMzQ0NixcInZcIjoxLFwidXJsXCI6XCJodHRwOlxcXC9cXFwvY2dpdC5mcmVlZGVza3RvcC5vcmdcXFwvZ3N0cmVhbWVyXFxcL2dzdC1wbHVnaW5zLWdvb2RcXFwvdHJlZVxcXC90ZXN0c1xcXC9leGFtcGxlc1xcXC9ydHBcIixcImlkXCI6XCIyZTExNTA5ZWIyODY0ODVjODEyYmQ1YWNjYWRiNTVlYlwiLFwidXJsX2lkc1wiOltcImNjZWM5NGZhMWY4NjExNDA1MjhjNjJiODQ0NjkxZTgzMjY3NzBmOTVcIl19In0">http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp</a><br></div><div><br></div><div>My use case is I am using a UDP pipeline to create an A/V stream which I can use to feed many UDP clients for other pipelines.</div><div><br></div><div>The server works, and transmits both audio and video (h264 and AAC) based on the above example.</div><div><br></div><div>My client however, only work when receive EITHER the audio, OR the video - but not both at the same time.</div><div><br></div><div>The client is sending the A/V up to an RTMP server and this fails when the client script is receiving both audio and video. If I choose to dump the muxed FLV to disk instead of rtmpsink - then also there are no problems.</div><div><br></div><div>My error during failure:</div><div>
<p class=""><span class=""><font face="monospace, monospace" size="1">ERROR: WriteN, RTMP send error 32 (136 bytes)<br></font></span><span style="font-family:monospace,monospace;font-size:x-small">ERROR: WriteN, RTMP send error 32 (42 bytes)<br></span><span style="font-family:monospace,monospace;font-size:x-small">ERROR: WriteN, RTMP send error 9 (42 bytes)<br></span><span style="font-family:monospace,monospace;font-size:x-small">ERROR: from element /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0: Could not write to resource.<br></span><span style="font-family:monospace,monospace;font-size:x-small">Additional debug info:<br></span><span style="font-family:monospace,monospace;font-size:x-small">gstrtmpsink.c(258): gst_rtmp_sink_render (): /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:<br></span><span style="font-family:monospace,monospace;font-size:x-small">Failed to write data</span></p></div><div><br></div><div><br></div><div>My script is below. Notice I have create 2 variables (AUDIO, and VIDEO) so that I can turn either of them off for my testing.</div><div><br></div><div><br></div><div><br></div><div><div><font face="monospace, monospace">#!/bin/sh</font></div><div><font face="monospace, monospace">#</font></div><div><font face="monospace, monospace"># A simple RTP receiver</font></div><div><font face="monospace, monospace">#</font></div><div><font face="monospace, monospace"># receives H264 encoded RTP video on port 5000, RTCP is received on port 5001.</font></div><div><font face="monospace, monospace"># the receiver RTCP reports are sent to port 5005</font></div><div><font face="monospace, monospace"># receives alaw encoded RTP audio on port 5002, RTCP is received on port 5003.</font></div><div><font face="monospace, monospace"># the receiver RTCP reports are sent to port 5007</font></div><div><font face="monospace, monospace">#</font></div><div><font face="monospace, monospace"># .-------. .----------. .---------. .---------. .-----------.</font></div><div><font face="monospace, monospace"># RTP |udpsrc | | rtpbin | |h264depay| |h264parse| | flvmux |</font></div><div><font face="monospace, monospace"># port=5000 | src->recv_rtp recv_rtp->sink src->sink src->sink |</font></div><div><font face="monospace, monospace"># '-------' | | '---------' '---------' '-----------'</font></div><div><font face="monospace, monospace"># | |</font></div><div><font face="monospace, monospace"># | | .-------.</font></div><div><font face="monospace, monospace"># | | |udpsink| RTCP</font></div><div><font face="monospace, monospace"># | send_rtcp->sink | port=5005</font></div><div><font face="monospace, monospace"># .-------. | | '-------' sync=false</font></div><div><font face="monospace, monospace"># RTCP |udpsrc | | | async=false</font></div><div><font face="monospace, monospace"># port=5001 | src->recv_rtcp |</font></div><div><font face="monospace, monospace"># '-------' | |</font></div><div><font face="monospace, monospace"># | |</font></div><div><font face="monospace, monospace"># .-------. | | .---------. .--------. .-------------.</font></div><div><font face="monospace, monospace"># RTP |udpsrc | | rtpbin | |mp4adepay| |mp4parse| | flvmux |</font></div><div><font face="monospace, monospace"># port=5002 | src->recv_rtp recv_rtp->sink src->sink src->sink |</font></div><div><font face="monospace, monospace"># '-------' | | '---------' '--------' '-------------'</font></div><div><font face="monospace, monospace"># | |</font></div><div><font face="monospace, monospace"># | | .-------.</font></div><div><font face="monospace, monospace"># | | |udpsink| RTCP</font></div><div><font face="monospace, monospace"># | send_rtcp->sink | port=5007</font></div><div><font face="monospace, monospace"># .-------. | | '-------' sync=false</font></div><div><font face="monospace, monospace"># RTCP |udpsrc | | | async=false</font></div><div><font face="monospace, monospace"># port=5003 | src->recv_rtcp |</font></div><div><font face="monospace, monospace"># '-------' '----------'</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"># the destination machine to send RTCP to. This is the address of the sender and</font></div><div><font face="monospace, monospace"># is used to send back the RTCP reports of this receiver. If the data is sent</font></div><div><font face="monospace, monospace"># from another machine, change this address.</font></div><div><font face="monospace, monospace">DEST=127.0.0.1</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"># this adjusts the latency in the receiver</font></div><div><font face="monospace, monospace">LATENCY=0</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"># the caps of the sender RTP stream. This is usually negotiated out of band with</font></div><div><font face="monospace, monospace"># SDP or RTSP. normally these caps will also include SPS and PPS but we don't</font></div><div><font face="monospace, monospace"># have a mechanism to get this from the sender with a -launch line.</font></div><div><font face="monospace, monospace">VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"</font></div><div><font face="monospace, monospace">AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)44100,encoding-name=(string)MP4A-LATM,config=(string)40002410"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">VIDEO_DEC="rtph264depay"</font></div><div><font face="monospace, monospace">AUDIO_DEC="rtpmp4adepay"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">VIDEO_SINK="mux."</font></div><div><font face="monospace, monospace">AUDIO_SINK="mux."</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">AUDIO=1</font></div><div><font face="monospace, monospace">VIDEO=1</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">GST_COMMAND="gst-launch-1.0 -v rtpbin name=rtpbin \</font></div><div><font face="monospace, monospace"> flvmux name=mux ! rtmpsink location=rtmp://IP_ADDRESS:1935/live"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">if [ $VIDEO -eq 1 ]</font></div><div><font face="monospace, monospace">then</font></div><div><font face="monospace, monospace"> GST_COMMAND="$GST_COMMAND udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \</font></div><div><font face="monospace, monospace"> rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK \</font></div><div><font face="monospace, monospace"> udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \</font></div><div><font face="monospace, monospace"> rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=$DEST sync=false async=false"</font></div><div><font face="monospace, monospace">fi</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">if [ $AUDIO -eq 1 ]</font></div><div><font face="monospace, monospace">then</font></div><div><font face="monospace, monospace"> GST_COMMAND="$GST_COMMAND udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \</font></div><div><font face="monospace, monospace"> rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \</font></div><div><font face="monospace, monospace"> udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \</font></div><div><font face="monospace, monospace"> rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=$DEST sync=false async=false"</font></div><div><font face="monospace, monospace">fi</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">exec $GST_COMMAND</font></div></div><div><br></div></div>
<img src="http://mandrillapp.com/track/open.php?u=30003446&id=2e11509eb286485c812bd5accadb55eb" height="1" width="1">