Re: VBR support in MAD

Glenn Maynard <[email protected]>
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
On Tue, Mar 30, 2004 at 11:50:26AM -0800, Rob Leslie wrote:
> >Is there any support for VBR headers in MAD?
> 
> There's no support for reading Xing/LAME VBR header tags in libmad, but 
> the code to do it can be found in madplay (see tag.c).

Note that this code doesn't parse "Info" tags, which are just Xing tags
but are usually written for CBR files (probably to not confuse players
which assume existance a Xing tag means VBR).  The information is less
useful for CBR, but parsing it can avoid an extra frame of silence at the
beginning of files, etc.

> Probably not, considering the first 10 frames are likely to be pretty 
> quiet compared to the rest of the stream. (10 frames is about 1/4 
> second of audio in Layer III at 44100 Hz.)

I did a similar thing at one point: seek to the middle of the stream and
decode a few headers, which is more likely to give a sane result.  In
addition to estimating file length, I used the result to optimize fast
seek-to-timestamps.

However, this slowed down file opening (extra seek + read + seek), the
results were still inaccurate, it's an edge case (most VBR MP3s have
Xing tags), and using that table to seek is more accurate (low-resolution,
but more reliable), so I removed it.

-- 
Glenn Maynard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.