Avoiding the analog: Icecast2 for OS X, Sonos & Spotify Radio

Apparently, Spotify has finally released their Radio API to certain content management platforms, but until it’s built into Sonos the only way to actually get Spotify Radio on my ZP80 was to use the analog line-in.  What about creating an Icecast (Shoutcast, Podcast, etc.) local radio station that I tune in to on the Sonos locally? This would then avoid the analog hole (until I add a phonograph line stage).

There were a few sources I had to use to make this work, and I’ve only built/tested this under 32 bit 10.6.8 Snow Leopard (so your mileage may vary for 64 bit and/or more modern OS X machines).  Joao Ricardo’s blog post of  “Icecast Radio in Mac OS X” turns out to be a great starting point.  Note, that he recommends installing MacPorts, which may not strictly be necessary if you have Homebrew already installed.  I have not tried to port Icecast via Homebrew, but I imagine the installation would also work, as others have had success.   For example, here’s Josh Dzielak’s tutorial for Icecast & Darkice using Mountain Lion and Homebrew

So yes, per Joao’s instructions:

1) Install MacPorts (note: there are several dependencies, read up before you even install MacPorts)

2) In Terminal$: sudo port install icecast2

  • If doing Homebrew$: brew install icecast
  • Icecast vs. Icecast2?  I don’t know. You tell me internet, you tell me.
  • This took like 30 minutes using MacPorts on an old 32 bit Intel machine

3) Install Ladiocast.

4) Install Soundflower.

  • Reboot machine.

5) Make sure your admin/user has access/rights to “icecast -c /usr/etc/icecast.xml” as well as wherever an error for Icecast’s “access.log” and “error.log” files.  In my case they needed to added to /opt/local/etc.  You’ll need to adjust access with “chmod 755″ in this example.

6) Start playing some music on your Icecast server machine.  In OS X “Sound Preferences” make sure “Soundflower 2ch” is set as the “output device”; you can also “option + click” on the volume in the at the top right menu and select the source.

7) From Terminal$: icecast -c /usr/etc/icecast.xml

  • At this point Terminal will need to be open, obviously you can set this up as a background process, run on startup, etc. see Josh’s article linked above.

8) From within Ladiocast choose “Soundflower 2ch” as your source, click on the “main” button in Ladiocast.  You should see music bars making music.

  • From the menu in Ladiocast click on “Streamer 1” choose Icecast.  Set 127.0.0.1:8000 or whatever you machine’s IP is for the server.  The default user and pw is located the XML file.
  • For encoding, especially to work with iTunes and probably Sonos, I set it to AAC 320 kbps.  Ogg may in fact work with Sonos, I’ve not tried it.
  • Click “Connect” at the bottom there.

9) In a web browser, type in the IP for the Icecast server.  If said machine is localhost use 127.0.0.1:8000 which is the default port for the service. Click on the .m3u link and open in iTunes/Winamp or similar.  If you have music bars making music and you have a .m3u created you should hear music (double check OGG vs. AAC).

10) Final step: open the desktop Sonos App. Click “Manage” from the menu bar and then “Add Radio Station” and the enter http://127.0.0.1:8000/stream.m3u (or whatever your IP is for the Icecast machine).  Create that as a favorite radio station.

11) Works for me.  If you want an Icecast radio station globally on WAN, well, poke those holes. Google a bit.  That’s not this blog entry.  Let’s hope Sonos adds Spotify Radio sooner than later.

 

Goodbye Comet

I returned the T-Mobile Comet and exchanged it for a cheap candy bar style Nokia prepaid phone. Android 2.2, on the Comet, simply required too much work. Skype was nearly unusable. The Gmail native app from Google had to be updated, and even then the sync functionality with Gmail didn’t work correctly. Let me re-state that: Gmail didn’t work correctly on a Google phone. Thankfully contacts synced fine, but I had to update nearly every app that came with the phone.

So, maybe it’s something to do with Huwaei and the T-Mobile build of Froyo 2.2 or perhaps things simply aren’t as polished across the board. Compared to my experiences with iOS 3.x and 4.x I’d say it’s like night and day. Yes, it’d be nice to have a bulk task manager (other than double clicking ‘home’) in iOS 4.2, but it doesn’t really make a difference, you can run 20 apps “backgrounded”. In Android you absolutely must use a task killer or your phone runs out of memory and turns to molasses. Multitasking in iOS simply works and is more intuitive. Skype works nearly as well as a native phone dialer, Netflix streams terrifically, and the bundled iOS apps are all winners. And with the 4.2 update I can stream audio to the Airport Express directly from the iPod Touch and wirelessly print. At no point using Android did I think to myself, ‘Man this is so much easier/quicker/better than the iPod Touch’, in fact I lamented that for $180, despite being the cheapest Android phone on the market, it just wasn’t very good.

It’s unfortunate, in my limited usage of WebOS I’d say that Palm had a superior product that was poorly marketed, that suffered early quality control issues, and with HP’s purchase, has essentially died a premature death. Compared to Android 2.2 – WebOS 1.x feels significantly more polished – and really should be second to Apple in smart phone market share. When you go to the Verizon store and look at the myriad Android phones (several now bundled with Bing! as default search engine) it becomes clear that the carriers and Google simply don’t care about the user’s experience. While I’m sure the newest Nexus S is a better example of what Android can do, I don’t trust telecommunication companies to make good UID & IxD decisions.