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: Should I normalize before converting from lossless to lossy? (Read 3161 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Should I normalize before converting from lossless to lossy?

I have noticed that when I analyze my files after converting them from lossless to lossy, the peak levels are (practically) always a few percent louder than they are for the lossless files. This means they will often end up at 100 %. I seem to remember having read something about this before, but I just can't find it again.

Why does the level change so much? With modern music, the lossless files themselves will already often be at 100 %. Doesn't this mean the lossy files will tend to clip more?

What do you do?

Von

Should I normalize before converting from lossless to lossy?

Reply #1
Fast answer: No, use other tools like replaygain/mp3gain (if available).

Long answer: Peak level is in no way a measure of loudness, but it can indicate clipping.
Due to the nature of lossy compression, the waveform is not reconstructed completely (else it would be lossless by definition), and this means that sometimes it can have a higher peak than its original data. (The reason goes around the lines of the DCT  (Discrete cosine transform))

Atenuating the original (the usual "normalize to 98%") does not give such a margin to the encoder. (In extreme cases, the waveform can double the amplitude).

Note that due to the nature of lossy encoders, the clipping only occurs in the decoding stage (encoded data is not clipped, it doesn't have "bitdepth"). Applying the attenuation in the step previous to decoding effectively eliminates the clipping. Hence, my recommendation to use replaygain.


[Edit: Fourier -> cosine]

Should I normalize before converting from lossless to lossy?

Reply #2
Thanks. I guess I should have added that the files I am encoding are for use on a player without the possibility of using replaygain. Is it still best not to normalize?

Should I normalize before converting from lossless to lossy?

Reply #3
Is it still best not to normalize?


Yes, Normalize is pretty useless. If your lossy format happens to be MP3 and if you have foobar2000, you can use the "Apply ReplayGain to MP3 data" function there. This will alter the loudness of the MP3s directly (without quality loss) so it it doesn't matter if your player supports RG or not.

Should I normalize before converting from lossless to lossy?

Reply #4
Isn't applying Replaygain before encoding (such as doable with foobar) preferable? That way the lossy files will probably be a bit smaller (since RG usually makes the volume less loud), and the dB level is spot on, instead of +-1.5dB as with MP3Gaining (that's what I recall hearing).