Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

High audio latency with Icecast and Darkice

I have successfully installed icecast and darkice on my ubuntu machine and was able to stream live on my lan. but to my disappointment it has a 15sec to 20sec delay.This is very poor performance. I don't think it is because of my lan connection because even when i tried to listen in that same ubuntu machine there was still a delay!

I have tried to configure icecast to have no burst-size which means there will be no buffering,this helped me reduce the delay to around 6sec to 8sec. So please if you have any suggestions or very good configuration values it would be of great help to me.

P.S the format i am streaming is mp3. someone suggested that i should use opus codec but i don't think icecast or darkice support it.

like image 978
tekesteg Avatar asked Jun 16 '13 13:06

tekesteg


People also ask

What is Icecast used for?

Icecast is a streaming media (audio/video) server which currently supports Ogg (Vorbis and Theora), Opus, WebM and MP3 streams. It can be used to create an Internet radio station or a privately running jukebox and many things in between.

Can Icecast stream video?

Icecast is a streaming server, which can stream audio (and video) to listeners/viewers.

How do I listen to Icecast?

In the VLC sidebar, select Icecast Radio Directory. Double-click any radio station to start listening.

Is Icecast open source?

Icecast was created in December 1998/January 1999 by Jack Moffitt and Barath Raghavan to provide an open-source audio streaming server that anyone could modify, use, and tinker with.


1 Answers

This is not poor performance... it is deliberate so that clients don't experience re-buffering once playback has begun. Internet radio servers are not built for low-latency.

There are many sources of the delay:

  • Capture buffer (<500ms)
  • Encoding buffer (~250ms-1s depending on codec)
  • Encoder-to-Server Network Transfer and Buffer (<10ms)
  • Server buffer (the one you disabled, often set at 1MB which can be a long time depending on bitrate)
  • Server-to-Client Network Transfer and Buffer (<10ms-1s typically, longer times for mobile)
  • Client buffer (widely variable, but 2s is typical)
  • Client playback buffer (<500ms)

The biggest of these as you can see is the server buffer. You have eliminated that, and that is all you can do. If you want something with lower latency, you need a different technology.

like image 84
Brad Avatar answered Oct 14 '22 04:10

Brad