5/1/08

Squeezing The Most Out Of Your Squeezebox

The Squeezebox
Warning: lengthy technical post ahead that will bore most of you to tears. For the brave and the ultra-hip, read on. What follows is a tutorial on how to setup and configure your Squeezebox, including external tools like MusicIP, SoftSqueeze, and Moose.

This post is for all you Squeezebox owners out there, or anyone who wants to stream their music library to somewhere other than their computer. What's that, you say? You don't own a Squeezebox? You've never even heard of it? You don't want to be able to listen to your entire music collection from anywhere, even through that awesome hi-fi stereo you bought and never use? Well, it's time for that to change. Read on, gentle reader, and prepare yourself for the future...

Squeezewhat?

For the uninitiated, the Squeezebox is a hardware audio component manufactured by Slim Devices (which became a Logitech company last year). The Squeezebox plugs into your stereo receiver, connects to your wireless network, and streams your music collection off of your PC (or another networked storage device) so that you can listen to it on your stereo. That's it in a nutshell. Very simple, remarkably powerful. Of course, it can do a lot more than that, but if you just want something that will let you listen to all the music on your computer via your stereo, this is it.

David Pogue from the New York Times made a great video explaining the concept quite simply.

You'll see on the Slim Devices web site that there a few different models: the Transporter (for crazy audiophiles), the Duet (this includes a receiver, which is basically a Squeezebox minus the screen, and a remote control with a fancy screen that can control multiple receivers - great for multi-room usage), and the plain old Squeezebox, which is what I have. The tips I'm writing about here are for all of them [Editor's note: the vast majority of these tips are for Windows, because that's what I use], because I'm mostly talking about the software side of things here, starting with...

The SqueezeCenter

SqueezeCenter is the new name of what used to be called SlimServer. This is the server software that runs on your PC or your network-attached storage (NAS) device and sends data to the Squeezebox. I grappled for a long time with many previous versions of SlimServer (it's written in Perl, not my native language, so this was slow going for me at times), and I'm happy to report that the latest version (SqueezeCenter is technically version 7) is, to be technical, "totally awesome." It's easy to use, and it comes pre-configured with some of my favorite plugins. But I'm getting ahead of myself. To get started, just go to the download area on the SlimDevices web site, download, and install.

The first thing that will happen is SqueezeCenter will scan your music library. If for some reason you are silly enough to use iTunes, you can have it read everything from your iTunes library. If you just have a folder where you keep your music, you can point it there and it will read everything in. If you use the amazing MusicIP music discovery tool (more on that later), it can read from that as well.

The information that SqueezeCenter gives you about your music comes directly from the ID3 or other tags that you've written to your files. If your files aren't tagged, I would recommend tagging everything before you scan your library. The aforementioned MusicIP can help you organize your library and clean up your tags. There are also some great tools available from MusicBrainz, the giant community-driven music metadata site. I use Picard, but there are others available for downloading from their homepage.

You will also want to start getting cover art for your albums - the cover art will display in the SqueezeCenter web interface and also in Moose (see below). I use Album Art Aggregator, which works pretty well.

If your library is a real mess, you will probably need a few of these tools. If you're looking for the one ring to rule them all, I would look no further than MediaMonkey. Not only is it a powerful media player, it has tools (and add-on scripts available) to help you organize and tag your library, create playlists, download cover art, and sync to a wide variety of portable devices. It's basically the bomb. While we're on the topic, if you just want the best media player out there without all the library organization features, check out foobar2000.

Once the scan is complete, you're ready to go. Simply hook up the Squeezebox, turn it on, go through a couple menus, and you can start streaming your music to your stereo. Awesome. But what if you're hankering for more? Well, then...

Let's Get Fancy

Let's talk about some of the cooler features of the Squeezebox. The first one is the web interface. If you double-click on the little tray icon on your computer, that will launch the web interface, where you can configure your settings, create playlists, browse your library (by artist, genre, album, year, etc.) The latest version of the web interface is much faster than previous versions and pretty snazzy-looking, but you can change to another skin if you don't like the default.

Techie note: if you want to access the web interface from outside your home network, you will need to forward port 9000 to the machine that's running SqueezeCenter.
Perhaps the coolest thing you can do with the web interface is control your Squeezebox itself. You can turn it on and off, play, pause, and everything else it does, all without the remote. This is, of course, ridiculously awesome. In fact, the only thing that could possibly make the web interface better would be for it to be really fast, have all sort of cool animated cover art choosers, drag-and-drop playlist management, and a bunch of other cool stuff. Enter...

Moose

Moose is a (Windows-only, sorry) great piece of software that acts as a software replacement for the web interface. The web site can tell you more about Moose than I feel like repeating here, but I will go so far as to say that Moose is, without a doubt, the best thing to happen to my Squeezebox. Rather than rely on a connection to the MySQL instance that SqueezeCenter is running, Moose creates its own little custom database file that it uses to represent your music library. This allows Moose to behave really, really fast. The interface is great, you can create and edit playlists, there's a ton of display options, and (my favorite feature) you can set it up to respond to your keyboard's media hot keys! Just like a real software media player!

Techie note: If you're running Moose on the same machine as your Squeezecenter, you should have it use the MySQL scanning option to build its library. If you're using Moose from another computer, see the techie note below.
Moose and the web interface are particularly helpful if you're not using the Squeezebox itself, but you still want to listen to your music collection. What, you say? How can you stream your music without using the Squeezebox? Well, by using...

Softsqueeze

Softsqueeze is the software-only version of the Squeezebox. It's essentially the same firmware that runs the hardware, but in a little Java applet that you can run on any machine. This is what I use every day when I'm at the office to play my music that lives at home (which is all my music). To use it, go to the "Extras" menu in SqueezeCenter and click on the link. You will have to go into the settings (look in the top-left area in the Softsqueeze interface for the button, it's one to the right of the remote button) and enter in your server IP address or hostname, etc.

Techie note: You will need to forward ports 3483 and 9090 to the machine running SqueezeCenter in order to connect from Softsqueeze.
Softsqueeze is great, but there are a few caveats:
  1. Make sure you're using the latest version. The one linked from the "Extras" menu in SqueezeCenter should be fine. The Sourceforge site is usually up to date, too. As of this writing, the latest version is 3.5.

  2. It may warn you that you are not using the Java MP3 plugin. It will then give you a link to download this plugin from Sun. The Sun installer is broken (it will just keep asking you where to install it again and again). With previous versions of Softsqueeze, you could get around this by simply extracting the .jar file and putting in /lib/ext underneath your Java installation folder. However, I found that with the latest version of Softsqueeze, this did not resolve the issue. You can disable the warning in the Softsqueeze settings, and I haven't found there to be a real difference in the audio quality. I submitted a bug about this to Sourceforge, but no action on that front yet.

  3. Don't think that you're stuck controlling Softsqueeze with its own interface. You can use Moose to do this! If you're going to do that, keep reading, and then check the "use system tray" checkbox in the Softsqueeze settings. This will make Softsqueeze minimize to the system tray rather than the taskbar in Windows when you minimize it. That is awesome.

  4. If you have FLAC or other high-bitrate audio files in your library (and you should), make sure you enable bitrate limiting, or you will get choppy audio. To do this, have Softsqueeze running, then go into the SqueezeCenter web interface, and click on Settings. Select your Softsqueeze player from the player dropdown, then go to the Audio menu. Select a bitrate from the Bitrate Limiting dropdown (I'd recommend 192 if you have a normal internet connection at home with crappy upload speed, but play around and see what works for you), and a LAME quality level (I haven't found a big difference in the LAME quality level). NB: If you see a note that says something along the lines of "you don't have lame installed on your system," you will need to install it. Even if it says "The LAME encoder appears to be installed correctly on your system" it may not work unless you copy lame.exe into c:\windows\system32\.
If you're using Moose to control Softsqueeze on a remote machine, Moose will need its own local library (.moo) file. If you're like me, and you're frequently updating your library, you will want to keep this file up to date. There are a few ways to do this:
  • Use the MySQL scanning feature of Moose, or

  • Run a Moose scan on the same machine as your SqueezeCenter, then copy the .moo file to your remote machine.

Techie note: I would try the remote MySQL method first (check the server unbinding checkbox in the settings), but personally I haven't had much luck with it - it's pretty slow, and it usually fails for me. If you are using it, make sure to forward port 9092 to allow Moose to access your MySQL instance from outside your network. See below for my notes on automating the file copy method.
Once you have a copy of your library file, you can use Moose to control your Softsqueeze instance, and thus have all of your music available to you wherever you are, with all the added benefits of Moose (speed, media hotkeys, etc.). This is, of course, totally awesome. [Editor's note: how many times have I used the word "awesome" in this post? Not enough, apparently.]

So now you're sitting at some remote location, streaming your music via Softsqueeze, controlling it all via Moose, and having a grand old time. But you feel a vague yearning for more awesomeness. Perhaps it's time to install some...

Plugins

Yes, SqueezeCenter is extensible via a whole mess of user-contributed plugins. These range all over the map in terms of functionality, and if you know Perl, you can write your own and put them out there for everyone to enjoy. I'm just going to talk about a few that I use.

Awesomely, SqueezeCenter comes with my 2 favorite plugins already installed:
  • Last.fm Audioscrobbler

    This plugin lets you submit your played track data to your last.fm account, just like the last.fm software does for a variety of desktop media players. Just enter your account info in the settings and you're good to go. If multiple people connect to your SqueezeCenter using different players, you can add multiple last.fm accounts and tell each player to submit to a different one. Very handy if you don't want last.fm to start recommending a bunch of crap to you based on someone else's taste. NB: Remember to go into the settings for each player (Softsqueeze counts as a player) and select a last.fm account - even if you only have 1 account set up, all players default to not submitting track data.

    This plugin also lets you play a last.fm stream through your Squeezebox, if you're into that sort of thing.

  • MusicIP

    MusicIP is similar to Pandora or Slacker or Last.FM: it makes playlists for you based on songs you already know. The huge difference is that it does this out of tracks from your own library. If you have a large music library like I do (58,590 tracks and climbing), you sometimes forget what you have. Or you have stuff that you wanted to own, but you've never listened to every track. MusicIP is a perfect fit here. You give it a song (or an album, or an artist) and tell it to generate a mix based on that input. It gives you back a mix of songs from your library that have musical qualities in common with the seed song. It's a great way to get re-acquainted with your own music collection.

    To clarify, SqueezeCenter only comes with the plugin that allows it to interact with MusicIP, it doesn't come with the MusicIP software itself (which is available for free here). To get them to play nice together, follow these steps:

    1. Install MusicIP.

    2. Have it scan and analyze your music library (this will take a long time if you have a really big library). NB: If you don't want all your file timestamps getting updated to today, go into the preferences before you scan and check "Preserve file modification time when updating tags."

    3. Follow these instructions for setting up a "headless" server. It also has instructions for setting the configuration options in an ini file; scroll down to the bottom for those, they're important. The most important one is "api=1," that enables the web-based API that SqueezeCenter will use to connect to MusicIP.

    4. In your SquezeCenter settings, enable the MusicIP plugin (if it's not enabled already).

    5. Go into the Services controller (Start->Run..., type in "services.msc") and stop the MusicIP service. Then stop the SqueezeCenter service. Then start the MusicIP service (first!), then start the SqueezeCenter service (second!). Doing things in that order will ensure that SqueezeCenter can see your MusicIP instance.

    At this point, you can choose to have SqueezeCenter use MusicIP as its sole source for your music library (instead of specifying the path to your music folder - just blank out that field in "Basic Settings") if you want. Pro: your rescans will be faster, as SqueezeCenter doesn't have to trawl through your physical file structure. Con: you have to keep your MusicIP database up-to-date (which you should do anyway), and any music you add to your library will be unavailable until you update the MusicIP database then have SqueezeCenter rescan, and you won't be able to browse your library by music folder (which is pretty slow anyway). Personally, I use both MusicIP and a specified folder. More on my setup below.

    More important than all that, you can now use MusicIP to generate mixes via SqueezeCenter or from the Squeezebox or Softsqueeze (sadly, Moose can't do this yet, but I've been bugging its author about it). In the web interface, click the little "m" icon next to a song or album or artist. If everything's working correctly, SqueezeCenter will generate a mix for you based on what you selected. The mix takes the form of a temporary playlist that you can then add to "Now Playing" to play. All together now: awesome.

    Techie note: Sometimes the little "m"'s disappear for me, which usually indicates that the MusicIP service has gone wonky. Restarting it usually fixes that. I got tired of restarting it, so I use Windows Task Scheduler to automatically restart the service for me every 6 hours by running a batch script that looks like this:

    net stop "MusicIP Server"
    net start "MusicIP Server"

There are a ton of other great plugins, far too many to go into detail about here (wouldn't want this post to get long) but I will take some space to recommend TrackStat, which keeps statistics on how often you play every track in your library and lets you rate songs on a customizable scale. As an added benefit, if you're using Moose and you enable TrackStat, you can rate songs right from the Moose interface! How awesome is that? Very. Also, the author of TrackStat is really nice, he helped me debug some problems I was having due to my library size.

And if you're not completely exhausted by now, read on to learn about...

My Setup (Chock Full of Advanced Tips and Tricks)

Some of my readers (well, one guy) asked me about my setup recently, which inspired this whole overwritten blog post. Here's how I roll, as illustrated by the journey a song takes on its way from the CD to my ears:

  1. Rip the CD using Exact Audio Copy. This is probably the best guide on the Internet to using EAC, you should read it. I rip all my CDs to FLAC, which offers so-called "lossless" compression. The files are on average about half the size of a full WAV file with no discernable loss in audio quality. NB: On rare occasions, instead of purchasing a CD, I will visit a bittorrent site and download about "as many albums as I can get my greedy little hands on." But the rest of the process is the same.

  2. Store the ripped files on my NAS. I use the ReadyNAS NV from Infrant (who recently became property of Netgear, sadly...this apparently meant "upgrading" their formerly useful web site to Wordpress). Mine has 4 500 GB Seagate Barracuda hard drives inside; using Infrant's proprietary X-RAID system (basically a variant on RAID-5), I get about 1.3 TB of usable space. Right now my music library (including cover art, FLACs, MP3s, and the occasional 20-page PDF of liner notes) takes up about 970 GB right now, which means it's about time for some new hard drives.

    For those of you paying attention, you may have figured out that the ReadyNAS is capable of running SqueezeCenter on its own OS, and they even used to offer a handy image file you could upload to the NAS that installed SlimServer 6.5. I don't use this, for the sole reason that the majority of my library is in FLAC, and the CPU on the NAS is simply not powerful enough to do bitrate conversion on the fly. But if that's not a concern for you, I'd recommend you go this route if you have a NAS; for one thing, it means not having to keep your computer on all the time just to access your music.

    2A: If you've downloaded files rather than ripping from your own legally obtained CD, now would be a good time to use foobar2000 or Media Monkey or MusicBrainz to tag those files.

    2B: If you haven't downloaded cover art for your album yet, do it now! SqueezeCenter will automatically display any file in the same folder as your track called "cover.jpg" (yes, this is configurable).

  3. Update my MusicIP database. Rather than do this manually, I'm using the Windows Task Scheduler (like cron, only shitty) to make a series of calls to the MusicIP API every night using wget for Windows (MusicIP does have a command-line utility you can download, but it only recognizes "/api" commands, not "/server" commands, which I only knew about by viewing the source of the server's main index page), like so:
    1:00 AM
    "C:\Program Files\wget\wget.exe" "http://localhost:10002/server/reload"
    This reloads the cache, in case it changed during the day. (Not entirely sure I need this step, but whatever).

    1:30 AM
    "C:\Program Files\wget\wget.exe" "http://localhost:10002/server/refresh"
    This tells MusicIP to clean up references to files that have moved or been deleted.

    2:00 AM
    "C:\Program Files\wget\wget.exe" "http://localhost:10002/server/add?root=[path to my music folder]"
    This adds any new music that's not already in the cache.

    3:00 AM
    "C:\Program Files\wget\wget.exe" "http://localhost:10002/server/validate?action=Start Validation"
    This is the big one. This tells MusicIP to "validate" all the tracks not already in the cache. "Validate" is their word for "scan using our fancy algorithm so our software can use this track in generated mixes or let you use this track as the seed for a mix."
  4. Re-scan my SqueezeCenter library. Again, I don't do this manually, that's for suckers. Instead, I go into the SqueezeCenter settings, click on the Advanced tab, and choose "Rescan Music Library" from the dropdown. I have my library rescan itself every morning at 4:00 AM, using the "Look for new and changed music" option. NB: If you are not using a folder path, and are just relying on iTunes or MusicIP as the source of your library, you don't need to rescan. You can tell SqueezeCenter to update itself automatically whenever that library source changes. But I like to do things the hard way.

    Speaking of the hard way, if you're running Windows XP, and your SqueezeCenter is on the XP machine, but your files are on a NAS, make sure to run the SqueezeCenter service as an XP user with admin rights (or at least rights to the NAS). The SERVICE user won't get the job done. Same deal for the MusicIP service.

  5. Update my Moose library. As I mentioned earlier, the remote MySQL scanning feature in Moose never quite works for me, so I prefer to use an updated copy of moose.moo. I update it every morning using Windows Task Scheduler to run a batch script that looks like this (NB: you will need the Winzip Command Line add-on for this, as well as a remote FTP server and SFTP Drive to map that server to a network drive):
    cd "c:\program files\moose"
    "moose.exe" /justscan
    "c:\program files\winzip\wzzip" -f -ex "moose.zip" *.moo
    copy /Y "c:\program files\moose\moose.zip" s:\
    In this script, "s:" is my mapped drive. That "/justscan" option is a cool feature of Moose, where you can tell it to start up, rescan your library, then shut down. On the machine that will need the updated moose.moo file, I simply copy it down and extract it via another batch script, like so:
    cd "c:\program files\moose\"
    xcopy /D /Y S:\moose.zip "c:\program files\moose\moose.zip"
    "c:\program files\winzip\wzunzip" -f "c:\program files\moose\moose.zip" moose.moo
    I forget why I use "copy" in one script and "xcopy" in the other one, but there's some reason. The flags I'm using for xcopy, copy, wzzip, and wzunzip do various things like prevent copying a file with an older timestamp over a newer one, or trying to unzip an empty file on top of one with data.

  6. The final step is to enjoy my music, make mixes with MusicIP, submit my track data to Last.FM (automatically, of course), and know that all my hard work has paid off.
Well, that's it. If anyone actually read this far, you have my congratulations. I hope you enjoy your Squeezebox and that you got something out of this post. Please comment and tell me about your setup! And before you go, check out these super-useful links:
OK, I'm done for real now. Thanks for reading. Did you know I'm also a content management expert?

18 comments:

Nate said...

Totally Sweet.

I can't wait to put some of these ideas into action!!!

Thanks

Molly Malone said...

um. wow.
pretty much everything after "tag your music" was lost on me. but i trust that's all important stuff. i'm going to make myself some chamomile tea, now.

Nonreality said...

Very nice, you use a lot of the same things I do except I've switched from EAC to dBpoweramp. The new ripper on it's beta allows you to rip from 2 or more cd or dvd players and is way cool. Uses accurip and amg. Drawback is you have to buy it. but it's not bad. I'm going to try to understand how to run music ip headless. I looked at doing it once and it looked too complicated but I want to use it. Thanks for the guide. It should help people.

DavidW said...

Thanks for taking the time to post these tips about your setup, especially the tools/utilities to get one's music library in order. This is quite helpful as I look to get beyond my basic squeezebox setup. Great writeup.

Anonymous said...

Fantastic guide- thanks for taking the time to make the process appear simpler.
Alongside Moose, I have changed from SoftSqueeze to Squeezeslave- it is MUCH quicker, and crucially it allows Moose to fast forward scan easily through each track (by clicking on the progress bar), something which SoftSqueeze refuses to do on my setup.

Nate said...

another note on Moose Remote Scanning of the MySQL DB. As it turns out on XP Pro (and probably on vista) you have to create a special firewall rule to allow remote access to the MySQL server. You do this by going to Setup->control panel->Windows Firewall , go to the exceptions tab at the top, add Port button and then open up 9092 on there and call it something like "moose mysql port" . After you do that remote scanning will be in business, but may be slow as crap if you have a huge library. =)

Dukeisaac said...

My setup is similar to yours. I switched from EAC, which I find to be slow and complicated, to Plextool to rip the CDs. I had to buy a Plextor drive to get Plextool. I find it to be much faster and much much simpler than EAC. It takes on the average 3-5 minutes to rip a CD while EAC took more than 15 mins.

My setup which consists of 3 SB3s (wireless)and 13800 FLAC tracks on a 500 GB external HD is running from a Vista (64 bit) computer. I use MusicIP (headless) and love it. I'm contemplating using a NAS that will allow me to listen to my music w/o the computer running. There are many choices out there and I'm not familiar with any of them. The NAS must be able to run both Squeezecenter and MusicIP. It appears to be quite complicated and I have no clue how to proceed. Any help would be greatly appreciated. Thanks for the guide. I'm making plans to make use of some of the other plugins you describe.

Thomas said...

Hey Jordan,
This is exactly the post I have been looking for. Thanks a zillion!

I just got a ReadyNAS Pro Pioneer edition with 2.7TB of usable disk space. I have 2 Squeezeboxes, a duet, planning on adding a Boom and most likely even a Transporter (just got a new stereo).

I have a legacy music library in MP3 format and use iTunes & iPod. I did read somewhere when I was researching FLAC/EAC that someone recommended bifurcating the music library into lossy-compressed and lossless-compressed top level folders. That seems to make sense to me since ideally, I would like to point the Transporter only at the lossless folder and the rest of the devices at the lossy folder (which will contain all the lossless tracks + lossy tracks).

I have not gotten around to installing the SqueezeCenter on the ReadyNAS yet, but I was wondering if you had a view as to how to manage the high level music library organization so I start out on the right path. I need to check out MusicIP to see if it will work natively on ReadyNAS too.

Thanks in advance for any tips.

Cheers,
Tom

Anonymous said...

Well I understood some of this, and for that many thanks. I have a large classical music library all manually tagged using MM. The problem I have is that my squeezebox (duet) only reads the data from the original ripping, not the updated tags I manually entered on MM. So scrolling through the handset of the SB is pretty useless. For example I might have five different versions of a Beethoven piano sonata, and they can all be listed differently rather thank together. Is there anyway to get the MM tags read by or over to SC?? Have searched the internet but cannot find any real answer. Many thanks Charles - Liverpool UK

Anonymous said...

I have the same problem Jordan, any ideas please?
Many thanks.
Gary.

klinsinow said...

Amazingly detailed information. I'd search for hours and never find everything you put down in one place!

After finding your post, I was swayed to Squeezebox duet over the Sonos ZP90! My main concern before was running the software continually on my PC, however it's clear that there are alternatives. Plus the streaming music to outside the house sounds really neat.

Thanks!!!

B1tbull said...

This is really a gem !
Too bad I did not google into this 2 years ago when I got started with the Squeezebox Classic.
While finding all of this out the hard way it's amazing how well this matches my current setup.
Great minds think alike :>)

seo services said...

The release of the promised Logitech SqueezeBox Touch has again been delayed. Logitech Squeezebox is a finalist for Home Entertainment Device.

Pie-eater said...

Totally awesome post, dude!
I learned a lot.

CEDROM-SNi said...

Best post. Ever.

So many useful info, thanks to you I discovered all the hidden magic of my squeezebox setup (1 squeezebox duet, 2 boom).

kudos !

Anonymous said...

Awesome it is. This is a masterful description of how to use Squeezecenter and all its associated plugins, including ReadyNAS relevant stuff, Music IP, etc. Ta v. much.

JvC said...

Wunderfull info. I immediately installed moose, even while reading, and got it running instantly. Great improvement.
Using win7, Squeezebox touch, Media Monkey, FLAC, Moose.

Thanks !

Jasper (The Netherlands)

Paul said...

Great post, thanks!