HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - Tech => Topic started by: terataz on 2009-06-10 12:26:14

Title: Normalizing Mp3 the proper way
Post by: terataz on 2009-06-10 12:26:14
I've got a bunch of mp3 128kbps that needs to be normalized the proper way.
I've tried mp3Gain, but is no good to me as my client playback software does not support ReplayGain.

I therefore need to do a proper normalization, with the normalized wave written back to the mp3.

One way is to convert the mp3 to wav, normalize, then convert back to mp3 but i like to avoid this method, for obvious reason of quality loss.

Is there any other method to do a batch normalization directly on the mp3?


Thanks a lot
Title: Normalizing Mp3 the proper way
Post by: Mark7 on 2009-06-10 12:38:19
You don't need a client with replaygain support when you use mp3gain, because mp3gain actually changes the volume of the mp3. Maybe something went wrong when you used mp3gain.

I don't have much experience with mp3gain though, so i can't tell you what might went wrong. My guess would be: Maybe you didn't apply the gain or maybe you set the volume too high.
Title: Normalizing Mp3 the proper way
Post by: ZinCh on 2009-06-10 13:02:51
mp3gain didnt use ReplayGain, this is what you need. I never have any problems with it.
Title: Normalizing Mp3 the proper way
Post by: terataz on 2009-06-16 09:42:27
You're right. mp3gain does not use ReplayGain. It writes directly on the wave, like any other program does.
Thing is, when you normalize at 0db in mp3gain, it send part of the track to clipping, which is not how it's supposed to work with normalization..
It should take the pick volume, normalize it at 0db w/o clipping, and normalize the rest of the track accordingly.
Another weird thing is that mp3gain does not actually use the 0db system, but it seems to use 100db as a reference instead.

Any I missing something basic here?

Thanks

Title: Normalizing Mp3 the proper way
Post by: 2Bdecided on 2009-06-16 09:52:03
Any I missing something basic here?
Yes, the manual. mp3gain comes with an excellent one.

Cheers,
David.
Title: Normalizing Mp3 the proper way
Post by: Mark7 on 2009-06-16 11:00:37
You're right. mp3gain does not use ReplayGain. It writes directly on the wave, like any other program does.
Thing is, when you normalize at 0db in mp3gain, it send part of the track to clipping, which is not how it's supposed to work with normalization..
It should take the pick volume, normalize it at 0db w/o clipping, and normalize the rest of the track accordingly.
Another weird thing is that mp3gain does not actually use the 0db system, but it seems to use 100db as a reference instead.

Any I missing something basic here?

Thanks


What you are missing is the fact that most CDs are already at max volume (loudness war (http://en.wikipedia.org/wiki/Loudness_war)). So it is impossible to make them louder by doing a normal raise of volume, because that will indeed result in clipping. To normalize all your CDs it usually means you have to lower the volume, to a sane level.
Title: Normalizing Mp3 the proper way
Post by: greynol on 2009-06-16 16:47:17
Because encoding to mp3 and then decoding again is a lossy process, clipping can occur.  In the case that the peaks of the source are already at 0dBFS, clipping is practically guaranteed, especially with titles that are compressed in order to make them louder.  IOW, even with simple normalization prior to encoding to mp3 you are likely to encounter clipping when decoding.

The idea that mp3gain does not use ReplayGain is simply wrong, too.  How else would it know how much to adjust the level of your mp3 files assuming you tell it to do so?  Furthermore, by default mp3gain writes RG information to a tag whether or not to tell it to adjust the level of your mp3 files.  If you're unable to make use of the RG information in an RG-capable player it is because the information is written to an APE tag rather than to an ID3 tag.  Copying it over to an ID3 tag is fairly straight-forward.

As David suggested, you should have a look at the manual.  It would probably be helpful to have a look at what ReplayGain actually is and how it works as well since you're wondering about the reference (which is not 100dB, BTW).  While mp3gain is capable of peak normalization (or close to it, since adjustments can only be made in 1.5dB steps), ReplayGain was intended to be a superior alternative to peak normalization.  In many cases it actually reduces the volume or your tracks.

http://replaygain.org (http://replaygain.org)