Monday, 14 July 2014

HOWTO: Spotify (Free) Streaming To Squeezeboxes



It's been a great weekend!

Managed to enjoy BBQ with some family visiting overseas for summer, enjoyed the World Cup finals (congrats Germany), finally put up the dining room pendant light (waiting months for the thing to come in stock!), finished some work-related financial paperwork, and finalized some scheduling for a trip to China later this year. Not bad for a weekend.

Even better for this weekend... I rejoiced at the arrival of Spotify to Canada. Previous to this, I was accessing it through Hola! Unblocker on occasion to have a look at what all the Americans have been enjoying. I guess one of the conditions to Canadian entry must have been to include Canadian content and perhaps French language content - French ads show up once awhile now. I might get a subscription in the months ahead depending on how often I access it on my cell phone and around here at home. The fact is, I already have a large collection of music on my server and the music collection is growing as I add more vinyl titles (in that regard, I've made a number of changes in the system which I'll post about later).

This brings me to thinking about these streaming services which I'll also talk about in the days ahead. For now, I'll have a good listen to Spotify and see how it integrates into my life.

Since I have a full Squeezebox "family" around the house, I figured it would be nice 'tuning' into the Spotify stream with the devices. For those interested in trying to stream free Spotify (with ads) to their Squeezebox system, you can follow the instructions below originally found in an older Squeezebox Forum post (thread started by 'ejnj' in 2011 but instructions from Nick Kewney). Remember that the Squeezebox Spotify plug-ins require the 'Premium' account. This 'hack' essentially converts the audio from your PC to a stream for the Squeezebox device through the PC's URL (making the PC audio output a radio stream); music selection is through the Windows PC's usual Spotify app. I've included the instructions here with some annotation for my Windows Server 2012 R2 system:

Playing Spotify Free (with ads) through Squeezebox

Spotify is a peer-to-peer music streaming allowing users to listen to specific tracks or albums on-demand.

Despite launching clients for Android, Symbian and iPhone OS, an officially supported Squeezebox Server (formerely SqueezeCentre) client for Spotify hasn’t yet been unveiled (there's both an official plug-in for Radio and Touch now as well as third party Triode plug-in for the older units). Until somebody gets their Perl boots on and creates one, I’ve created a short tutorial demonstrating how to stream audio from Spotify on your PC to your Squeezeboxes. It works by utilising DirectSound Bridge, a small wrapper which exposes the playing stream as an MP3, which can be received by your Squeezebox.

It really is pretty simple. To start, you’ll need to download two files to your PC:

* The Lame MP3 Encoder (I've included the link to RareWares - I used the 3.99.5 "for older Win32 OS's"; the 64-bit version did not work for me) 
* DirectSound Bridge (current "dsbridge-20090727-bin.zip" worked for me)

Next, you'll need to:

1. Close the Spotify application if it is currently running. On Windows 7, you might have to launch the Task Manager and end the process. (Best to go up to File/Exit on the Spotify desktop app to shut it down.)

2. Open the Lame MP3 Encoder archive you just downloaded and locate the file “lame_enc.dll” and copy it to the Spotify directory on your local PC (e.g. C:\Program Files\Spotify). On my Windows Server 2012 R2, as Administrator, use: C:\Users\Administrator\AppData\Roaming\Spotify.

3. Open the DSBridge archive and copy “DSound.dll” and “DSBridge.ini” to the same folder in step 2.

Open Spotify as normal and start a track playing. It’s best you turn the volume down as your PC will only be used as a controller for streaming to your Squeezeboxes. You will notice a new icon in your system tray. It’ll be blue when idle and green when streaming music (the icon looks like a colored orb; put your mouse pointer over it and it's tell you which port - usually 8124).

You’re done. Now, you just need to tune in to your stream from your Squeeze Centre web control panel, in effect creating the bridge between Squeeze Centre and Spotify.

Do this by entering your Squeeze Centre address into the address bar (mine is http://192.168.1.80:9000).

Locate Internet Radio / Tune In URL on the web interface and enter the address of the PC running Spotify. In my case it was http://192.168.1.80:8124.

In a few seconds, you should hear your Squeezebox connecting to the server and playing your Spotify stream. You'll hear that the music from the desktop speaker will cease when the Squeezebox plays. Track titles and artist will be displayed, no album cover image. 

Tip: If you don’t know the address, go to your PC and press WINDOWS+R, type CMD and enter which will display a command prompt window. Now enter ipconfig and press enter again. The IP address will be displayed.

Of course by doing this, you'll need to use the desktop app to search and play your playlists. Not too bad if I'm on a computer and can Remote Desktop into the server machine. Note that this process will recompress the incoming Spotify stream (I believe Ogg Vorbis 160kbps VBR for the free content) to an MP3 320kbps - don't be afraid, it still sounds great! Tuning multiple Squeezeboxes to the same URL didn't work for me resulting in me needing to restart the Spotify app to get music out again.

-------------

I hope the instructions above are clear for those giving it a try.

Have a great summer! Enjoy the music... Cuz theres's a lot out there!


9 comments:

  1. Thanks for the article. I don’t see Spotify coming to my country anytime soon. However, there are plenty of workarounds available to access it here in my country. Personally, I use UnoTelly for more than a year and I can access Spotify like I am in USA.

    ReplyDelete
  2. Do you think the same thing would work on a Mac?

    ReplyDelete
  3. Hello, it stop working on my PC. Any solutions?
    thanks

    ReplyDelete
  4. Very interesting post thank you for sharing this information with us. I really enjoy simply reading all of your weblogs. if there is a time simply to visit kata kata mutiara thank you very much

    ReplyDelete
  5. gPotato Game Card Generator 2015 Free Download HERE >>>>
    https://www.facebook.com/GPotatoGameCardGenerator2015

    ReplyDelete