Search code examples
mp3normalizationscalingscalevolume

calculate mp3 average volume


I need to know the average volume of an mp3 file so that when I convert it to mp3 (at a different bitrate) I can scale the volume too, to normalize it...

Therefore I need a command line tool / ruby library that gives me the average volume in dB.


Solution

  • You can use sox (an open source command line audio tool http://sox.sourceforge.net/sox.html) to normalize and transcode your files at the same time.

    EDIT

    Looks like it doesn't have options for bit-rate. Anyway, sox is probably overkill if LAME does normalization.