oggenc 1.0.1 -m and -M options when -q is specified, fail to multiply them by 1000
oggenc -b 128 -m 96 -M 225 foo.wav produce:
Nominal bitrate: 128.000000 kb/s
Upper bitrate: 225.000000 kb/s
Lower bitrate: 96.000000 kb/s
oggenc -q 3 -m 96 -M 225 produces:
Nominal bitrate: 112.000000 kb/s
Upper bitrate: 0.225000 kb/s
Lower bitrate: 0.096000 kb/s
looking @ vorbis-tools-1.0.1/oggenc/encode.c
oe_encode()
if(opt->quality_set > 0){
ai.bitrate_hard_min=opt->min_bitrate; // which opt->min_bitrate == (int) 96
ai.bitrate_hard_max=opt->max_bitrate; // which opt->max_bitrate == (int) 225
...
} else {
if(vorbis_encode_setup_managed(&vi, opt->channels, opt->rate,
opt->max_bitrate>0?opt->max_bitrate*1000:-1,
opt->bitrate*1000,
opt->min_bitrate>0?opt->min_bitrate*1000:-1)){
}
...
}
If quality is set, it fails to multiply by 1000;
If I do:
oggenc -q 3 -m 96000 -M 225000 produces:
Nominal bitrate: 112.000000 kb/s
Upper bitrate: 225.000000 kb/s
Lower bitrate: 96.000000 kb/s
Not sure if this was by design, but its certainly not indicated in the man page. :)