How to minimize delay in encoded audio streaming?
Nicolas Dufresne
nicolas at ndufresne.ca
Wed Feb 19 14:44:16 UTC 2020
On mer, 2020-02-19 at 05:20 -0600, jeyp4 wrote:
> Hi
>
> I am observing ~0.5 sec delay in speaking to mic and listening from speaker
> in following pipeline.
> gst-launch-1.0 pulsesrc ! audioconvert ! lamemp3enc ! decodebin !
> audioconvert ! autoaudiosink
>
> How can I minimize this delay?
>
>
> I noticed that below pipeline gives minimum delay.
> gst-launch-1.0 -v pulsesrc buffer-time=20000 ! volume volume=1.0 ! pulsesink
> buffer-time=20000
On pulsesrc, you want to reduce latency-time, currently it's 10ms, so not a big
contributor latency. On sink, setting the buffer-time is what reduce latency.
To gain more latency, just pick another compression method, MP3 is not designed
to achieve the lower possible latency. Have you considered Opus ? See frame-size
property on opusenc for the entire range of latency you can achieve.
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.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