VBR Mp3 Fix

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.

28 thoughts on “VBR Mp3 Fix

  1. JoeBruin88

    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.

  2. Paul

    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]

  3. Pingback: Myth Box

  4. capitalistpunk

    “Thus, bits are allocated according to need. Sort of like Socialism.”

    Oh my.

    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.

  5. DTP (subscribed)

    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

  6. Mark Post author

    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.

  7. Pingback: bit-tech.net Forums - iPod Mini problem

  8. Pingback: Micro - Song Length is Incorrect on Playback - MP3 Players - Creative Labs

  9. Pingback: Hydrogenaudio Forums -> iPod mini 2G stutters when playing LAME aps

  10. Pingback: iPodFun.de - alles zu iPod und Podcasting

  11. Pingback: Hydrogenaudio Forums > iPod mini 2G stutters when playing LAME aps

  12. Pingback: Apple - Discussions - MP3 VBR in iTunes

  13. Pingback: Apple - Support - Discussions - MP3 VBR in iTunes ...

  14. Pingback: RV.Net Open Roads Forum: Technology Corner: iPod question

  15. Pingback: Shiftless' Journal

  16. Klutz Lament

    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…

  17. Pingback: Charles on… anything that comes along » My iPo nan is annoyin me

  18. Steve (subscribed)

    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.

  19. Gwame (subscribed)

    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.

  20. Pingback: iPod/iTunes prematurely cutting off the ends of MP3s - SH Forums

  21. Pingback: LUGRadio Forums :: View topic - conclusion to "I love you but you piss me off" :)

  22. Pingback: 123Macmini.com - Forums - View topic - How "big" is your iTunes library?

  23. Pingback: sbooth.org • View topic - vbr lame mp3's truncate on ipods

  24. Pingback: OTR @ 154.ca :: View topic - CBR or VBR

  25. Dmitriy V

    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!

Comments are closed.