Listen to your music anywhere with Subsonic

310

Author: Federico Kereki

If your music library is tied to your CD collection or MP3 player, you can still hit the road without losing access to your tunes. Subsonic is a free, Web-based media streamer that lets you — and your friends — access your music collection over the Internet.

Subsonic can handle large music collections, running into the thousands of CDs. It also works with video; in fact, it can let you remotely access any format that can be streamed over a standard HTTP connection. If needed, Subsonic will convert your collection to a streaming format on the fly, taking into account the available bandwidth. You can use any browser and media player combination to listen to your music; I went for Firefox and RealPlayer, but other combinations are equally valid.

Subsonic released the current version 3.4 in April, and version 3.5 is in beta now, which goes to show that the program, though stable, is under active development. Subsonic is distributed under the Lesser General Public License (LGPL).

Installation

You can use Subsonic under most operating systems, including Linux and Windows. You can opt to install it as a Web application archive (WAR) or as a standalone version. The former is slightly more complicated to install, as it requires a server like Apache Tomcat or JBoss. Unless you’re already using one of these packages, you’re better off going with the standalone version, which has no such requirements. But either way, you do need to have Java installed on your media server.

Start by downloading the version you want to use. I opted for the 3.4 “all platforms” standalone one. Installation instructions are offered for each version, but the standalone version is simple to install. Since I would be the only Subsonic user at my machine, I decided to install the program at my home directory, /home/fkereki/bin/subsonic, but any directory will do. Unzip the downloaded package to the directory you choose, then edit the startup script, standalone/subsonic.sh. You need to check only four configuration items: the work directory (SUBSONIC_HOME; I created /home/fkereki/subsonic for this), the port Subsonic will listen to (SUBSONIC_PORT; I chose 9988, which is otherwise unused), the path for Web access (SUBSONIC_CONTEXT_PATH; I’d suggest /subsonic), and the maximum Java heap size in megabytes (MAX_MEMORY; I left it at 64, which worked fine for me). Save the file, then open the port you chose at the firewall.

Setup

To start Subsonic, run the standalone/subsonic.sh script. The first time you do this, Subsonic will inform you that you need to secure it. The default user and password are both admin; change them ASAP. Right-click the small tray icon and select Open; your browser will open the Subsonic administrator page, where you’ll be able to configure everything. Click the Settings icon, and then follow these steps:

  • In Music Folders, add all the directories where your music is stored. The music files in those directories will be the ones you will be able to access through the Web.
  • In General, select a directory for storing playlists, change the default theme if you want, and play around with other settings, such as the index entries or welcome message.
  • In Advanced, you can specify how to use LAME or another encoder to downsample the music if needed because of bandwidth restrictions. Also, if you’re using LDAP authentication, you can specify the needed access parameters.
  • In Personal, configure several easy-to-understand parameters, such as which data to show about tracks or whether to connect to last.fm and register your picks.
  • In Users, you can create new accounts and specify what they will or won’t be able to do, such as creating and deleting playlists; playing, downloading, or uploading files; or acting as administrator. Here is where you should change the admin password. Also, select the maximum transfer rate, so you won’t clog up your server by trying to dole out music at faster rates than you can send it. (As a rule of thumb, reserve some upload bandwidth; don’t specify your maximum available upload rate.)
  • In Transcoding, define commands that can change formats as needed, but note that installing those commands is your responsibility.

The rest of the settings are self-explanatory.

Using Subsonic

To connect to your Subsonic installation, browse to your home address and specify the port address and context path. To do this, you must either have a fixed IP or configure something like DynDNS, which you can read about in “Getting started with dynamic DNS.”) In my case, I needed to access remotekereki.homelinux.com:9988/subsonic.

Selecting what music to play is simple. Browse the index on the right side of the screen, where each entry corresponds to a directory on your server. (In my case, I have a directory for each artist, with a subdirectory for each album.) You can add all tracks to your playlist or add them one by one by clicking the + icons. You can also click the play icon and have the chosen song start automatically. You can reorder the tracks in your playlist by using the up and down arrow icons, and also shuffle it randomly. Finally, in case you run out of music, you can set the playlist to repeat automatically.

You need to experiment to pick the optimum data rate, but once you get that down pat, you can just let it be without any further configuration — even when you add new music. If you create (with a ripping tool, for example) a new folder with an album at one of the music directories you specified, Subsonic will pick up the album automatically, and take care of keeping its indices and internal data updated.

By using Subsonic, you can listen to your music anywhere that you have an Internet connection with no fuss.

Categories:

  • Graphics & Multimedia
  • Internet & WWW