When I bought my iPod, I noticed that some songs couldn’t seek, some cut off prematurely, and some said they were much longer than they really were. What gives? Well, apparently iTunes and the iPod use a totally old school method of reading variable bitrate headers.
There are two main ways to encode an Mp3: fixed bitrate, and variable bitrate. Fixed bitrates (160kbps to 320kbps for “CD quality audio”) encode each frame of audio using a fixed amount of bits. So a second of silence gets the same number of bits as a second of heavy metal. As you can probably guess, this isn’t terribly efficient. So why use a fixed bitrate? Predictability. You know how big the file is going to be, based on the time, and there are certain times when it is good to be able to have a direct time to size ratio.
Variable bit rate, as you might have guessed, works by changing the bitrate, as needed. There are a lot of options when encoding variable bitrate files, but the basic idea is that you choose a “floor” bitrate and a “ceiling” bitrate. The moments of lowest complexity will use the “floor,” and the moments of highest complexity will use the “ceiling.” Thus, bits are allocated according to need. Sort of like Socialism. Bits are taken from the simple and given to the complex. So the result is a file that is high in efficiency, and doesn’t suffer from noise artifacts during the tricky parts to encode.
Anyway, iTunes uses an old school “header” to designate VBR (Variable BitRate) files. This header, called a “Xing” header, after the crappy encoder that started it, has fallen out of use, but for some reason, Apple has embraced it. If your VBR files don’t have the header, you are going to have problems, such as not being able to seek through your files, having files cut out prematurely, and having an incorrect total time reported. When I first got my iPod, I found a program that fixed this. I honestly haven’t bought more than a dozen songs since then, so I’d forgotten the name of the program. I just converted a WAV file to an Mp3, and ran into the VBR header problem, so I “refound” the program that saved me before.
The program is called VBRfix. It runs on Windows, and Linux. Not sure about OSX. The best part is that once you get it set up, you can simple point it at your music directory, and let it do its magic. I let it run for an hour or two, and it fixed all my music. Now, I make sure to scan any new Mp3 files with it, to ensure that they will work properly. If you are having any problems with Mp3 files on your iPod or in iTunes, I highly recommend that you give it a try.