Live microphone stream between 2 points

Tim Müller tim at centricular.com
Thu Mar 23 18:39:29 UTC 2017


On Thu, 2017-03-23 at 15:20 -0300, David Ventura wrote:

Hi,

> I've been trying to listen to a microphone that's on the network but
> the latency is too great for it to be acceptable. We are talking
> ethernet, ping <1ms but actual audio latency is (guessed) ~800ms
> 
> My pipeline
> 
> gst-launch-1.0 alsasrc device=hw:CARD=CODEC,DEV=0 slave-
> method=resample provide-clock=true do-timestamp=true buffer-
> time=20000 ! queue ! audioconvert ! audioresample ! audio/x-
> raw,format=S16LE,channels=2,rate=48000,layout=interleaved !
> multiudpsink clients=192.168.2.208:5003,192.168.2.21:5003
> 
> And the receiving end
> 
> gst-launch-1.0 udpsrc port=5003 ! audio/x-
> raw,format=S16LE,channels=2,layout=interleaved,rate=$AUDIORATE !
> autoaudiosink
> 
> Is there any way to have very fast LAN audio streaming? 

Yes. You need to measure where that latency is introduced. Both alsasrc
and alsasink will add a non-trivial amount of latency by default. You
should be able to configure both of these elements for much lower
latency.

Check out gst-inspect-1.0 alsasrc and gst-inspect-1.0 alsasink and play
with the properties.

Cheers
 -Tim
-- 
Tim Müller, Centricular Ltd - http://www.centricular.com


More information about the gstreamer-devel mailing list