[Empeg-general] Re: Can't Display Track Time

Paul Wayper paulway@earthling.net
Wed, 13 Sep 2000 23:34:00 GMT


Xing, in their grand tradition of mangling standards to suit their own (insidious) purposes, includes a single non-standard frame at the start of a VBR file to tell a Xing decoder the effective bit rate and length of song so it can work out the time display.  Naturally this got reverse engineered so WinAmp and everyone else could understand it.  I've switched to using LAME and it has the option to include the Xing VBR header.  (Or, more accurately, you can set an option which tells it to <U>not</U> put the VBR header in).

Theoretically, as long as you don't want to know how long the song is before you play it, you can do an accurate time display by starting from zero and incrementing the time display by one 75th of a second for each frame processed.  (75 frames per second, you see).  Most decoders (used to) cheat by determining the bit rate from the first block and then using their absolute byte position in the file to determine their time offset.

empeg could do a scan of the file as it was being downloaded (or in the background on the player immediately after download) to determine the length of the song and write this into the song's database header.  They may already do this.

> Save the whales.  Feed the hungry.  Free the mallocs.