[mad-dev] Xing ID3 and VBR
Russell O'Connor
roconnor@Math.Berkeley.EDU
Tue, 5 Nov 2002 22:41:46 -0800 (PST)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[To: mad-dev@lists.mars.org, chris.wohlgemuth@cityweb.de]
On Tue, 5 Nov 2002, Joe Drew wrote:
> The way mpg321 calculates size is:
>
> if (is_constant_bit_rate(file))
> do_straight_multiplication();
> else if (has_xing(file))
> read_xing();
> else
> count_all_frames();
I'm a little concerned about do_straight_multiplication(); If the file
has extra headers randomly placed about it, you can be off by a small
amount (or perhaps large amount).
For my application, I'd tempted to try finding the time in the following
order:
1. check file's extended attribute (OS/2ism here)
2. check for xing header
3. check for TLEN in ID3 v2 tag.
4. count frames
5. assume CBR and just multiply
6. give up
(3 could fail and 4 succeed if you are accessing data over HTTP and have a
Content-Length field).
Xing
Anyone have a reference to a Xing specification?
Presumably the Bytes field is the number of decode bytes.
The TOC seems useless for byte perfect seeking since the locations are
only approximate.
Thanks for everyone's help.
- --
Russell O'Connor <http://www.math.berkeley.edu/~roconnor/>
``[Law enforcement officials] suggested that the activists were stopped
not because their names are on the list, but because their names resemble
those of suspected criminals or terrorists.'' -- SFGate.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (SunOS)
Comment: For info see http://www.gnupg.org
iD8DBQE9yLmvuZUa0PWVyWQRAl/rAJ447/Xu4QDel7kOavM1kZk4gOsZjwCfXGKm
K1jETNj2GZINgmISpNQTfPM=
=xyLX
-----END PGP SIGNATURE-----