Re: Gain and clipping wav -> lame

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 25, 2013 at 02:21:50PM -0400, Martin Cracauer wrote:

> Does anybody know why wav files that do not have clipping would clip
> when encoding them with lame?

Because the peak sample value says nothing about the real 
level. Take a square wave with peak values +/-1. It is the
sum of a number of sine waves, with frequencies  1,3,5,7,...
times the frequency of the square wave. The first one has
a peak value of about +/-1.27, that is +2 dB. So any encoding
that looks at the spectrum (and mp3 does) will see a level
that is +2 dB.

If you really want to normalise on the peak level, use a 
lower one. If you want all your samples to have the same
loudness, use RMS instead of peak, or a real loudness
measurement such as provided by ebumeter.

Ciao,

-- 
FA

A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux