[gst-devel] rtpbin + mpegtsmux

Gary Thomas gary at mlbassoc.com
Sat Sep 18 01:01:53 CEST 2010


I'm trying to stream MPEG-TS data via RTP/RTCP using these pipelines:

Server:
   gst-launch -v gstrtpbin name=rtpbin v4l2src ! video/x-raw-yuv,width=720,height=480 !
     x264enc ! mpegtsmux ! rtpmp2tpay ! rtpbin.send_rtp_sink_0
     rtpbin.send_rtp_src_0 ! udpsink port=5000 host=192.168.1.101 ts-offset=0 name=vrtpsink
     rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=192.168.1.101 sync=false async=false name=vrtcpsink
     udpsrc port=5005 name=vrtpsrc ! rtpbin.recv_rtcp_sink_0

Client:
   gst-launch -v gstrtpbin name=rtpbin latency=200
     udpsrc caps=application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)MP2T-ES port=5000 !
        rtpbin.recv_rtp_sink_0 rtpbin. ! rtpmp2tdepay ! mpegtsdemux name=demux ! ffdec_h264 ! xvimagesink demux.
     udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 rtpbin.send_rtcp_src_0 !
        udpsink port=5005 host=192.168.1.101 sync=false async=false

When the server starts up, I get these notices:
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, width=(int)720, height=(int)480, fr
amerate=(fraction)30/1
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, width=(int)720, height=(int)8
0, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, width=(int)720, height=(int)
480, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, width=(int)720, height=(int)48
0, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:src: caps = video/x-h264, framerate=(fraction)30/1, width=(int)720, height=(int)4
80
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:sink_64: caps = video/x-h264, framerate=(fraction)30/1, width=(int)720, height=(int)
480
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, enco
ding-name=(string)MP2T-ES, ssrc=(uint)4255958994, payload=(int)33, clock-base=(uint)3087999769, seqnum-base=(uint)41726
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/MpegTsMux:mpegtsmux0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamhea
der=(buffer)< 47400030a600fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308b00f
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffff0002b0280001c10000e040f00c050448444d5688040ffffcfc1be040f00a050848444d56ff1b443ffba2e249 >
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, str
eamheader=(buffer)< 47400030a600fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 4740203
08b00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffff0002b0280001c10000e040f00c050448444d5688040ffffcfc1be040f00a050848444d56ff1b443ffba2e249 >
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:send_rtp_sink: caps = application/x-rtp, media=(string)video,
clock-rate=(int)90000, encoding-name=(string)MP2T-ES, ssrc=(uint)4255958994, payload=(int)33, clock-base=(uint)3087999769, seqnum-base=
(uint)41726
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtp_sink_0: caps = application/x-rtp, media=(string)video, clock-rate=(int)900
00, encoding-name=(string)MP2T-ES, ssrc=(uint)4255958994, payload=(int)33, clock-base=(uint)3087999769, seqnum-base=(uint)41726
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtp_sink_0.GstProxyPad:proxypad1: caps = application/x-rtp, media=(string)vide
o, clock-rate=(int)90000, encoding-name=(string)MP2T-ES, ssrc=(uint)4255958994, payload=(int)33, clock-base=(uint)3087999769, seqnum-ba
se=(uint)41726
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtp_src_0: caps = application/x-rtp, media=(string)video, clock-rate=(int)9000
0, encoding-name=(string)MP2T-ES, ssrc=(uint)4255958994, payload=(int)33, clock-base=(uint)3087999769, seqnum-base=(uint)41726
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:send_rtp_src: caps = application/x-rtp, media=(string)video, c
lock-rate=(int)90000, encoding-name=(string)MP2T-ES, ssrc=(uint)4255958994, payload=(int)33, clock-base=(uint)3087999769, seqnum-base=(
uint)41726
/GstPipeline:pipeline0/GstUDPSink:vrtpsink.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-
name=(string)MP2T-ES, ssrc=(uint)4255958994, payload=(int)33, clock-base=(uint)3087999769, seqnum-base=(uint)41726
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtp_src_0.GstProxyPad:proxypad2: caps = application/x-rtp, media=(string)video
, clock-rate=(int)90000, encoding-name=(string)MP2T-ES, ssrc=(uint)4255958994, payload=(int)33, clock-base=(uint)3087999769, seqnum-bae
=(uint)41726
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0: caps = application/x-rtcp
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = application/x-rtcp
/GstPipeline:pipeline0/GstUDPSink:vrtcpsink.GstPad:sink: caps = application/x-rtcp
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad3: caps = application/x-rtcp

Similarly for the client:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0: ntp-ns-base = 3493752949569988000
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:recv_rtp_sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, 
encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_sink_0: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_sink_0.GstProxyPad:proxypad0: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, 
encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:recv_rtp_src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, 
encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, 
encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, 
encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpPtDemux:rtpptdemux0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T-ES
/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:src: caps = video/mpegts, packetsize=(int)188, systemstream=(boolean)true
/GstPipeline:pipeline0/GstRtpMP2TDepay:rtpmp2tdepay0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T-ES, payload=(int)33
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_src_0_4255958994_33.GstProxyPad:proxypad3: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, 
encoding-name=(string)MP2T-ES, payload=(int)33
/GstPipeline:pipeline0/GstMpegTSDemux:demux.GstPad:sink: caps = video/mpegts, packetsize=(int)188, systemstream=(boolean)true
/GstPipeline:pipeline0/GstMpegTSDemux:demux: pat-info = ((GValueArray*) 0xb3f02c80)
/GstPipeline:pipeline0/GstMpegTSDemux:demux: pmt-info = ((MpegTsPmtInfo*) 0xb3f02520)
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = video/x-h264
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0: caps = application/x-rtcp
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = application/x-rtcp
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtcp
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad2: caps = application/x-rtcp
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:sync_src: caps = application/x-rtcp
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:rtcp_sink: caps = application/x-rtcp
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:rtcp_src_-39008302: caps = application/x-rtcp
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink_rtcp: caps = application/x-rtcp

Sadly, even though the server is pumping out data, I don't see
anything at the client (my xvimagesink window never opens up)

Any ideas what I'm doing wrong or how to diagnose this?

Thanks

Note: I'm also a bit unsure how to write these pipelines if I want
to put audio data into the .TS container as well.  Any pointers
on this would be most helpful.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------




More information about the gstreamer-devel mailing list