Sunday, April 15, 2007

Squeezebox update: iTunes support

There are lots of tools for dealing with audio files of various formats (MP3, FLAC, AAC, Ogg, WMA, etc), but most of them fall down when it comes to letting you deal with an entire library of music files.  (I suppose some of them must be good, but there are so many, you get tired of trying them.) 

I've mostly fallen back on scripting-based approaches.  When I rip using EAC (which rips to WAV, which has no tagging features), I instruct EAC to create a file that has all the relevant tags (title, artist, genre, etc) embedded in the file name, and I've got a script that feeds these into the flac encoder, creates files using a directory hierachy of the form /artist/album/track.flac, and sets the appropriate flac tags. 

I downloaded another script ( that takes this directory and creates a parallel directory of MP3 files, transcoded from the flac.  It uses LAME to do the encoding, using the "--alt-preset standard" settings, and I point iTunes at that directory.  So far, so good. 

Well, iTunes seems confused by VBR (variable bit rate) MP3s that it didn't encode itself. The symptom is that iTunes thinks the tracks are way longer than they are.   

After much searching, the best alternative I came up with was to use a program called 'vbrfix' (, which rewrites the mp3 headers in a way that iTunes is happy with.  (It claims to fix other problems too.  The documentation sucks, and I had to download the source and build it (with no make file, just guessed, but it wasn't hard), and it does appear to render the MP3s compatible with iTunes.


  1. Why dont you rip all songs to apple lossless which can keep all tags and album cover art?

  2. There were three candidates for a lossless rip format -- Apple, WMA, and FLAC. As I mentioned earlier, we rip everything to FLAC and then transcode that to Mp3 for iPod use. I chose FLAC because it is (a) open, and (b) supported natively by SqueezeBox, which is the primary consumer of ripped media in the house. iPod is secondary, so even if it has better support for Apple Lossless, we'd be losing on the Squeezebox side.

  3. Its a clunky tool, but I use abcde on a OpenSuse box to rip "gapless" flacs of my jazz, classical and select pop albums (Radiohead, Beck, Talking Heads, Beatles, Tortoise, Pink Floyd etc.) I had to do some tinkering to get the metaflac data right for slimserver to show the tracks w/in the same file. For me, I went with the whole file approach to ensure playback of concept albums such as Dark Side of the Moon didn't introduce any annoying pauses between tracks while the next track file was loading (which may have been fixed, however I didn't want to take any chances).

  4. Yes that seems clunky Brian. I rip with EAC directly to mp3 (using -v 2 --vbr-new) and then upload them to my system that runs Myth which is hooked up to amp. Music, movies, etc are all in one box. ID3 tags are set in EAC so all is well when uploaded. I would like this to be completely automated on my myth box but it doesn't always choose the correct naming scheme when ripping. Some people upload goofy naming schemes to freedb. FLAC seems overkill to me. But I don't have $10k+ speaker system so maybe you are hearing things I don't.

  5. I chose FLAC not because I have golden ears and can tell the differnence, but because I never want to have to rip again because I somehow chose the wrong encoding. Also, it allows me to make perfect backup copies of CDs, which I've had to do several times because the original got damaged.

    Overall, it's not too bad, when I rip a bunch of tracks, I have one script to run which converts all of them and pushes them to the squeezebox directory.