-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Hello!
I wanted to share a project that might be of interest to the mp3gain community.
Introducing mp3rgain
I've created mp3rgain, a drop-in replacement for mp3gain written in Rust. It aims for full command-line compatibility with the original mp3gain, so existing scripts and workflows continue to work without modification.
Command-line Compatibility
mp3rgain uses the same command-line syntax as mp3gain:
# These commands work identically in both tools
mp3gain -g 2 song.mp3 # original mp3gain
mp3rgain -g 2 song.mp3 # mp3rgain (drop-in replacement)
mp3gain -d 4.5 song.mp3 # apply dB
mp3rgain -d 4.5 song.mp3
mp3gain -s c song.mp3 # check/analyze
mp3rgain -s c song.mp3Supported options: -g, -d, -s c, -p, -c, -q, -v, -h
Why a drop-in replacement?
The original mp3gain has been an invaluable tool for many years, but:
- Development appears to have stalled
- There are reports of compatibility issues with Windows 11
- Building from source can be challenging on modern systems
- Users need a tool that "just works" on modern platforms
Features
- Full CLI compatibility - Same command-line interface as mp3gain
- Lossless - Modifies global_gain field directly, no re-encoding
- Cross-platform binaries - macOS, Linux, Windows (x86_64 and ARM64)
- Zero dependencies - Single static binary, no external tools needed
- Memory safe - Written in Rust
Technical Compatibility
mp3rgain uses the same approach as the original mp3gain:
- Modifies the global_gain field in MP3 frame side information
- Each gain step = 1.5 dB (per MP3 specification)
- Supports MPEG 1/2/2.5 Layer III
- Handles VBR and CBR files
- Preserves ID3v2 tags
Current Status
Implemented:
-g <i>- Apply gain in steps-d <n>- Apply gain in dB-s c- Check/analyze files-p- Preserve timestamp-c- Ignore clipping warnings-q- Quiet mode
Not yet implemented (contributions welcome!):
-r- Track gain (requires ReplayGain analysis)-a- Album gain (requires ReplayGain analysis)-u- Undo from APEv2 tags
Links
- GitHub: https://github.com/M-Igashi/mp3rgain
- crates.io: https://crates.io/crates/mp3rgain
- Releases: https://github.com/M-Igashi/mp3rgain/releases (binaries for all platforms)
Looking for Contributors
I'm actively looking for contributors, especially those with experience in:
- Windows development and testing (especially Windows 11)
- ReplayGain implementation (
-rand-aoptions) - APEv2 tag handling (
-uoption) - MP3 format internals
If anyone from the mp3gain community would like to contribute, test, or provide feedback, I would greatly appreciate it!
Installation
# Homebrew (macOS)
brew install M-Igashi/tap/mp3rgain
# Cargo (all platforms)
cargo install mp3rgain
# Or download binaries from GitHub Releases