Posts: 3
Joined: Wed Jul 04, 2012 7:40 pm

Darkice / ices2 - buffer overruns

Wed Jul 04, 2012 7:53 pm


I've had my RPi for a good week now, but I cannot for the life of me get Darkice or ices2 (stream clients) working properly.

Whatever I do I get massive buffer overrun's (like every second) and the
stream cannot be loaded.
I've tried the old trick in the book by changing buffer from 1 to 5 sec
in AlsaDspSource.cpp without any noticeable change.
Tried both with vorbis and mp3/mp2 to no avail.
Tried against both steamcast and icecast2 server, both local(host) and
to another server on my LAN.
Both wireless and wired.
When there is no cable plugged in to the USB soundcard I get fewer
buffer overruns, which makes sense since there is no audio but silence
to transmit.
Using the Debian wheezy image and latest updates (rpi-update script)
ALSA sound libraries.

Doesn't seem to be related directly to Darkice since the ices2 client
suffers from the same problem.

The USB soundcard is a Deltaco UAC-03 (C-Media chipset) and is working fine if I do a recording using "arecord". Both the wireless and wired connection is working fine, and wifi is completly off when testing on wired and vice versa.

The USB hub's I've tried is D-Link DUB-H4 and Belkin F5U706ea.
The PSU to the RPi is the one from RS-Online with 5V 1,2A.
Tried every combination of powering the units, incl the RPi itself.
But since the devices work independently at the same time I do not think it is a power issue.

But I am curious, have anyone got darkice or any other streaming client to run successfully on RPi?
I am open to absolutely everything at this point, this is driving me insane! :cry:

Free hugs to the one who can help me.


Posts: 3
Joined: Wed Jul 04, 2012 7:40 pm

Re: Darkice / ices2 - buffer overruns

Fri Jul 06, 2012 11:10 pm

This has been solved.

Was using debian image without hardfloat, no wonder encoding was borked.

Will post full instructions on a webpage soon.

Posts: 1
Joined: Mon Jul 09, 2012 8:10 am

Re: Darkice / ices2 - buffer overruns

Mon Jul 09, 2012 8:12 am

I'm looking forward for the full instructions. :)

Posts: 1
Joined: Sat Aug 11, 2012 2:21 pm

Re: Darkice / ices2 - buffer overruns

Sat Aug 11, 2012 2:27 pm

<shameless plug>
I have written a little howto about streaming audio with DarkIce and Icecast2 on Raspberry Pi: ... pberry-pi/
It also explains how to build DarkIce with mp3 support.

</shameless plug>

Posts: 1
Joined: Tue Aug 21, 2012 6:28 pm

Re: Darkice / ices2 - buffer overruns

Tue Aug 21, 2012 6:46 pm

I have found on my setup that if the keyboard is plugged in causes buffer overruns, from Darkice.
Testing shows not a power draw issue from keyboard, not what USB or hub port used for keyboard and sound card. Top shows Darkice CPU usage jumps up and down during overruns.


Posts: 23
Joined: Wed Jan 16, 2013 10:45 pm

Re: Darkice / ices2 - buffer overruns

Fri Feb 08, 2013 11:43 pm

Followed you instructions on t3node with GREAT results! Streaming is going great HOWEVER I would like to introduce a delay in the stream.. 3-5 minutes would be about right although as little as one minute would be helpful.
I wondering if the buffer in AlsaDspSource.cpp that you mentioned would do this? Have you any ideas?

(Bandwidth is very low so maybe it could be done in RAM?)

Posts: 3
Joined: Wed Jul 04, 2012 7:40 pm

Re: Darkice / ices2 - buffer overruns

Sat Feb 09, 2013 3:10 am

I never got around to make that instructions, so thanks for that xonx!

Keyboard/mouse input causes massive overrun through USB, no matter what USB hub you use, there is just too much data. At least that's my experience.

I have never tried to increase the delay, I like as close to real-time as possible.
Just out of curiosity, why would you want a delay?

I am guessing this delay would mean storing the data buffer somewhere before it gets transmitted so it doesn't sound like the greatest idea to me on a device that is already struggling.
But don't quote me on that, I am just thinking out loud and being a nub.

I recommend you ask that question to the darkice mailing list, send a mail to, mark the subject with [darkice].

EDIT: By the way, I've had massive problems with darkice+icecast2, that beeing on the icecast2 server side. After about an hour or something it was struggling like crazy. So I switched to shoutcast2, but you need a patch for that, see


Posts: 23
Joined: Wed Jan 16, 2013 10:45 pm

Re: Darkice / ices2 - buffer overruns

Sat Feb 09, 2013 3:32 am

Oh sorry.. I assumed it was you who did this write-up: ... pberry-pi/

Reason for the delay is like the seven second delay on LIVE TV or radio. think censorship with a very slow to react censor.

You might be right that it is a lot to ask of the RasPi.. but I am running darkice without icecast (or it's equivalent) at pretty low bandwidth, sent to a remote icecast server and also saved to local disk (SD card) at 8 mb an hour and so far its rock solid.

Since the network bandwidth is shared with the USB.. that's bound to be a limitation. I use a USB sound stick (nothing else on the USB bus) and Ethernet only (headless arrangement) so I guess that helps.

Return to “Troubleshooting”

Who is online

Users browsing this forum: FTrevorGowen, Killjoy99, MaxK1, mikerr and 52 guests