The LAME encoder stores a CRC16 checksum of the audio stream in the header of every MP3 it encodes. The 'actual' audio checksum can then be computed and compared to the original value at a later date to verify whether the audio has been damaged (without having to worry about ID3 tags and the like changing the computed value).
On Windows, there was a command-line utility called LameTag that was capable of computing the checksum and comparing it to the original. Unfortunately, it's abandoned and probably not easily portable to OS X, which of course is what I use. I think EncSpot is capable of doing the same, but again it is Windows-only.
My question is: Are there any utilities like this that are compatible with Mac, Linux, BSD, or similar?
There are a few I've found that can show the original CRC (like
eyeD3), but they can't compute the current one. There are also several utilities that claim to check for corruption in MP3s, but I haven't found any that actually use the MusicCRC frame — most of them seem to be using a more generic method of checking, or else they use frame CRCs (which are disabled by default in LAME and can't be relied on).
I guess i've answered my own question. In trying to research this, i stumbled across a Python script for mutagen, QuodLibet's audio meta-data library. The script is designed to read LAME's Info Tag, and although it does not deal with either of the CRC fields specifically, i was able to create something that does based off of its example. After a few hours of messing with things (i'm a terrible programmer and know absolutely nothing about Python) i finally managed to write something that, although featureless and slow, does return the original CRCs and compute the new ones:
# Known good track kapche-lanka:test % ../mp3crc.py "10 - CLAW FINGER.mp3" 10 - CLAW FINGER.mp3: Original MusicCRC: 8171 Computed MusicCRC: 8171 Original Info Tag CRC: AEFD Computed Info Tag CRC: AEFD # Known bad track kapche-lanka:test % ../mp3crc.py "10 - Griffons Never Die.mp3" 10 - Griffons Never Die.mp3: Original MusicCRC: 2014 Computed MusicCRC: BCF1 Original Info Tag CRC: DF02 Computed Info Tag CRC: DF02
I will update this post one more time to add a link to the script, whenever i get it working in a more serious fashion.
I've added a link to my script below (see accepted answer). It's called
mp3crc and, although not expertly designed, it seems to work for the most part: