Tuesday, October 6, 2015

Raspberry Pi Adventure - Setting up Icecast & Darkice

Recently I've had the privileged of helping a friend setup a Raspberry Pi for the purpose of streaming audio.  I haven't dabbled in the Linux world in a while, but I was quickly drawn in by all the fun typing at the terminal. 

Linux is very flexible, but not without challenges.  I had been told that Darkice and IceCast2 would give me audio streaming capabilities we were after.  The plan was simple, fire up the Raspberry Pi, terminal into it, install darkice and icecast2 configure them and get some sleep.  

My sleep routine was destroyed by this project :)  I didn't fully comprehend how difficult it would be to get into the Raspberry Pi.  I started by taking the SD card out, finding the file /etc/network/interfaces and setting a static ip for the network card.  Then I ran a network cable between the Pi and my PC's network card.  Using Putty,  I logged into the Pi.  Then I realized that I needed an internet connection. :p Thankfully the Pi had a USB WiFi  adapter.  Diving back into /etc/network/interfaces I followed the instructions here to setup the wireless connection.  

Once I was on the wireless network, I logged into the router to determine the ip of my device.  Once I had that I was able to use Putty once again to log back into the Pi.  By this point I was craving a GUI.  Typing sudo apt-get install xrdp gave me a Pi side service I could use with a remote desktop client to login and see the Raspbian Desktop.  

From that point I was able to install the apps I needed to get thing working.  So, once more sudo apt-get install darkiceicecast2.  After starting darkice, I was confronted with an error.  

DarkIce: AudioSource.cpp:122: trying to open ALSA DSP device without support
compiledhw:1,0 [0]
After some searching for this error, I was drawn to the following post.  DarkIce needed compiled with ALSA DSP support.  So after carefully following the article, on the second try I was able to get everything to work.  Note: if you are following this guide, you still have to use common sense.  For example package names may not be exactly the same as what is in the guide.  

All said, after a few false starts it turns it wasn't hard at all to set this up on the Pi.  Just very time consuming :)




Inline image 2

2 comments:

  1. Hey can you show exactly what package name was different from that tutorial ? i followed the tutorial on the link you gave completly but i'm still getting that error.

    ReplyDelete
  2. I went back and skimmed the tutorials that I linked. Nothing seemed familiar, though I believe what was different was something as simple as a version number. Sorry I can't recall better, next time I'll take better notes ;)

    ReplyDelete