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.
I just my iPod today. I’m ripping some ofmy CDs into iTunes right now. At some point though, I will have to finish writing my paper which is due on Saturday.
Not sure if I will run into this problem, but thanks for the heads up.
Excellent, thanks for that it’s been driving me mad for ages. At first I thought it was some new fangled copy protection! [Using: 4G iPod & Linux/cdparanoia/lame]
“Thus, bits are allocated according to need. Sort of like Socialism.”
Actually in VBR I’d say that bits are earned based on performance, rather than dispersed evenly among the masses. If you’re a particularly enterprising frame, you get more bits. If you’re a lazy, silent frame, you barely get any. Sort of like capitalism.
Capitalistpunk, that totally made my day. 😀
This was a big help. Oddly, when I just used VBR fix by itself, it didn’t totally work. So I made ITUNES convert all of the ID3 tags to version 1.0. That seemed to do the trick.
Annoying how apple doesn’t address issues like this and gapless playback.
DTP, if you’re looking for a GREAT program for managing ID3 tags, look no further than eMusic Tag Editor. It is for Windows, and it’s not free, but it’s a must-have for the compulsive types that need their tags to be perfect.
Klutz Lament says
The really screwy thing is that QuickTime displays the correct length regardless of whether or not the file has the “Xing” header. I thought that iTunes relied on QuickTime…
Itamar Ravid says
Hey, found this page through google. Helped me a lot. Thanks.
Excellent link there – this little peculiarity had been driving me mad for some time. Fixed all my tunez! I agree with Mark , Apple should have made this knowledge available to the general public to avoid confusion.
Thanks a million for this. I also found it on Google. I have some audiobooks (mp3 format though – ripped from CD) that ended and went on to the next track too soon. I’m using VBRFIX now.
Dmitriy V says
OMG, thanks for writing this post and being cached by Google! iTunes screwed up for me after using Mixmester’s BPM Analyzer…this fixed everything!