can receive and send videostream in gstrtpbin in one pipeline and how to do that?

Thomas Greenwood tcdgreenwood at hotmail.com
Sun Mar 10 15:39:20 PDT 2013


If it helps I've got a working pipeline that may be what you want to do, perhaps I didn't understand correctly before.  I have been using this for testing and seems to work well.  I may try to add audio in the future.  Similar formatted commands work for VP8 two.
gst-launch-1.0 -v rtpbin name=rtph264 videotestsrc pattern=ball ! textoverlay text="H264" ! 'video/x-raw,width=320,height=240,framerate=15/1' ! x264enc tune=zerolatency speed-preset=ultrafast ! rtph264pay ! rtph264.send_rtp_sink_0 rtph264.send_rtp_src_0 ! udpsink async=false port=5100 host=0:0:0:0:0:ffff:c0a8:266 ts-offset=0 name=hrtpsink rtph264.send_rtcp_src_0 ! udpsink port=5101 host=0:0:0:0:0:ffff:c0a8:266 sync=false async=false name=hrtcpsink udpsrc name=receiver_rtcp_in port=5103 caps = "application/x-rtcp" ! rtph264.recv_rtcp_sink_0 udpsrc name=h264recv port=5102 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264.recv_rtp_sink_0 rtph264. ! rtph264depay ! avdec_h264 ! videoconvert ! osxvideosink
I think I have worked out your problem as well.  I think that your issue is that you don't specify async=false on the udpsink for rtp - I don't quite get why but if you don't nothing is sent I think because it's waiting for other sinks.  I'm sure that one of the gstreamer devs might have a better solution or full explanation of why.  The bit that I think is wrong in your pipeline is:
rtpbin.send_rtp_src_0 ! udpsink port=5000 host=192.168.1.220 name=vrtpsink
try
rtpbin.send_rtp_src_0 ! udpsink port=5000 host=192.168.1.220 name=vrtpsink async=false
BTW in my pipeline I've converted ipv4 addresses to ipv6 addresses since the Mac build I have doesn't allow you to use ipv4 addresses (it thinks they aren't valid for some reason).
I hope this helps.
From: tcdgreenwood at hotmail.com
To: gstreamer-devel at lists.freedesktop.org
Subject: RE: can receive and send videostream in gstrtpbin in one pipeline and	how to do that?
Date: Wed, 6 Mar 2013 16:46:51 +0000




I haven't done this exactly, but I have received an RTP stream from one endpoint and sent to another successfully.  I think the issue you have is that you're only using a single gstrtpbin that you are trying to use for both directions at once - try using one for sending and another one for receiving.
Perhaps you could also try writing separate sender and receiver commands and then merge them.  When merging you need to ensure that the elements are not named the same thing.

I hope this of some help.
> Date: Tue, 5 Mar 2013 18:20:38 -0800 (PST)
> From: zgd <zhuangzhida1989 at gmail.com>
> To: gstreamer-devel at lists.freedesktop.org
> Subject: can receive and send videostream in  gstrtpbin in one
> 	pipeline and	how to do that?
> Message-ID: <1362536438496-4658910.post at n4.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Hello, I want to use gstrtpbin to receive and send videostream simultaneously
> . can I use one rtpbin to do this ? I try to do this and the following is my
> pipeline:
>  gst-launch -v gstrtpbin name=rtpbin \
>   v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=15/1 ! videorate
> ! ffmpegcolorspace ! x264enc ! rtph264pay ! rtpbin.send_rtp_sink_0 \
>     rtpbin.send_rtp_src_0 ! udpsink port=5000 host=192.168.1.220
> name=vrtpsink\
>     rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=192.168.1.220 sync=false
> async=false name=vrtcpsink \
>     udpsrc port=5003 name=vrtpsrc ! rtpbin.recv_rtcp_sink_0 \
>     udpsrc port=5000
> caps="application/x-rtp,media=video,clock-rate=90000,encoding-name=H264" !
> rtpbin.recv_rtp_sink_1 rtbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \
>     udpsrc port=5001 ! rtbin.recv_rtcp_sink_1  \
>     rt.send_rtcp_src_1 ! udpsink port=5003 host=192.168.1.220 sync=false
> async=false \
> but it seems that it does't work and I grab the network packet and don't
> find the packet it send. What's the problem? What should I do .
>    Thanks.
> 
 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130310/d628817c/attachment-0001.html>


More information about the gstreamer-devel mailing list