Streaming 1080p24 H264/AVC and MPEG4/AAC, lip synchronization using gstrtpbin, unable to link in video_00? (bug?)
Martin Lund
martin.lund at ixonos.com
Thu May 24 06:16:14 PDT 2012
I'm sorry about the formatting of my previous mail. Here is my
gst-launch command in hopefully more readable layout:
gst-launch --gst-debug=4 --verbose --gst-debug-no-color \
gstrtpbin name=rtpbin \
filesrc location=battleship.mp4 ! qtdemux name=demux \
demux.video_00 ! queue ! rtph264pay ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! udpsink port=5000 \
rtpbin.send_rtcp_src_0 ! udpsink port=5001
sync=false async=false \
udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
demux.audio_00 ! queue ! rtpmp4apay ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! udpsink port=5002 \
rtpbin.send_rtcp_src_1 ! udpsink port=5003
sync=false async=false \
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
On Thu, May 24, 2012 at 3:02 PM, Martin Lund <martin.lund at ixonos.com> wrote:
> Hi,
>
> I'm on a mission to have a server stream a file containing H264/AVC
> and MPEG4/AAC to two other hosts. One of these hosts will play the
> video stream and the other will play the audio stream. I need A/V lip
> syncrhonization between these two hosts so as far as I understand I
> need to use the gstrtpbin plugin in order to utilize the RTP/RTCP
> protocol to obtain this kind of synchronization.
>
> I'm playing around with gst-launch to test the RTP/RTCP stuff. My
> server pipeline is based on the RTP reference example found here:
> http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh
>
> This is the basic server pipeline I'm trying to configure (assumes it
> all running on the same server, ie. no "host=" stuff):
>
> gst-launch
> \
> gstrtpbin name=rtpbin
> \
> filesrc location=battleship.mp4 ! qtdemux name=demux
> \
> demux.video_00 ! queue ! rtph264pay !
> rtpbin.send_rtp_sink_0 \
> rtpbin.send_rtp_src_0 ! udpsink port=5000
> \
> rtpbin.send_rtcp_src_0 ! udpsink port=5001
> sync=false async=false \
> udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0
> \
> demux.audio_00 ! queue ! rtpmp4apay !
> rtpbin.send_rtp_sink_1 \
> rtpbin.send_rtp_src_1 ! udpsink port=5002
> \
> rtpbin.send_rtcp_src_1 ! udpsink port=5003
> sync=false async=false \
> udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
>
> This fails to link in the video stream?
>
> With debug enabled it spews out various errors regarding
> demux:video_00 and queue0 unable to connect:
>
> GST_ELEMENT_PADS gstutils.c:1101:gst_element_get_compatible_pad:
> finding pad in queue0 compatible with demux:video_00
> GST_PADS gstutils.c:1032:gst_pad_check_link: trying to link
> demux:video_00 and queue0:sink
> GST_CAPS gstpad.c:2336:gst_pad_get_caps_reffed:<demux:video_00> get pad caps
> GST_CAPS gstpad.c:2246:gst_pad_get_caps_unlocked:<demux:video_00> get pad caps
> GST_CAPS gstpad.c:2250:gst_pad_get_caps_unlocked:<demux:video_00>
> dispatching to pad getcaps function
> GST_CAPS gstpad.c:2263:gst_pad_get_caps_unlocked:<demux:video_00> pad
> getcaps returned video/x-h264, stream-format=(string)avc,
> alignment=(string)au, level=(string)4, profile=(string)high,
> codec_data=(buffer)01640028ffe1001c67640028acd94078067b016a020202800000030080015f90078c18cb01000668ebe08cb22c,
> width=(int)1920, height=(int)816, framerate=(fraction)45000/1877,
> pixel-aspect-ratio=(fraction)1/1
> GST_ELEMENT_PADS
> gstutils.c:1195:gst_element_get_compatible_pad:<queue0> Could not find
> a compatible unlinked always pad to link to demux:video_00, now
> checking request pads
> ...
> GST_ELEMENT_PADS gstutils.c:1829:gst_element_link_pads_full: no link
> possible from demux:video_00 to queue0
> default gstutils.c:2037:gst_element_link_pads_filtered: Could not link
> pads: demux:video_00 - queue0:(null)
>
>
> Yet, the same troublesome pipeline elements is tested to work
> perfectly for direct streaming when not in combination with gstrtpbin:
>
> gst-launch filesrc location=battleship.mp4 ! qtdemux name=demux \
> demux.video_00 ! queue ! rtph264pay ! udpsink port=3000 \
> demux.audio_00 ! queue ! rtpmp4apay ! udpsink port=5000
>
> So obviously demux:video_00 and queue0:sink can actually connect.
>
> What I don't understand why my server pipeline does not work in
> combination with gstrtpbin... Might this be a bug or am I missing
> something here?
>
> I'm testing on Ubuntu 12.04, gstreamer: base 0.10.36, good 0.10.31,
> bad 0.10.22.3.
>
> Any help/input is appreciated.
>
> Br, Martin
>
> P.s. The clip I'm using is found here
> http://download4.dvdloc8.com/trailers/divxdigest/battleship-trailer2.zip
More information about the gstreamer-devel
mailing list