PRC Recording Studio PRC Recording Studio PRC Recording Studio
Genealogy of my kin

Software and hints

Managing a CD collection for a Slim Devices audio box

       

The SlimDevices slimserver does a pretty good job of managing audio files in a number of formats, including WMA, MP3, WAV, FLAC, Ogg, and others.

But it doesn't help you get the audio from your CD to a suitable file on a suitable server. So this is a random collection of notes and links that may be useful.

The basic process

Ripping, mislabeled and misunderstood.

If you start with a commercial audio CD and want to put it on your computer, the usual term is to "rip" the music to a file. This is really a two step process, altho many packages combine the two, and you may not even know that there are two.

Software to extract (and optionally compress)

Compression formats

Most of the world automatically thinks of "MP3" format when they think of computer music libraries. There are many more. Frequently used music file formates include:

  • .wma (Windows Media Audio
  • .flac (Free Lossless Audio Compression)
  • .aac (MPEG-2 Advanced Audio Coding) used by Apple iTunes and others
  • .ogg (really OggVorbis) an Open Source alternative to MP3
  • .shn (shorten) a lossless compression technique, now replaced by flac.

Compression software

There are tons of commercial and shareware compression programs. I focus on the Open Source (free) ones.

  • RazorLame, a GUI front end for lame, and it includes a binary copy of lame.exe so you don't have to search all over the net for it.
  • MP3 lame. Lame is the standard Open Source MP3 encoder. But for some reason, it is a little hard to find binaies. Look here or search using Google.
  • FLAC http://flac.sourceforge.net/
  • the Flac FAQ
  • A Windows GUI front End for Flac http://members.home.nl/w.speek/flac.htm
  • Ogg Vorbis. Cool open source, free, etc.

Tagging (ID3 and beyond) and Genres

Most of the players expect internal data tags within each file. There are hundreds of ID3 file editors. I've tried a half dozen or so, and don't like any of them. In addition, way too many of them deal with ID3 Version 1 tags, which are terrible.

Genres are badly specified and badly implemented. In ID3 version one, they were one byte fields, so numbers were used. There were initially only about 60 values defined. Then the NullSoft folks released WinAmp, and they liked the music that young engineers like, so they added bunches more values for stuff that they care about. Jungle versus Dance versus Techno versus.... It was hopeless. ID3 version 2.* allows text genres, so there are an infinite number of possibilities. Or at least a large number.

More details

Genres are bad ideas, or good ideas badly implemented. Long term, the only solution is to use external databases that can be edited and verified. Which breaks the one feature of ID3 tags -- that the tag follows the file because it is in the file.

Cover Art

The slimserver will display CD cover art, which is cool, if you have it. The key is how to obtain it. For most popular styles (rock, folk, jazz, blues, rap, etc.) Amazon has covers. You can retreive them by hand, or use my automated tool.

Since Amazon does not have all the covers, sometimes it is handy to look at http://www.allmusic.com/. They seem to have a slightly better collection of Jazz.

Yahoo has a nice collection of links to cover art. HTTP://uk.dir.yahoo.com/arts/visual_arts/thematic/music/Album_Cover_Art/

WMA and Slim

The SlimServer software is cross platform and open source. It can play any file format that there is a streamer for.

BUT

and this is a big BUT, Microsoft only provides support for WMA protocols on Windows platforms. So if you want a Linux or BSD or other open source platform to play your WMA music, the default SlimServer distribution won't work.

There is a solution. And it is neither expensive nor hard. You just need to install a program called ffmpeg on your box. Once it is installed, you are nearly done. ffmpeg is available on SourceForge, http://ffmpeg.sourceforge.net/ With ffmpeg installed on your path, visible to the slimserver, you need to tell the slimserver how to use it.

While you are at it, make sure you have lame installed.You can get it from sourceforge, http://lame.sourceforge.net/

These assume that your Unix/Linux box has ffmpeg and lame installed and on the path visible to slimserver....

Create a file in /usr/local/slimserver called slimserver-convert.conf When the slimserver starts, it will read this file and over ride anything in the convert.conf (the advantage is that while the convert.conf may be over written by re-installations, the slimserver-convert.conf should be safe forever.)

Include the following lines in the slimserver-convert.conf

wma wav squeezebox * 
  [ffmpeg] -v 0 -i $FILE$ -f wav -
wma mp3 * * 
  [ffmpeg] -v 0 -i $FILE$ -f wav - | [lame] -x -m s -r -S -q 5 -s 44.1 - -

The first sends WAV files to all squeezeboxes, using ffmpeg the switches say "no video, take input from a file and output a wav pcm file" The second sends MP3 files to anything that isn't a squeezebox The ffmpeg switchers are the same, then we pipe it thru lame which converts it to MP3 and pipes the output wherever the slimserver says. Switches are "correct for bad endianess, -mode stereo, raw PCM input silent quality 5 sample rate 44.1 kHz" you can use whatever quality number your server can handle.

There is probably a switch to ffmpeg that would negate the need for the -x in lame, but I can't see it. And this works

File and directory structure

There is really no reason you have to do the file and directory structure any specific way, the SlimServer software can handle about anything. But I like having the music structured by genre / artist / album and then songs in the lowest level directory.

With most programs, it is easy to tell the extractor/compressor to use whichever file structure you want. For example, with EAC:

  • Start EAC,
  • Hit F9 (EAC options),
  • select tab Filename,
  • in the textbox contruct your directories, for instance (%I\%A\%C\%T - %N).

Richard's software squeezebox

Richard Titmuss has written a very cool software emulation of the SqueezeBox hardware., http://softsqueeze.sourceforge.net

Some of the (potential) benefits of SoftSqueeze. The motivation for starting was:

  • Being able to sync music between my PC and my Squeezebox's
  • Letting my use the SlimServer plugins on my desktop
  • I really like the Slim interface, and wanted to use that to listen to my music
  • So I could stream my music to where I work over a VPN
  • I tried using WinAmp streaming music from SlimServer, but the WinAmp buffering was annoying me

SlimDevices remote control

The SqueezeBox comes with a small remote control. It works OK to control the device. But I've got way too many remotes to want to add another. Now I'm learning about hacking remotes with JP1.

Multiple encoding at once

Some folks need two encodings. For example use EAC to rip/encode all of CDs to MP3 (for an iPod) and FLAC for whole house audio. Check out MAREO (http://mareo.netfirms.com/) which allows multiple encodings at once. Here is a snippet from the readme.txt "It works as a (fake) encoder that in turn runs the real encoders for each track ripped by the ripper, passing it the required parameters such as source and destination file, author, CD, track, etc. It can also be used to call other post-compress and pre-compress programs, like ReplayGain."

If you want to do just one, and then create the MP3s on the fly, it is easy, just run flac and lame together. The appropriate command is:

  flac -dcs input.flac | lame --silent --tt "TrkName" --resample 44100 - out.mp3

Which is pretty simple, but doesn't do wild cards, and I never can remember the proper switches, etc. So I wrote a perl script to drive this command. See flac2mp3.pl

There are lots of flac2mp3 utilities, all do basically the same thing, and all are named the same. Some have slightly different features. So google for one you like.

An alternative to MAREO is Wack

EAC and Flac

The current release of EAC does not have presets for FLAC, but it is easy to setup, and works well. See http://www.saunalahti.fi/cse/EAC/index.html. Even with that, I prefer separate extraction and overnight compression.

Here is another link about setting up EAC with FLAC An interesting approach to ensuring good rips is http://www.accuraterip.com/ which works with EAC and other rippers.

Other music technology resources

Copyright © 2004-2005 Farrell and Associates.