A modern mp3gain / aacgain replacement written in Rust. mp3rgain adjusts volume by rewriting the global_gain field in each frame — no re-encoding, no quality loss, fully undoable. The only actively maintained CLI for lossless AAC/M4A bitstream gain.
For two decades, mp3gain and aacgain were the way to permanently normalize volume without touching audio quality. Both are abandoned.
MP3 and AAC frames carry a global_gain field that scales decoder output. mp3rgain rewrites it in every frame (1 step = 1.5 dB), records an mp3gain-compatible undo tag, and never touches the compressed audio data. Same CLI, same TSV output, same undo tags as the original mp3gain — your scripts and beets configs keep working.
Everything the classic tools did — plus the parts they never got to.
Gain changes via global_gain rewrite — the compressed audio data is never decoded or re-encoded. Quality preserved bit-exactly, for MP3 and AAC/M4A.
Every change is recorded in mp3gain-compatible undo tags. mp3rgain -u restores originals exactly — including AAC, which foobar2000 can't undo.
Identical CLI flags, TSV output, and APEv2 undo tags. Existing scripts, Dockerfiles, and beets configs keep working — migration is a one-line sed.
One static binary. No ffmpeg, no mp3gain, no aacgain. Pure-Rust decoding via Symphonia, memory-safe by construction.
ReplayGain 1.0 Track/Album analysis runs multi-threaded by default. Tune with -j, or -j 1 for the legacy serial path.
mp3rgui: drag-and-drop desktop app for macOS / Windows / Linux, sharing the exact same processing pipeline as the CLI.
Multi-arch (amd64/arm64) FROM scratch image on GHCR. Drop into containerized batch jobs — e.g. Plex library maintenance.
Embed lossless gain in your own tools via the mp3rgain crate — it powers Bake'n Deck's DJ loudness pipeline.
macOS, Linux, Windows — x86_64 and ARM64. Packaged for Homebrew, winget, AUR, PPA, Debian, Nix, MacPorts, Docker, and crates.io.
Pre-built binaries for every platform (incl. Debian .deb, macOS .dmg) on GitHub Releases.
Same lossless pipeline, zero terminal required. Drop in files or folders, analyze, apply, undo.
mp3rgain ships on nine distribution channels — GitHub Releases, crates.io, Homebrew, winget, AUR, PPA, Debian, MacPorts, and GHCR. Weekly download trends across all of them are tracked on a public dashboard.
View Download Statistics