The Nokia N900 Icecast Server

This is the Icecast setup to stream radio from a Nokia N900 as discussed in Corner Geeks Episode 2. Follow the instructions below or watch the video below (direct YouTube link)

Setting up an Icecast Server on an N900

  1. Root the N900
    • Go to Application manager>>Application catalogs>>New
    • Write "maemo.org extras-testing" for catalog name
    • Give web address as "http://repository.maemo.org/extras-testing"
    • Enter "fremantle" as the distribution
    • Enter "free non-free" for components
    • Download rootsh from Application Manager.
  2. Open Terminal
  3. "sudo gainroot"
  4. Install icecast via "apt-get install icecast2"
  5. Search for gstreamer lame plugin: "apt-cache search gstream lame"
  6. Installer the gstreamer lame plugin: "apt-get install gstreamer0.10-plugins-ugly-multiverse" (this may change, just the search results from the previous steps)
  7. Start the Icecast server with the following command (this combines starting a Icecast server and sending audio via a source client all in one command
    "gst-launch pulsesrc ! audioconvert ! lame quality=9 ! shout2send mount=/listen.mp3 port=8000 password=YourPass ip=ServerIP"

    You can change the mount, port, password, ip values depending on your setup.

  8. The Icecast server is now up and running (assuming there are no errors / typos) and this will stream any audio playing from the device.

To stream Radio on your Icecast Server

  1. Install the FM Radio application from http://maemo.org/downloads/product/Maemo5/fmradio/
  2. Open the application and tune into the correct frequency
  3. Start the Icecast server
Advertisements

Pilihan FM Online Streaming – Part 2

So after the ‘failure’ in Part 1 the next step was to roll my own solution. I’ve been listening to the TWiT.tv network since Leo Laporte started it many years back and I noticed that they were running an Icecast server at TWiT.am that streams their audio. Perfect, a great place to start off so do a simple search for icecast on my Ubuntu box which gave the following results.

Went ahead and installed icecast2 and ices2 and after Google searching and fussing about I managed to get Icecast running and went on to configuring ices2. It took me some time to understand that Icecast streaming involves 2 components: the Icecast server (which is the machine people connect to in order to listen) and a source client which connects to the server and provides the audio source to the server to be streamed out. Started off with the typical playlist configuration as I did not have a radio at hand. Managed to get OGG streaming to work but then tried it on my sister’s iPad and was reminded that Apple doesn’t really like OGG and would probably only work with an MP3 or AAC stream. So I started fussing around with MP3 files and only to find out that ices2 didn’t support MP3 streaming (I tend to skip over things in my brain’s weird attempt to speed read and thus glossed over this fact: it’s even stated in the screenshot above that it is for “Ogg Vorbis streaming”). Oh well. Then for a reason I thought that I’d try a solution on Windows (I think I blame my possible ADDnes).

It was during this adventure in WIndows Icecast server setup that I discovered ezStream via the Icecast forum’s “Common Source Client List” and was able to configure MP3 re-enconding. The problem I ran here was that I could not hook the line-in input from my phone acting as a radio. I switched back to Linux and managed to get ezStream working but did not find a way to get it to stream from the line-in audio port as perhaps my Linux / gstreamer fu is not good enough yet. In a stroke of luck (or proper research and reading) I finally found darkice which solved my Linux streaming (for those who don’t like the command line there is darksnow that provides a good GUI interface for the darkice source client).

On yet another whim, I decided to tried setting up an Icecast server in OSX (I think it’s one of those ‘because-I-can’ syndromes, that I tried doing this). I managed to get Icecast running easily thanks to
MacPorts using a simple “sudo port install icecast2” but getting a source client was a bit more troublesome. I started with trying darkice due to my success using it in Linux. The problem? It required JACK audio connection kit which I could not get working in OS X. I have to say that JACK documentation seems severely lacking and I’m still left wondering how to use it. There is an OS X implementation of JACK called Jack OS X. I tried to understand how it works and how to use it using this YouTube video embedded below (turn on close captions, CC, for English subtitles) but new interfaces did not show up when starting applications so still no dice.

There was also a darkice Mac OS X branch build that I got the source (svn checkout http://darkice.googlecode.com/svn/darkice/branches/darkice-macosx darkice-macosx) for, but it seems that I do not have the necessary tools to compile it . So finally I found LadioCast which was the same saviour for OS X as darkice was for Linux. So I managed to get a Linux and OS X implementation running and there goes @mfirdaus managing to get it all working on his N900 with some gstreamer magic of “gst-launch pulsesrc ! audioconvert ! lame quality=9 ! shout2send mount=/listen.mp3 port=8000 password=password ip=127.0.0.1”.

Now while the reception on the N900 wasn’t fantastic, it is a great self-contained solution: no external radio or external monitor / keyboard to for configuration. So right now we have 3 implementations but still no proper Windows stand alone solution. I know there is Winamp with a shoutcast plugin, but I’m not sure how to pipe audio from a line-in port into Winamp.

So as I tinker and try to get a proper Windows configuration, I have set up an Icecast server at whose playlist can be accessed at http://bit.ly/pilihan. This URL should work for all platforms (tested with iOS, Android and VLC). You can just click the link and open the m3u file in the default player. This is my own server so may not be up all the time if there is some weird configuration issue / power outage, but hope it helps those who want to listen when they don’t have a radio at hand or for those overseas. Trying to get MFN to get a hold of the IT people at RTB to see if they can implement this on their own servers, but in the meantime self-hosting

TLDR: Click http://bit.ly/pilihan and listen to my server streaming Pilihan FM