How to synchronize multiple udp streams?

Sebastian Dröge sebastian at
Sat Feb 8 12:05:47 PST 2014

On Fr, 2014-02-07 at 02:20 -0800, ondrahnilicka wrote:
> Hello,
> I'am developing a special video camera that streams a video from its sensor
> to PC using gstreamer. It uses nv_omx_h264enc, rtph264pay and udpsink.
> Several of this cameras are connected to the target PC simultaneously via
> ethernet switch. The target PC records all the streams and it must be able
> to show the recorded streams with frame to frame synchronization (the
> sensors capture the same scene from different angles).
> I'am able to connect all the cameras together with a special sync signal and
> reset their clock (or some timer) with negligible latency, but the questions
> are: 
> How to synchronize RTP timestamps? Can I reset them to zero in rtph264pay
> module during streaming? (to do a sync point)
> Is it sufficient for frame to frame synchronization of multiple video
> streams in target PC?
> Are there any absolute time-stamp (or another relative) that should be
> synchronized in the video stream?
> Does exist any application capable of record multiple video streams and sync
> them?

You have to synchronise all senders to the same clock as a first step,
e.g. by syncing all their clocks via ntp or ptp or by using
GstNetClientClock / GstNetClockProvider for their sender pipelines.

Then you need to make sure that this results in having the same RTP
timestamps for the same time.

Once that is done you'll need to sync to the same clock on the client,
e.g. also by using GstNetClientClock / GstNetClockProvider.

Check e.g. aurena for an example of how to use this to synchronise
pipelines between different machines.

Sebastian Dröge, Centricular Ltd -
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the gstreamer-devel mailing list