This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Graphics & Multimedia

Listen to your music anywhere with Subsonic

By Federico Kereki on November 05, 2008 (4:00:00 PM)

Share    Print    Comments   

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.

Federico Kereki is an Uruguayan systems engineer with more than 20 years' experience developing systems, doing consulting work, and teaching at universities.

Share    Print    Comments   

Comments

on Listen to your music anywhere with Subsonic

Note: Comments are owned by the poster. We are not responsible for their content.

MPD + IceCast

Posted by: Anonymous [ip: 164.76.179.155] on November 05, 2008 06:56 PM
Another option is MPD and IceCast. IceCast is a SHOUTcast type program, and MPD is a music playing daemon. There are web based clients for MPD.

#

Listen to your music anywhere with Subsonic

Posted by: Anonymous [ip: 199.72.142.58] on November 06, 2008 05:35 PM
Another really great program that does this same function is gnump3d. All it requires is that you have some perl environment installed, so it pretty much will work under Linux right out of the box (but it can be made to work in Win/MacOS). It sets up a webpage that you can go to to choose which songs you want to play and it will either stream them to you or let you download them to the other machine. All that is required of whatever other machine you are at is a music player like winamp/xmms and an internet connection/browser. It will let you customize the web interface it creates, which portions of your music collection you wish to share like that, the bitrate at which it streams, and it streams both OGG and MP3.

Give it a spin, its a great program!

#

Listen to your music anywhere with Subsonic

Posted by: Anonymous [ip: 70.61.143.101] on November 06, 2008 06:10 PM
Another option is Ampache. I was looking for something to be able to stream my media collection while I was at work and on the go. This was a breeze to install and setup. If you have a webserver already running, then this is a great choice.

-Eric

#

Listen to your music anywhere with Subsonic

Posted by: Anonymous [ip: 209.115.246.74] on November 06, 2008 10:58 PM
How long till the RIAA sues them into oblivion?

#

Listen to your music anywhere with Subsonic

Posted by: Anonymous [ip: 168.158.191.171] on November 08, 2008 05:12 AM
Another awesome option, Jinzora
http://en.jinzora.com/

#

Listen to your music anywhere with Subsonic

Posted by: Anonymous [ip: 72.40.70.96] on November 09, 2008 05:17 AM
Another option is SqueezeCenter (formerly SlimServer). It is a cross-platform, perl-based streaming server that has a web interface, can transcode on-on-fly and is licensed under the GPL.

http://www.slimdevices.com/pi_features.html

#

Listen to your music anywhere with Subsonic

Posted by: Anonymous [ip: 196.217.35.230] on November 20, 2008 01:48 PM
All the best search engines piled into one. Including Google, Yahoo, sport search engines, science and medical search engines, encylopedia search engines, government and legal search engines, education search engines, news search engines, meta search engines.....

http://www.allthebestsearchengines.blogspot.com

#

Listen to your music anywhere with Subsonic

Posted by: Anonymous [ip: 24.7.194.195] on November 28, 2008 05:17 PM
The Subsonic 'Web Player' app allows me to stream mp3 files to my Wii.

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya