STREAMER Synchronizing multiple sources to a common receiver
thiyagesh viswanathan
thiyageshv at gmail.com
Wed May 11 06:12:07 UTC 2016
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,
1.Will my situation improve even more if I sync pipeline clocks?
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.
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.
Thanks in advance.
> On May 10, 2016, at 2:59 AM, Sebastian Dröge <sebastian at centricular.com> wrote:
>
> On Sa, 2016-05-07 at 14:25 -0400, thiyagesh viswanathan wrote:
>>
>> Questions I want to be answered:
>> 1.Is my pipeline structure correct?
>
> Yes, the properties on rtpbin not so much though.
>
> Use ntp-time-source=ntp (or unix). These two are going to use your
> system clock, the setting you used will use the pipeline clock. The
> pipeline clock is not going to be synchronized between all your
> devices.
>
> You might want to use rtcp-sync-send-time=false if both senders of you
> have different latencies (camera, encoder, etc).
>
> You might have to adjust the receiver pipeline latency to be high
> enough for both senders. See gst_pipeline_set_latency().
>
> ntp-sync=true and buffer-mode=synced are correct for your case.
>
>
> Independent of that you need to ensure that RTCP between sender and
> receiver is actually working, and synchronization will only be correct
> after the first RTCP packet is received at the receiver. By default
> after about 5 seconds. It can happen immediately if you set
> rtp-profile=avpf on the rtpbin (well, not immediately but at some point
> in the first second).
>
>> 2.I am not modifying the pipeline clocks at all. Just assuming that
>> the pipeline clocks of senders and receivers will be
>
> If your system clocks are synchronized via NTP, then that's indeed not
> necessarily needed.
>
>> 3.synchronized once we sync the devices through NTP. Is this
>> assumption correct?
>
>> 4.Should I have just one rtpbin or separate rtpbin for each sender?
>
> You can have one rtpbin for multiple sessions, and those sessions are
> then all synced together. If you use multiple rtpbins instead, there
> won't be any inter-session synchronization happening inside rtpbin.
>
>> 5.Should i USE RTPJITTERBUFFER? if yes, should the mode be synced?
>
> rtpbin contains an rtpjitterbuffer already. Don't put a separate on
> into your pipeline, otherwise you have two and the behaviour is not
> very well then.
>
>
> Does this all work better then? What is the behaviour you're seeing
> now? Also does using one sender at a time result in smooth playback?
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list