Embracing Streaming Music on Linux

1271

If you’re like me, you’ve got music playing all day. When you have tapped out your personal collection, want to troll for new music, or just let someone else handle the playlist — you’ll find plenty of Internet radio stations and streaming services. Thankfully, Linux offers plenty of ways to tune into Internet radio stations. From Banshee to Pithos, you have a bevy of options at your fingertips.

Each of the applications we’ll cover can be installed by simply searching for the application in your distribution’s Add/Remove Software tool and installing from there. So, installation should not be an issue. If, however, the software is not found in your distribution’s standard repository, do a search to find out of the software has a binary installation file or the source code that can be compiled.

Banshee Plugin

Although Banshee can no longer play streams from Last.fm free accounts, it does have an outstanding Internet radio plugin. This plugin (titled “Live Radio”) is not enabled by default, so it must be enabled through the Preferences window. Once enabled the plugin will have access to Live365, Magnatune.com, RealRadios.com, and xiph.org. Each of these must be enabled from within the Live Radio plugin tab (see Figure 1). Some of these services, such as Live365, require an account with the service in order for the plugin to be used. To add the credentials for an account, select the necessary plugin and then click Configure Plugin. Add the account credentials and click Save.

Figure 1

Banshee’s plugin is a bit more complex than the others, but makes for an all-in-one solution for listening to streaming and local music.

Once a radio streaming service has been enabled, it then must be added to the Live Radio tab so the service can be accessed within Banshee. To add the service select it and then click the Add To Internet Radio button. That service will now be available by clicking the Live Radio entry in the left navigation. Click on that service to find hundreds of available stations to stream.

Like most good streaming tools, the Banshee plugin allows for the adding of streams to the Radio bookmarks. These bookmarks will show up in the “Radio” listing in the left navigation of the main window. As many bookmarks as desired can be added.

Last.fm

One of my favorite Internet radio stations is Last.fm. This particular Internet radio station does require an account; but, unlike Banshee, the Last.fm client can connect with one of the free accounts. Once the account is set up, open up the Last.fm client from the most likely menu location (such as Applications > Sound & Video in Gnome). If a menu entry is not created, the Last.fm client can be started with the command lastfm.

When Last.fm is started, the account credentials will be required in order to connect. Once authenticated, type in either an Artist name or tag in the search field, click the Play button, and the tunes will begin. Make sure, while using Last.fm, to help your favorite artists out by tagging their music. Last.fm also offers handy Love/Ban buttons which allows tracks to be tagged such that they can be accessed from the Recently Loved entry in the Music Profile pane (See Figure 2) or never played again (Banned.)Figure 2

From the Profile Pane, many extra features can be found.

Tracks can also be scrobbled through Last.fm, in order to help fine-tune the experience. After enough tracks have been scrobbled, the music Last.fm recommends will be better tailored to the taste of the listener. To enable Scroblling, click Tools > Enable Scrobbling.

Streamtuner

For those that want to tune into stations that resemble more traditional radio stations, there is Streamtuner. Streamtuner allows for the browsing/streaming of ShoutCast Yellow Pages, the Live365 Directory, Xiph.org, basic.ch, as well as a local music collection.

Streamtuner only has two real downsides: It takes a while to find good stations that are to taste, and it does not have its own built-in player. The good news is that stations can be bookmarked for easier location and the external player can be configured to fit a particular system or need.

The easiest method of listening to a stream with Streamtuner is:

  1. Open Streamtuner.
  2. Select a tab, such as Xiph, to search.
  3. Click the Ctrl-F key combination to open the search window.
  4. Enter a search string in the Find field and click Next.
  5. When a desired station or track is highlighted, double-click that track or station to begin playing.

To make a station easier to find, add that station as a bookmark. To do this:

  1. Tune into the desired station.
  2. Right click the highlighted station.
  3. Select Add Bookmark.

Figure 3Now to access bookmarked stations, simply click on the Bookmarks tab in the Streamtuner window (See Figure 3) and select the desired station.

Make sure to search from the All listing of the channel, in order to get the best results.

Included with the Streamtuner package is the Streamripper tool. As might be expected, Streamripper allows for the recording of streams (only Shoutcast streams however) to MP3. This tool is command-line only and is used in the following way: streamripper url [options]. When run, the command will create a new directory (Named after the station being ripped) and, within that directory, will be housed individual files for each song (in MP3 format.) The available options are:

  • -d — Define the directory for saving files.
  • -s — Don’t create a directory for each stream.
  • -D — Use pattern to format output of file name.

If a pattern for the file name is desired, the following tokens can be used:

  • %S – Stream
  • %A – Artist
  • %T – Title
  • %a – Album
  • %D – Date and time per song
  • %d – Date and time per execution
  • %q – Sequence number (auto detect)
  • %Nq – Sequence number (starting from N)
  • %% – Percent sign

A sample command, using tokens, would look like streamripper http://yp.shoutcast.com/sbin/tunein-station.pls?id=140400 -D %A%a%T.

Pithos

Of the three clients so far, Pithos is my favorite. Pithos is a native client for Pandora Radio that allows for Loving, Unloving, Banning, and marking a song as “Tired”. With Pithos, a connection to a Pandora account (free) where “stations” can be created. Once stations have been associated with an account, those stations will be available in the Station drop-down listing.

Stations can also be added from the Pithos main window (see Figure 4). To do this select the “i” drop-down and select Manage Stations. From the new window do the following:

  1. Click the Add Station button.
  2. Enter a search string in the search window.
  3. Click the Search button.
  4. Select the desired artist to be added.
  5. Click OK and the new station will be added to your station drop-down.

Although Pithos offers the most minimal interface, it is the best of the three streaming tools.

Pithos also offers the QuickMix station which is a compilation of music from all of the stations associated with the authenticated account. If a song appears in any of the stations that should not be played again, simply right click the song listing and select Ban Song and the song will never be heard on the station again.Figure 4

There is one slight quirk I want to point out with Pithos. The application can be set up so that when it is closed it is minimized to the notification area. In Enlightenment the icon for Pithos will appear, but the application can not be brought back up from the notification area. In order to get back the Pithos window, it is required to re-open pithos. When used in the GNOME desktop, a simple left-click on the notification area icon and then checking the Show Pithos option will bring the Pithos window back up.

Be Heard

Although not nearly an exhaustive list, the four music streaming tools listed are some of the better tools for streaming radio in Linux. Whether it’s Last.fm, Pandora, or other Internet radio stations that need to be streamed to a desktop near you, Linux, as always, is up to the task.

 

What about you? What is your favorite tool for streaming music to your Linux desktop? Or what are your favorite Internet radio stations? Be heard in the comments below to share with fellow Linux.com readers.