Exploding Garrmondo Weiner Interactive Swiss Army Penis

Exploding Garrmondo Weiner Interactive Swiss Army Penis (http://www.gamingforce.org/forums/index.php)
-   Behind the Music (http://www.gamingforce.org/forums/forumdisplay.php?f=19)
-   -   LAME: -V 2 vs. -V 0 (http://www.gamingforce.org/forums/showthread.php?t=30213)

LiquidAcid Mar 28, 2008 06:22 PM

For those interested in the (mathematical) details of audio compression:
Wikipedia has a large number of (quite good) articles about different subjects:
Discrete cosine transform - Wikipedia, the free encyclopedia
Modified discrete cosine transform - Wikipedia, the free encyclopedia
Linear prediction - Wikipedia, the free encyclopedia

Simple linear prediction is very easy math, but for transform coding you need a lot of advanced knowledge about analysis/calculus.

Moguta Mar 30, 2008 12:30 AM

So most lossy audio codecs store frequency information (as opposed to storing points of amplitude). On the other hand, most lossless audio codecs store small efficient equations that predict pieces of the waveform pretty well, trying to have as little error (and thus, sample adjustments to correct it) as possible.

Am I understanding it right?

LiquidAcid Mar 30, 2008 06:51 AM

Yep, that's the basic concept. Lossy audio codecs do a "transform" (fourier, fast fourier, discrete cosine, wavelet, etc.) before doing their "real" works, which consists of deciding (smart) which information can be dropped without perceived loss of quality (quantize).
These transforms also have nice properties for derivation when looking at the fourier transformation, which makes them quite interesting. It took me however nearly four semesters (analysis I+II for the basics, complex analysis and analysis III) to fully understand the concept (and be able to proof why it works).
I guess it's a bit easier with prediction coding, but I didn't look into that very deep. However fitting polynoms to arbitrary functions can be tricky as well :-)

You see that comparing the two compression methods is not really possible. Lossy is happening in frequency domain, lossless in time domain.
What would be interesting: to see someone combine prediction and transform coding (again resulting in a lossless bitstream). Anyone aware of such a codec?

sup! May 31, 2008 01:31 AM

Quote:

Originally Posted by LiquidAcid (Post 582990)
Letting the encoding engine work with constant bitrate disables all fine-tuned smart algorithms that are used to allocate bits. You're wasting bits in the stream filled with zero information.

Well that's not correct. Even CBR files work a bit like VBR by using the bit reservoir. The spare bits won't be filled up with zeros.
Encoding with 320cbr (preset-insane) also changes other settings, not only the bitrate. But the extra quality is probably not perceivable and therefore wasted.

Some of the guys "with golden ears" over at hydrogen audio can distinguish subtle artifacts on test samples with V2 that need V0 or even 320cbr to sound absolutly transparent.

There's also this nice chart, visualizing the quality gain (notice the jump in filesize from -V0 to 320cbr):


I myself use -V0 for classical music, soundtracks and the like. Just to have some headroom, to make sure the sound is flawless. The filesize increase is realy minor compared to 320cbr or lossless.

Moguta Jun 10, 2008 05:04 PM

Quote:

Originally Posted by sup! (Post 611238)
Well that's not correct. Even CBR files work a bit like VBR by using the bit reservoir. The spare bits won't be filled up with zeros.

While that's mostly true, the bit reservoir is limited and can only store a certain maximum amount to be used later, so a passage of complete silence in a 320Kbps CBR file would indeed be padded with useless data. In a VBR file, that same silent passage would be about 10x (320Kbps vs 32Kbps) smaller. As a side-note, it is a shame that the specifications of the MP3 format prevent silence from being encoded at 0Kbps, as in FLAC & other codecs.

And, wow, reading that HydrogenAudio wiki page you linked, it seems that VBR will use the bit reservoir too if necessary. And here I had thought that VBR encoding did not have a bit reservoir at all! The more you learn... :)
Quote:

Originally Posted by sup! (Post 611238)
Encoding with 320cbr (preset-insane) also changes other settings, not only the bitrate. But the extra quality is probably not perceivable and therefore wasted.

And, indeed, this really is the main issue.

Quote:

Originally Posted by sup! (Post 611238)
There's also this nice chart, visualizing the quality gain (notice the jump in filesize from -V0 to 320cbr):

I do not disagree with your statement, as indeed the size jump represents what is typical. For propriety, however, I must note that this graph was not created from any actual data, but was drawn simply to illustrate the trend of diminishing returns in MP3 encoding. So while it's a useful guide, no one should treat it as conclusive proof or evidence.

Lousy Sep 14, 2008 04:22 PM

helo.
since i cant vote (Not a poll here) i just leave my 2 cents.. :D

From what i've understood:
the sound quality of 192 CBR is roughly the same as that of LAME V2 (which has a ~190 target -- but which is seldom reached in practice, i.e. never with so-called historical recordings à la Horowitz, Glenn Gould, Schnabel, etc.). the main difference being the resulting file size.
[1] a 'full-sound' 80mins. Audio-CD ripped @ 192 CBR ===> ~120MB (1A sound)
[2] a 'cheap-sound' 80mins. Audio-CD ripped @ LAME V2 ===> ~60MB (1A sound)

But since i am used to 100-120MB sized RAR-archives per disc (classical music) i now tend to rip to LAME V0...to reach "my targeted" 100-120MB's. Hence:

[3] a 'full-sound' 80mins. Audio-CD ripped @ LAME V0 ===> ~120MB (1A+ sound)
[4] a 'cheap-sound' 80mins. Audio-CD ripped @ LAME V0 ===> ~100MB (1A+ sound)

[1] vs. [3] === same file size target reached. [3] has higher sound quality.
[1] vs. [4] === my file size target reached. [4] has higher sound quality, and even smaller file size.

With LAME V2 i never reach my file size target...and its sound quality is always less than LAME V0 (per definitionem), so why should i stick to LAME V2? Ergo, LAME V0 is now my 1st choice. Even if i cant hear the sound quality difference between V2 and V0 :D (because my Sansa mp3-player is §$%&! and its headphones/earphones even more so :cool:)

i like the simple MP3 concept that 1.0min = 1.0MB(128cbr), or that 1 Audio-CD(74mins.) = 100MB(mp3). The LAME V2 setting ruins that beautiful calculation principle.

:gonk:


All times are GMT -5. The time now is 02:17 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2025, vBulletin Solutions, Inc.