12

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.

Brad
  • 146,404
  • 44
  • 300
  • 476
tekesteg
  • 194
  • 1
  • 3
  • 11

1 Answers1

11

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.

Brad
  • 146,404
  • 44
  • 300
  • 476
  • 1
    thank you for your detailed explanation...but i was able to reduce it to 2s-3s by using the html5 video tag instead of the audio tag which produced a delay of 6s...i don't know why it decreased but it did. do you think you can explain why the video tag is giving me very low latency. – tekesteg Jun 18 '13 at 18:31
  • @user2057125, Different software, likely different config for the buffer. It could even be that one codec pack is in use for the audio tag, and another for the video tag. There are many reasons they may be different, and it should not be assumed that using a video tag vs. an audio tag will always give you lower latency. – Brad Jun 18 '13 at 20:15
  • For what it's worth, the lowest latency I've ever managed to get is around 7 seconds - that's with a low/medium bitrate audio stream (64-128kbps) on most recent (v2+) versions of Icecast using clients such as [Butt](http://butt.sourceforge.net/), Oddcast and hardware encoding (e.g. a [Barix instreamer](http://www2012.barix.com/Instreamer/301)). As Brad says, any lower and players will frequently re-buffer. It is also down to the player (or browser) you are using. – William Turrell Jun 24 '13 at 13:30