On Thu, 2017-03-23 at 15:20 -0300, David Ventura wrote:
> 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 !
> 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
Check out gst-inspect-1.0 alsasrc and gst-inspect-1.0 alsasink and play
with the properties.
> 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
setting latency-time and buffer-time on both ends did nothing for the latency, reducing buffer-time too much even results in stutter.
I removed both queues (on sender and receiver) which helped a little but not really.
qos and max-lateness on the receiver didn't help either. I don't know what else to tweak