Dobrica Pavlinušić's random unstructured stuff
Icecast streaming from K77: Revision 1

For a last week or so, we have been in Berlin (visiting 24th Chaos Communication Congress (24C3) among other things) and we stayed in Kastanienallee 77 which is really nice place.

Since we are geeks, and didn't move much out of the room (we actually covered it with various fun toys due to our excessive trips to local computer store) it seems like a logical idea to offer some of ours skills to setup audio streaming for salon bruit which is downstairs in K77. It was great fun, but setting up streaming half an hour before program, is well, optimistic :-)

Task is simple: use darkcast and icecast2 to stream audio. We had know how: both Damjan and Marcell had experience with icecast streaming and Saša and me were eager to learn how to do it.

Andrea and I managed to duck-tape ethernet extension adapter between two peaces of network cable (3m and 4m) and connect it via switch to house network two floors down to street level where Cafe so we had network there. Problem was that stage is on the other part of the house, and setting up wireless from front (network cable limit) to stage seems like a logical solution (at that time).

Initial idea was to use Adrea's iBook (freshly re-installed with Debian unstable for powerpc) to do all the stuff. However, nasty bcm43xx wifi card first didn't want to work as access point (disabling our chance to use it as bridge between wired and wireless network using ipmasq Debian package) so we deiced to use it as darkice to catch audio, encode it to ogg and send it to server in Croatia where icecast2 server was located which streamed content to listeners.

What was the problem? iBook doesn't have audio import port! Yes, let's save 30 cents and not put audio input connector before microphone! Thanks Apple. Marcell somehow managed to find USB microphone as alternative, but at same time, Saša managed to install darkice on his ThinkPad (thanks IBM for audio input, eh...) and I used my script which just bridges ethernet and wifi connection. Somehow in same time bcm43xx driver again gave up, we decided to stick with ThinkPad for darkcast (conveniently located on top of speaker) and moved off the stage so that program can finally start.

Having done that (with just half of hour or so delay in program start because we where fiddling with stuff) we started streaming... silence. We had connected line out from mix panel to mic in on laptop, we could ssh into it and tweak alsa setting, but all we got out was silence (we even checked with arecord -F cd foo.wav on stage laptop and aplay foo.wav on local laptop to be sure that it wasn't darkice/icecast problem.

Then Damjan suggested to press space on Capture in alsamixer (we had Capture only on Mic up to that point) and magically sound appeared. So, we had working stream, and blog post above got written. Audio levels where sub-optimal (to use kind word), but first part was nearly over, so we had pause and Saša tweaked audio levels, and we changed compression setting to lower quality so we can push it through ADSL upstream more easily.

I even remembered to record stream using wget before second part started, so we'll have a listen to it after we get some sleep to see how good the quality was. We got a couple of listeners from Croatia via #razmjenavjestina IRC channel so we are hoping for some feedback also :-)

All in all, it was a lot of fun, but I will plan to write complete walk-through while installing icecast on bljak. I hope to leave one working darkice client here in K77 so that future streams can be made much more easily.