View Single Post
Old 30th April 2010, 18:41   #180
BornKillaz
Senior Member
 
BornKillaz's Avatar
 
Join Date: Jan 2010
Location: My Place
Posts: 109
Here is a small part of the help file of Mp3gain:
Quote:
Volume adjustment is completely lossless. In other words, if you adjust an mp3 by -6 dB and then change your mind, you can adjust it again by +6 dB and it will be exactly the same as it was before you made the first adjustment.

Here's the technical reason why it's lossless, and also why the smallest change possible is 1.5 dB:

The mp3 format stores the sound information in small chunks called "frames". Each frame represents a fraction of a second of sound. In each frame there is a "global gain" field. This field is an 8-bit integer (so its value can be a whole number from 0 to 255).

When an mp3 player decodes the sound in the frame, it uses the global gain field to multiply the decoded sound samples by 2(gain / 4).

So if you add 1 to this gain field in all the frames in the mp3, you effectively multiply the amplitude of the whole file by 2(1/4) = 119% = +1.5 dB.

Likewise, if you subtract 1 from the global gain, you multiply the amplitude by 2(-1/4) = 84% = -1.5 dB.
Maybe this is the same winamp does?

So this means that it only works if I set applyreplaygain=1, right?

applyreplaygain is not too much CPU intensive? I mean, I thought that was the functionality that analyse mp3 peak levels, not the functionality that looks for gain tags, guess I was wrong...

Mp3Gain project can be found here: mp3gain.sourceforge.net


Thanks in advance!

<?php echo str_rot13("FUBHGpnfg QANF Ehyrf!"); ?>
BornKillaz is offline