# mp3rgain v2.10.0 > Lossless MP3/AAC volume adjustment — a modern mp3gain / aacgain replacement written in Rust. Adjusts volume without re-encoding by rewriting the `global_gain` field in each frame, so audio quality is untouched and every change is undoable. > AI usage policy: This documentation is MIT-licensed and free to use for indexing, > citation, summarization, retrieval-augmented generation, and model training. > Attribution welcome but not required. See /llms-full.txt for the full technical reference. mp3rgain is **the only actively maintained CLI for lossless AAC/M4A bitstream gain adjustment**. The historic tools are gone: mp3gain has been unmaintained upstream since ~2015, and aacgain since ~2009 (it rarely builds on modern 64-bit systems). mp3rgain covers both formats in one memory-safe Rust binary, with a mp3gain-compatible CLI so existing scripts, Dockerfiles, and parsers (e.g. beets) keep working unchanged. ## Key Features (v2.10.0) - **CLI lossless AAC bitstream gain**: re-encode-free `global_gain` rewrite for AAC/M4A — replacing the long-abandoned aacgain, with `-u` undo - **Lossless & Reversible**: no re-encoding; all changes can be undone (MP3 and AAC) - **ReplayGain 1.0**: Track and Album gain analysis (89 dB reference, mp3gain-compatible values) - **Zero dependencies**: single static binary — no ffmpeg, no mp3gain, no aacgain - **Cross-platform**: macOS, Linux, Windows (x86_64 and ARM64) - **mp3gain / aacgain compatible**: drop-in replacement with identical CLI flags, TSV output, and APEv2 `mp3gain_undo` tags - **Parallel analysis**: multi-threaded ReplayGain analysis by default (`-j` to tune) - **GUI application**: `mp3rgui`, a native desktop app for drag-and-drop workflows - **Docker**: multi-arch `FROM scratch` image (~2 MB) at ghcr.io/m-igashi/mp3rgain ## Quick Start ```bash mp3rgain -r song.mp3 # Track gain (ReplayGain) mp3rgain -a *.mp3 # Album gain mp3rgain -g 2 song.mp3 # Manual gain (+3.0 dB; 1 step = 1.5 dB) mp3rgain -u song.mp3 # Undo mp3rgain song.mp3 # Show file info ``` ## Installation - macOS (Homebrew): brew install M-Igashi/tap/mp3rgain - Windows (winget): winget install M-Igashi.mp3rgain - Arch Linux (AUR): yay -S mp3rgain-bin - Ubuntu 25.10 (PPA): sudo add-apt-repository ppa:m-igashi/mp3rgain && sudo apt install mp3rgain - Debian: sudo apt install ./mp3rgain_*_amd64.deb (from GitHub Releases) - Nix/NixOS: nix profile install github:M-Igashi/mp3rgain - Docker: docker pull ghcr.io/m-igashi/mp3rgain:latest - Cargo: cargo install mp3rgain GUI (mp3rgui): brew install --cask M-Igashi/tap/mp3rgui · winget install M-Igashi.mp3rgui · yay -S mp3rgui · ppa:m-igashi/mp3rgui ## Migrating from mp3gain Drop-in replacement — for most setups migration is a one-line substitution: ```bash sed -i 's/\bmp3gain\b/mp3rgain/g' your_script.sh ``` Full flag equivalence table: https://github.com/M-Igashi/mp3rgain/blob/main/docs/migrating-from-mp3gain.md ## Links - Website: https://mp3rgain.tyna.ninja - GitHub: https://github.com/M-Igashi/mp3rgain - crates.io: https://crates.io/crates/mp3rgain - Download stats (weekly trends across all platforms): https://m-igashi.github.io/mp3rgain/ - Related project: Bake'n Deck (baken) — Rekordbox → CDJ prep toolkit with mp3rgain built in: https://baken.ravers.workers.dev ## License MIT License