Linux.com

On Linux, sox and a shell script do this

Posted by: Anonymous Coward on February 28, 2007 04:51 AM
I did this long ago with sox.
Sox can be embedded in a shell script to rip, adjust the volume and encode.
.
In the script, to adjust the volume:
1. call "sox<nobr> <wbr></nobr>... stat -v" and save the result to a shell variable.
2. parse the shell variable for the actual volume
3. call 'sox infile outfile vol "volume"'
.
This makes sox adjust the volume to the maximum available, without distortion.
However, this won't solve everything. If a song has a low average level, but occasional strong peaks relative to another song then there will still be an audible difference.

#

Return to Adjusting MP3s with mp3gain