[gst-devel] Help with complicated RTPBin pipeline
Andy Savage
andy at bluewire.net.nz
Mon Sep 20 06:10:27 CEST 2010
Hi there,
I need a little bit of help with a long gstreamer pipeline and
sending/receiving video/audio. I have two pipelines which work
successfully...
*Sending Video*
gst-launch gstrtpbin name=rtpbin latency=0 ksvideosrc device-index=0
typefind=true ! typefind ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,
width=640, height=480 ! videorate ! video/x-raw-yuv, framerate=15/1 !
ffenc_mpeg4 ! rtpmp4vpay send-config=true ! rtpbin.send_rtp_sink_0
rtpbin.send_rtp_src_0 ! udpsink port=5502 host=192.168.10.175
rtpbin.send_rtcp_src_0 ! udpsink port=5510 host=192.168.10.175 sync=false
async=false udpsrc port=5510 ! rtpbin.recv_rtcp_sink_0 autoaudiosrc
samplesperbuffer=1000 ! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_1
rtpbin.send_rtp_src_1 ! udpsink port=5504 host=192.168.10.175
rtpbin.send_rtcp_src_1 ! udpsink port=5512 host=192.168.10.175 sync=false
async=false udpsrc port=5512 ! rtpbin.recv_rtcp_sink_1
*Receiving Video*
gst-launch gstrtpbin name=rtpbin2 latency=0 udpsrc caps="application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES,
profile-level-id=(string)1" port=5502 ! rtpbin2.recv_rtp_sink_0 rtpbin2. !
rtpmp4vdepay ! ffdec_mpeg4 ! ffmpegcolorspace ! autovideosink udpsrc
port=5510 ! rtpbin2.recv_rtcp_sink_0 rtpbin2.send_rtcp_src_0 ! udpsink
host=192.168.10.175 port=5510 sync=false async=false udpsrc
caps=application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA
port=5504 ! rtpbin2.recv_rtp_sink_1 rtpbin2. ! rtppcmadepay ! alawdec !
autoaudiosink buffer-time=10000 udpsrc port=5512 ! rtpbin2.recv_rtcp_sink_1
rtpbin2.send_rtcp_src_1 ! udpsink host=192.168.10.175 port=5512 sync=false
async=false
I wanted to combine them so that I could have sending/receiving in one
pipeline. Is this possible?
Right now I simply launch two gstreamer instances (one for sending, one for
receiving). The problem is that in the receiving instance I would like to
access the local camera and place it as a local preview window into the
receiving video. This works fine but the problem is, you can't have two
gstreamer instances accessing the camera. I thought if I could combine the
above into one pipeline I could use tee and split them then there would only
ever be one instance of the camera used at once.
*If I simply combine the above two into something like:*
gst-launch \
gstrtpbin name=rtpbin latency=0 ksvideosrc device-index=0 typefind=true !
typefind ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv, width=640,
height=480 ! videorate ! video/x-raw-yuv, framerate=15/1 ! ffenc_mpeg4 !
rtpmp4vpay send-config=true ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 !
udpsink port=5502 host=192.168.10.175 rtpbin.send_rtcp_src_0 ! udpsink
port=5510 host=192.168.10.175 sync=false async=false udpsrc port=5510 !
rtpbin.recv_rtcp_sink_0 autoaudiosrc samplesperbuffer=1000 ! alawenc !
rtppcmapay ! rtpbin.send_rtp_sink_1 rtpbin.send_rtp_src_1 ! udpsink
port=5504 host=192.168.10.175 rtpbin.send_rtcp_src_1 ! udpsink port=5512
host=192.168.10.175 sync=false async=false udpsrc port=5512 !
rtpbin.recv_rtcp_sink_1 \
gstrtpbin name=rtpbin2 latency=0 udpsrc caps="application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES,
profile-level-id=(string)1" port=5502 ! rtpbin2.recv_rtp_sink_0 rtpbin2. !
rtpmp4vdepay ! ffdec_mpeg4 ! ffmpegcolorspace ! autovideosink udpsrc
port=5510 ! rtpbin2.recv_rtcp_sink_0 rtpbin2.send_rtcp_src_0 ! udpsink
host=192.168.10.175 port=5510 sync=false async=false udpsrc
caps=application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA
port=5504 ! rtpbin2.recv_rtp_sink_1 rtpbin2. ! rtppcmadepay ! alawdec !
autoaudiosink buffer-time=10000 udpsrc port=5512 ! rtpbin2.recv_rtcp_sink_1
rtpbin2.send_rtcp_src_1 ! udpsink host=192.168.10.175 port=5512 sync=false
async=false
It doesn't appear to work... gstreamer starts successfully but I can't
recieve video on either end
Has this been attempted before? Is there a best way to do it? (I presume
people normally use two pipelines?)
Kind regards,
Andy Savage
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100920/a0c9f469/attachment.htm>
More information about the gstreamer-devel
mailing list