stream drifting out of sync

Nicolas Dufresne nicolas at ndufresne.ca
Sun Nov 28 00:32:58 UTC 2021


Le sam. 27 nov. 2021 17 h 45, Ian Steele via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> a écrit :

> I've been trying to solve this issue for several days but just cant fix.
>
> I have 2 Raspberry pi CM4 systems (both identical OS) locked together
> with ptp4l. I have got a nice low-latency rtp stream sending 48k 24 bit
> audio from 1 to another.
>
> I'm using the audiotestsrc in gstreamer to generate tone bursts so I can
> look at the signal on my scope  from
> each device and see the latency/sync.
>
> The commands below seem to work well - no glitches and very low
> latency(approx 8 mS)
>
> But on the receiver the latency gradually increases. It seems to go up by
> about 1mS per  3 minutes.
>

Out of curiosity, have you ran this for over 120m ? Aslasink drift
tolerance is set at 40ms after which it will skew (insert silence of cut).
The resampling there have never worked.


> TRANSMIT:
> gst-launch-1.0 -vv audiotestsrc  is-live=true wave=ticks
> apply-tick-ramp=true tick-interval=100000000 freq=10000 volume=0.5
> sine-periods-per-tick=100  ! audioconvert ! audio/x-raw, format=S24LE,
> rate=48000, channels=2 ! tee name=t ! audioconvert ! queue ! rtpL24pay !
> udpsink host=239.255.0.10 t. ! queue ! alsasink
>
> RECEIVE:
> gst-launch-1.0 udpsrc address=239.255.0.10 port=5004 multicast-iface=eth0
> ! application/x-rtp, clock-rate=48000, channels=2 ! rtpjitterbuffer
> latency=5 ! rtpL24depay ! audioconvert ! alsasink  processing-deadline=0
> latency-time=1 buffer-time=1
>
> Do these look ok?
> Maybe I need to be clocking the receiver from the incoming stream somehow?
>

Looks fine, you can lower the tolerance on the sink perhaps. You have
mentioned PTP clock, but both pipeline will run off alsasink clock, was
this just an illustration or you have code to force the clock?


> TIA
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211127/6b0f8482/attachment.htm>


More information about the gstreamer-devel mailing list