STREAMER Synchronizing multiple sources to a common receiver

Sebastian Dröge sebastian at centricular.com
Thu May 12 06:25:30 UTC 2016


On Mi, 2016-05-11 at 02:12 -0400, thiyagesh viswanathan wrote:
> Thank you for the quick response. I tested it out and it works very
> well. Though there are little latency variations. It remains < 30 ms
> most of the time.Though sometime it extends to more that 60 Frame
> rate is 15). The video playback is smooth.  I still have few
> questions though,

66ms would be one frame in your framerate, so what you get there seems
quite good already. You can get better than that, but going below 1
frame also requires good support from the display system and especially
rendering the right frame properly synchronized to vsync.

> 1.Will my situation improve even more if I sync pipeline clocks? 

Only if your NTP time synchronization is worse than that. You will have
to measure it. And in general you will have to measure how accurate
things are at the various steps (NTP synchronization, RTP timestamp to
pipeline clock timestamps to system time, rendering of a frame until it
gets on the screen, etc).

> 2, Is there any way to calculate the relative latency between the
> streams from both sources? I am assuming that I have to create my own
> plugin. What methods does streamer allow to achieve what I want. Even
> better if there is an existing plugin which I can study. 

The sinks of each pipeline query the latency with the LATENCY query,
and those are the values you can use. For the *sender* latency of each
individual sender. On top of that there is also the network and
receiver latency of course.

> 3. For the set_pipeline_latency() element, I just set the rtpbin
> latency in my pipeline to 500 ms. Is that fine? I mean I am not using
> c code for now. Just playing with the pipelines. 

As long as you don't want to get the "perfect" latency configuration
all this is fine, yes.

-- 
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: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160512/ebb27a50/attachment.sig>


More information about the gstreamer-devel mailing list