LAME 3.11 is out. I wanted to get the VBR stuff in an official
release. VBR is very simple to code, actually much easier than
fooling around with the MP3 bit reservoir. Here is what is in there now:
encode normal frames at the base rate.
(specified by -b, default 112kbs with VBR, 128kbs otherwise).
For frames with short blocks, increase the bitrate by (approximately)
30kbs for each short block granule.
After encoding the frame, look at "over", the number of scalefactor bands
with audible distortion (as measured by the psy-model).
Take the maximum value of "over" from all 4 granules.
If over is greater than some tolerance (set by -V, default = 4),
then re-encode the frame at a higher bit rate.
Repeat until over is less than the tolerance, or we reach 320kbs.
-V 0 means encode all frames so that there is no audible distortion.
usually results in an average bit rate of 160kbs or larger.
-V 4 default
-V 9 the lowest quality setting.
So there is lots of ways to tune this. I would be interested in
what people think is a good tuning (or better ways to determine
what bitrate to use for the frame.)
For example:
lame -V 4 -k 112 file.wav file.mp3
will try to encode all frames at 112kbs, adding more bits when
needed. By tuning the value of -V, you could get the .mp3 file
to be about the same size as a fixed bitrate 128kbs file,
but hopefully slightly higher quality.
*OR*
lame -V 1 -k 128 file.wav file.mp3
This file encode at 128kbs, but use more bits for short blocks and
frames with distortion in 2 or more bands. The resulting file coule
be 10% bigger, or 100% bigger, depending on the type of music.
Mark
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )