rtsp source synchronisation

Sebastian Dröge sebastian at centricular.com
Mon Nov 28 21:32:44 UTC 2016


On Tue, 2016-11-22 at 06:27 -0800, LC wrote:
> Hei, hei! 
> 
> I am testing rtsp stream synchronization abilities. 
> My use case is like this : 2 rtsp live streams in 2 filesinks. 
> 
> I am not going to use any mux element to get done synchronization inside
> that element. Otherwise i need to demux to get each frame from each specific
> rtspsrc to specific filesink.  

What are your RTSP senders? GStreamer based or something else? If
something else, what kind features does that software stack give you,
what kind of configuration related to synchronization and time can you
do?

> I am testing with this pipeline and want to get first frame synchronised but
> i can't find the correct way. Here is that pipeline: gst-launch-1.0 -e
> rtspsrc rfc7273-sync=true ntp-time-source=running-time 
> location=some/media.smp ! rtph264depay ! h264parse ! mp4mux ! filesink
> location=file115.mp4 rtspsrc rfc7273-sync=true ntp-time-source=running-time
> location=some/media2.smp ! rtph264depay ! h264parse ! mp4mux ! filesink
> location=file145.mp4

In what way do you want the two files to be synchronized? They should
start with exactly the same frame, or ...?

> I also noticed comment on rfc7273-sync feature : "(requires clock and offset
> to be provided)". And how can i share it, where to specify it ? 

RFC7273 requires the RTSP senders to a) use a known clock (e.g. a
NTP/PTP, GPS, etc clock) and b) to put the information about this clock
(which one it is) and how the media relates to it (i.e. an offset
between the clock epoch and the RTP timestamp) into the SDP.

If that is given, then you can make use of the RFC7273 feature on the
receiver side to get accurate synchronization based on that clock and
when the media was captured according to that clock.

Otherwise you might still have some other options (e.g. if you know
that the senders are synchronized to a specific NTP clock and advertise
this in their RTCP packets), but nothing standardized or simple that
works without configuration. It completely depends on your setup then.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161128/3e0fd15c/attachment.sig>


More information about the gstreamer-devel mailing list