This project is no longer maintained.
When I first wrote it, there was simply no solution to analyze audio loudness and tag files accordingly on Linux from the ReplayGain v2 or Opus R128 conventions.
Now there are several better maintained alternatives, and I recommend using rsgain instead.
r128gain is a multi platform command line tool to scan your audio files and tag them with loudness metadata (ReplayGain v2 or Opus R128 gain format), to allow playback of several tracks or albums at a similar loudness level. r128gain can also be used as a Python module from other Python projects to scan and/or tag audio files.
This is beta software, please test and report bugs.
r128gain requires Python >= 3.6 and FFmpeg >= 2.8.
Windows users can download a standalone binary which does not require Python, and bundles FFmpeg.
Arch Linux users can install the r128gain AUR package.
Install r128gain using pip: pip3 install r128gain
git clone https://github.com/desbma/r128gain
python3 setup.py install
Run r128gain -h
to get full command line reference.
r128gain -d an_audio_file.mp3
r128gain an_audio_file.mp3
music_directory
and all its subdirectories: r128gain -r music_directory
music_directory
and all its subdirectories, and add album gain tags (files contained in each directory are considered as part of the same album): r128gain -r -a music_directory