I have to confess I didn't know VBR-encoding existed until the other day, when I was given a bunch of mp3's that included various examples - some with Xing header, some with VBRI, and some without any form of seek-position mapping information at all (still can't find a "live" MLLT example).
I write my own player software (Win32 platform), so after reading all about the various tag or header systems for VBR seek-tables, I decided to respectfully ignore them all and simply determine track length and seek positions on the fly.
The idea of storing helper tables of some form inside the mp3 file itself, rather than scanning the file on demand, probably made very good sense back when it was introduced. What constitutes a "performance hit", however, is very different now compared to then.
I wrote a routine that gets called whenever I insert a track into the current playlist - the file is loaded into RAM, completely frame-scanned, and if it's VBR the exact time is calculated and a position lookup table (to a nominated number of msecs accuracy) is built.
On my 2GHz cpu (1Gb RAM) system, the cost-per-file (3mb - 5mb) is about .025s, or about 40 tracks/second. In terms of how fast I can click on tracks to select, it is next to no cost at all.
I am left wondering why none of the more (in)famous off-the-shelf players seem to have realised this. The only one I've seen attempt to handle a headerless-VBR is WinAmp, which keeps adjusting the track-length estimate as it reads more and more frames.
How quickly that converges to the right value depends of course on how small the early frames are relative to the true average, but it's certainly better than Win Media Player, which without a VBRI or Xing header, is lost as far as track length and cue-to-position accuracy is concerned (unless by some happy coincidence the first frame is of very close-to-average length).
WinAmp is still easy to confuse, of course, in these situations - all you have to do is start dragging the cue slider back and forth as soon as it starts playing, before it's read enough frames, and it all goes pear-shaped.
Anyway, no big deal, I just thought I'd offer this up for comment (or flaming, whatever!)
Jim White
ANU
Canberra
