Thursday, October 8, 2009

Music file tags

Rip a CD and the ripping program will often go online and look up the album, artist and track information, and append this information to the audio file as a tag. Sound Juicer does this in Ubuntu. But how does it work, and is it possible to automatically tag audio files that have been ripped without tagging? This issue caused me some confusion recently.
I used Audiograbber to rip some CD's into MP3 on a Windows computer. The program didn't prompt me to add the tag information, so I assumed it didn't have this facility (looking at the website now, I see it does). The result was several folders of MP3 files with no meaningful file names or tag information.
I decided to look for a way to automatically tag and name the files. I found EasyTAG. The program gave me an option to search the something called the CDDB database to look up the CD details. For several of my folders of MP3's, this worked. For one folder, the program found the CD in the database, but one track didn't match up. In frustration, I tried MP3Tag in Windows. Using the same CDDB database (freedb.org) and entry, the program correctly tagged the folder. (Ho hum.)
But I was left in some confusion. Apart from not seeing that I could have used Audiograbber to look up the files when I ripped them, I hadn't really understood what how EasyTAG and MP3Tag found the metadata for my files, as this post to the Ubuntu Forum proves.
So how does CDDB work? Wikipedia has a good explanation. The CDDB database uses a "discid" created from track duration information stored in the table-of-contents of the CD.
So how had EasyTAG recognised my already-ripped MP3 files without a table-of-contents? I'd assumed it must have used an "audio fingerprint", but I was obviously wrong. I can only guess that EasyTAG and MP3Tag use track length information to create a discid.
So is there a way to identify audio files using an "acoustic fingerprint"? Yes, MusicBrainz Picard can do it in Linux. (Winamp in Windows uses Gracenote.)

No comments:

Post a Comment