Live microphone stream between 2 points

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Live microphone stream between 2 points

David Ventura
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? 

David
--
Stack is the new term for "I have no idea what I'm actually using".

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Live microphone stream between 2 points

Tim Müller
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
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Live microphone stream between 2 points

David Ventura
In reply to this post by David Ventura
> 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.


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


On 23 March 2017 at 15:20, David Ventura <[hidden email]> 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? 

David
--
Stack is the new term for "I have no idea what I'm actually using".



--
Stack is the new term for "I have no idea what I'm actually using".

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