(Batch) Amplify audio files from the command line

Linux
Author

Vinh Nguyen

Published

February 17, 2011

Audacity is great, but it's a GUI and sometimes I just want to do basic things like amplify the sound of some mp3 files. Discovered mp3gain from this thread and wrote this script to batch amplify the files:

#! /bin/bash

## http://boards.straightdope.com/sdmb/archive/index.php/t-339352.html

gainval=10
for file in "$@"
do
mp3gain -g $gainval $file
done

Note that mp3gain alters the original mp3 files directly. My default value is 10; feel free to alter it.