MP3 Retracker

A Ruby tool to organize large collections of MP3s.


mp3_retracker.rb is a ruby script that will rename, recount, and renumber the tracks within a given batch of mp3 files. It is especially handy for cases when you need to renumber the tracks of a large collection of untagged Old Time Radio episodes.


Imagine that you have 104 untagged episodes of the Major Gregory Keen serial "Dossier on Dumetrius." You can renumber them thus:

mp3_retracker.rb -n -t 'Dossier on Dumetrius (episode @N of @T)' *.mp3

This will count all 104 files, set each track to the appropriate number in "track/total" format, and generate the title of each track (with numbers). The result will be 104 files tagged with correctly numbered tracks and titles.


There are surprisingly few tools that reorder the id3 tracks within a given list of MP3s. Well, this tool can and that is why it's here. It is invoked on the commandline, making it ideal for those who keep their collections on unix/linux platforms.

I originally wrote mp3_retracker.rb to organize my MP3 radio play collection for use with my iPod. The tool eventually became versatile enough that I thought others might be like to use it. I was wrong.


I'm Chris Tessmer and I write semi-trivial Ruby scripts. You can contact me here.

What Else

You need id3v2 installed and in your path, and of course you'll need Ruby.

To get help, type:

mp3_retracker.rb -h