Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: About Vorbis bitrate modes (Read 3957 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

About Vorbis bitrate modes

Greetings,

One day I started thinking about OGG Vorbis bitrates considering all contradictory sources I've heard about this matter. Because desired bitrate in Vorbis is specified with a -b [bitrate] switch most people mostly familiar with MP3 think it's an ABR setting and keep telling everyone how Vorbis needs VBR modes. However, ones proficient with Vorbis say that these particular settings only trigger a certain constraint-free VBR mode which "happens" (according to different psymodels etc.) to produce bitrates somewhere near the desired bitrate.

And there's one more statement from Dibrom that intrigues me:

Quote

[referring to Vorbis] And as for -b256, you can't compare that to MPC standard because you are forcing a higher bitrate in Vorbis on purpose.


So with -b [bitrate] am I really forcing Vorbis to certain bitrate? That would imply the usage of some kind of ABR system instead of psymodel-based VBR.

I tested this "forcing" thing with two extreme scenarios; a sine wave and white noise encoded with -b 256 setting in order to evaluate Vorbis' flexibility:


f:temp>oggenc -b 256 440HzSine.wav
Opening with wav module: WAV file reader
Encoding "440HzSine.wav" to
        "440HzSine.ogg" at bitrate 256 kbps
        [ 98,0%] [ 0m00s remaining] /

Done encoding file "440HzSine.ogg"

        File length:  0m 10,0s
        Elapsed time: 0m 04,0s
        Rate:        2,5000
        Average bitrate: 24,8 kb/s


f:temp>oggenc -b 256 WhiteNoise.wav
Opening with wav module: WAV file reader
Encoding "WhiteNoise.wav" to
        "WhiteNoise.ogg" at bitrate 256 kbps
        [ 98,0%] [ 0m00s remaining] /

Done encoding file "WhiteNoise.ogg"

        File length:  0m 10,0s
        Elapsed time: 0m 05,0s
        Rate:        2,0000
        Average bitrate: 389,0 kb/s



So, according to this quick and dirty test, Vorbis seems to flex extremely well based on the complexity of signal implying a psymodel-based VBR is indeed used. I also tried inserting sines and white noise in a music sample and detected similar behaviour (although analyzed only with WinAmp's bitrate view). So, if Vorbis would be based on a constrained ABR mode we would see much higher bitrate (~256) in the sine wave sample and much lower bitrate in the white noise sample.

Although I'm not completely certain about switches "forcing" Vorbis to certain bitrate I would dare to say according to experience that they won't. I wish someone more proficient would enlighten me since this issue is widely discussed and and even more widely misunderstood. And I also would like to know about theoretical minimum/maximum bitrates attainable with Vorbis?

Well, the bright side of this consideration can be seen as a newsflash for people wishing true quality-based VBR modes for Vorbis; Think -b 350 as -insane, -b 256 as -xtreme and -b 192 as -standard and there! Quality-based VBR in Vorbis

As a philosophical standpoint I can't tell which is better, adjective or number. MPC's switches could easily be renamed to -b 175, -b 200 and -b 300 because MPC is particulary stable when it comes to bitrates. But then we would get people wishing "a true quality based VBR" for MPC

Disclaimer:

The encoding test wasn't used to measure quality, it was only a demonstration of Vorbis' flexibility. And: I also wished a quality based true VBR for Vorbis prior to this quick experiment.

About Vorbis bitrate modes

Reply #1
The "forcing" part comes in the form of suggesting certain masking levels and other parameters which usually have a certain bitrate effect.  Of course I did not mean that it would always bound the mode to the bitrate you specified, instead what I meant is that you were suggesting to Vorbis that it use a higher bitrate.. and to be fair that you should have suggested the same thing to MPC, if you are planning on comparing bitrates.

As for the stability in bitrate that MPC shows vs Vorbis, I believe it's just a matter of psymodel tuning and which approach the developers themselves prefer.  Both are true VBR by all accounts.  Personally, I prefer MPC's approach because it is less likely to dip lower in bitrate for a given level that I specify, though it will still flex very high (try fatboy.wav).  To me, the "stability" is nice.  That doesn't mean there are necessarily problems at all with the Vorbis mode though.

Oh, and just to nitpick .. MPC's -insane mode usually generates bitrates more in the 220-250 range I think, so its not quite as high as 300.. but the rest of your comments are correct.

 

About Vorbis bitrate modes

Reply #2
Quote
Originally posted by Dibrom
higher bitrate.. and to be fair that you should have suggested the same thing to MPC, if you are planning on comparing bitrates.


No, I am not comparing bitrates at all, I'm just trying stop those "Vorbis is ABR" claims once and for all. And besides, I think Vorbis may need higher bitrates to be comparable qualitywise to MPC. With the new RC3 these comparisons can actually be made, Vorbis sounds really good nowadays.

Quote
accounts.  Personally, I prefer MPC's approach because it is less likely to dip lower in bitrate for a given level that I specify, though it will still flex very high (try fatboy.wav).  To me, the "stability" is 


You got that right, mppenc -insane which should give bitrates comparable to oggenc -b 256 gave 239.7 kbps for that sine wave.  Surprisingly it gave "only" 248.7 kbps for that white noise. Apparently MPC's psymodel can't be "fooled" with white noise.

I have also found those stable modes useful. No more cold sweat when encoding ultra-silent classical, MPC doesn't seem to lower bitrate at all. Actually Vorbis also behaves rather good when encoding silent parts, "rather" meaning that it doesn't dip under 120 kbps. But the amount of preserved bits should be based on total masking treshold and if masking calculations are correct, this bitrate would be adequate. Let's not forget that Vorbis is not MP3.

I'd really wish I could get rid of my mays, maybes, apparentlys, and all other expressions meaning I don't know what I'm talking about. As a computer science student I consider myself a proficient programmer but just plain analyzing source code doesn't help here.

In my field a source code without documentation (real documentation is not HTML FAQs and comment brackets in souce code...) is considered useless. And I have found that 1MB source code is pretty impossible to master for a single person without external guidance. Analyzing i.e. LAME source code can be considered as software engineer's nightmare. No documention, changes on a daily basis, no project notes, descriptions or anything. Just too much chaos around. No need to flame me though, I understand why situation is like this.

However, I am planning to start serious Vorbis source code research when 1.0 is out and when I have enough free time. I really would like to contribute but that's rather difficult if I don't know anything about anything.