<div dir="ltr"><div><div><div><div><div>Hi Sebastian.<br><br></div>Thanks for the answer/example. So what I read from the example is that nothing needs to be changed for the sender (liver source):<br><br><div style="margin-left:40px">gst-launch-1.0 -v -e \<br>    uvch264src SOME_SETTINGS ! h264parse ! queue ! \<br>         mpegtsmux name=muxer ! queue ! rtpmp2tpay ! \<br>        .send_rtp_sink rtpsession name=session .send_rtp_src ! \<br>        udpsink host=$host port=$rtp_port session.send_rtcp_src !\<br>        udpsink host=$host port=$rtcp_port sync=false async=false \<br>    alsasrc device=$alsadev do-timestamp=true ! \<br>    audio/x-raw,rate=44100,channels=1 ! \<br>    audioconvert ! queue ! avenc_aac compliance=-2 ! aacparse ! queue ! muxer.<br></div><br></div>But each receiver needs to have a pipeline like this:<br><br><div style="margin-left:40px">caps='application/x-rtp,media=video,clock-rate=90000,encoding-name=MP2T,payload=33'<br></div><br><div style="margin-left:40px">gst-launch-1.0 -v -e rtpbin name=rtpbin latency=40 ntp-time-source=3 buffer-mode=synced ntp-sync=true \<br>    udpsrc port=$rtp_port caps="caps" ! \<br>    rtpbin.recv_rtp_sink_0 rtpbin. ! \<br>    decodebin name=decoder ! queue ! \<br>    SOMEVIDEOSINK sync=true decoder. ! queue ! \<br>    SOMEAUDIOSINK sync=true udpsrc port=$rtcp_port ! \<br>    rtpbin.recv_rtcp_sink_0<br></div><br></div>Assuming each source of RTP/RTCP streams are in agreement about time using ntpd to set/adjust the clock locally, should this pipeline play the content synchronized not only with audio/video synchronized but also synchronized for other similar pipelines?<br><br></div>A couple of things though:<br><ol><li>ntp-time-source does not seem to be a settable parameter for rtpbin for (Currently using GStreamer 1.4.5) when listing the module with gst-inspect-1.0. So how do I set it through CLI using gst-launch-1.0?<br></li><li>The latency (PLAYBACK_DELAY_MS) in the example is set to 40ms which I guess is used to set the latency of the built-in rtpjitterbuffer. Is this correct? If yes, is this the parameter to control the same overall fixed delay for all instances of pipelines in this context that needs to be synchronized?</li><li>Will two pipelines with the same configuration, but with different codec for the stream produce identical synchronized delay in the playout? I can live with the need for identical codes, but of course it will be nice.</li></ol>I guees the overall principle of synchronizing playout of multiple sources, each in its own process, that the playout takes place with a fixed delay using ntp timestamps which is then a fixed identical delay for all processes compared to wallclock. Is that right?<br><br></div><div>Best regards and thanks for the info.<br></div><div>Peter<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 23, 2015 at 9:28 AM, Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Di, 2015-06-23 at 00:00 +0200, Peter Maersk-Moller wrote:<br>
> Hi<br>
><br>
> Would it be possible with GStreamer to playout mutiple RTP sources<br>
> synchronized if the playout for each source takes place in its own<br>
> process?<br>
<br>
</span>Short answer: yes.<br>
<br>
See the example applications here:<br>
<a href="http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples/test-netclock-client.c" rel="noreferrer" target="_blank">http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples/test-netclock-client.c</a><br>
<a href="http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples/test-netclock.c" rel="noreferrer" target="_blank">http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples/test-netclock.c</a><br>
<br>
Instead of sharing a network clock, you could also share a GStreamer<br>
NTP or PTP clock, or alternatively set the system clock with wall clock<br>
time on the pipelines and synchronize the system clocks outside<br>
GStreamer.<br>
<br>
<br>
These examples are doing RTSP, but only to make the setup of the rtpbin<br>
simpler. What matters is those properties that are set on rtpbin and<br>
proper selection of the pipeline clock.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" rel="noreferrer" target="_blank">http://www.centricular.com</a><br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>