Reducing jitter and latency when re-encoding SRT

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Reducing jitter and latency when re-encoding SRT

Jan Willamowius
Hi,

I'm having a pipeline to re-encode an SRT feed from OBS.

gst-launch-1.0 srtsrc latency=200 blocksize=1400 uri=srt://:5000 ! tsdemux ! faad ! audioconvert ! audio/x-raw ! opusenc audio-type=voice ! rtpopuspay ! queue ! multiudpsink clients=192.168.0.111:5000

It introduces quite a bit of jitter and even without the re-encoding it
adds about 1.7 sec of latency.

Is there a way to add a jitter buffer and reduce the latency ?

Thanks,
Jan

--
Jan Willamowius, Founder of the GNU Gatekeeper Project
EMail  : [hidden email]
Website: https://www.gnugk.org

Relaxed Communications GmbH
Frahmredder 91, 22393 Hamburg, Germany
Geschäftsführer: Jan Willamowius
HRB 125261 (Amtsgericht Hamburg)
USt-IdNr: DE286003584
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Reducing jitter and latency when re-encoding SRT

Olivier Crête-3
Hi,

On Fri, 2021-04-16 at 10:33 +0200, Jan Willamowius wrote:
I'm having a pipeline to re-encode an SRT feed from OBS.

gst-launch-1.0 srtsrc latency=200 blocksize=1400 uri=srt://:5000 ! tsdemux ! faad ! audioconvert ! audio/x-raw ! opusenc audio-type=voice ! rtpopuspay ! queue ! multiudpsink clients=192.168.0.111:5000

It introduces quite a bit of jitter and even without the re-encoding it
adds about 1.7 sec of latency.

Is there a way to add a jitter buffer and reduce the latency ?

You can reduce the latency by reducing the latency property on tsdemux, but be aware that yo need a sender that puts the PCR timstamps in the TS stream often enough (700ms is the worse case allowed by the MPEG-TS spec).

The tsdemux should already absorb the jitter, its output should have accurate timestamps (those from the incoming mpeg-ts stream).

-- 
Olivier Crête


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel