Synchronizing players

Bill Hofmann bill at theliquidview.com
Thu Aug 4 21:43:09 UTC 2022


All:

I've got a very stable player running, and the current challenge I'm facing
is running 3 players (3 identical linux devices to 3 displays), and having
them point to the same timecode (give or take maybe 100ms).  Note the
videos are slightly different, and are played out using HLS from localhost,
so the actual encodes are going to be slightly different, including the
actual segment durations (target is 15s).

I'm seeking (at some point) each player to a specific timecode, but what I
see when I compare the actual current timecodes of each of the playing
streams, I see different current timecodes. Sometimes all are within 0.5s
(which honestly I could probably live with), but sometimes 2 of the 3 are
close and the third is 15s off, which isn't good. Just now, I resynced the
timecodes, and all three are pretty close.  So the solution might be to do
this resync on an every so often basis.

Seek code (with if statements/error handling removed):

    flags = Gst.SeekFlags.TRICKMODE | Gst.SeekFlags.KEY_UNIT |
Gst.SeekFlags.SNAP_NEAREST |Gst.SeekFlags.FLUSH

    seek_event = Gst.Event.new_seek(1.0,
        Gst.Format.TIME, flags,
        Gst.SeekType.SET, position_nanoseconds,
        Gst.SeekType.NONE, 0)
    self._player.send_event(seek_event)

Pipeline:

souphttpsrc location="http://localhost/foo.m3u8" ! parsebin name=pb !
queue ! vaapih265dec ! video/x-raw,format=P010_10LE !
queue max-size-bytes=100663300 ! kmssink connector-id=78 plane-id=55
pb. ! queue ! fdkaacdec ! scaletempo ! volume volume=0.5 ! alsasink


Clearly there's a lot going on here. How best to approach this problem?
I've been grappling with various approaches (like, look at the variance
from position to expected position and building a delta that I use here),
but they don't really seem to help.

Thanks!
-Bill

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220804/02784312/attachment.htm>


More information about the gstreamer-devel mailing list