I have a big MP3 audio file, about 170 MB, which I'd like to check for clipping. In details I need to increase the audio volume but I don't want to push the volume too high and clip audio samples. I tried audacity to check samples visually but it hangs before I can view anything and — and my machine has 12GB RAM!

I know sox provides a visual indications when audio samples are clipped but I need to play the file. So is there any command line tool that can tell me whether samples are clipped without having to play it at normal speed?


sox doesn't need to play the file in order to gather statistics on it. Use -n to suppress sound output. Use the stat effect to find info on max levels:

$ sox mytest.mp3 -n stat
Maximum amplitude:     0.228743
Minimum amplitude:    -0.235424
Volume adjustment:        4.248

The above example file can have its volume increased by 4.2 to be normalised without clipping:

$ sox -v 4.24 mytest.mp3 norm.mp3
$ sox norm .mp3 -n stat 
Maximum amplitude:     0.921943
Minimum amplitude:    -0.951687
Volume adjustment:        1.051
  • Thanks @meuh, didn't know that. That's perfect. I had to increase the volume by at least 30db so get a sound close to normal listening conditions. – user86969 Aug 22 '15 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy