RTP stream with low latency

About encoding, codec settings, muxers and filter usage
pacman88
New Cone
New Cone
Posts: 2
Joined: 11 Dec 2012 22:13

RTP stream with low latency

Postby pacman88 » 11 Dec 2012 22:24

Hi

i am trying to do some multi-room audio streaming and therefore need to have the stream outputs in sync (it sounds awkward when audio is out of sync while changing from one zone to another). I tried to do this using VLC and rtp streaming which works fine so far. What bothers me is that there is a delay of about 3 seconds between doing a skip of play/pause on the server and the reaction of the clients. Since this is all on the local LAN (gigabit/300mbit WLAN) i think that it should be possible to reduce the caching without facing packet loss. I just don't know how to achieve this in VLC - is there any setting for it?

currently i invoke the server using:
vlc -vvv file.mp3 --sout '#rtp{dst=224.1.1.1,port=1234}'
and the client:
vlc rtp://224.1.1.1:1234

so is there an option to get the delay reduced?

regards
alex

Rémi Denis-Courmont
Developer
Developer
Posts: 15318
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: RTP stream with low latency

Postby Rémi Denis-Courmont » 11 Dec 2012 22:44

There are multiple buffers involved that can be reduced in size. But no matter what: the delay will be noticeable, and there are no warranties of synchronization between receivers.

In fact, synchronizing audio to an acceptable level for human perception through the network is nearly impossible. You should either make sure there is very little interference between the different rooms so desync is not noticed, or run analog cables from a single PC to all speakers.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

pacman88
New Cone
New Cone
Posts: 2
Joined: 11 Dec 2012 22:13

Re: RTP stream with low latency

Postby pacman88 » 12 Dec 2012 09:43

Hi

Thanks for your fast answer - i am completely aware that there will be a noticeable delay - but i would like to shorten it as much as possible.

I thought that multicast RTP is intended to do exactly that - sync between multiple clients? Routing analog cables is not an option in this case so it has to be done via network streaming - i will have to do some testing to get it synchronized as good as possible. Do you have any hints on which wheels to turn in order to optimize synchronization and latency?

Regards Alex

alexkarnaukhov
Blank Cone
Blank Cone
Posts: 12
Joined: 09 Jul 2013 13:25

Re: RTP stream with low latency

Postby alexkarnaukhov » 03 Feb 2014 07:49

Sorry for necroposting, but may be it will be usefull for someone else:
to keep synchronization between different VLC instances and achieve minimal latency, I think "clock-jitter=0" should help.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 10 guests