You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add ReplayGain analysis (-r track gain, -a album gain)
- Add symphonia as optional dependency for MP3 decoding
- Implement equal-loudness filter (Yule-Walker + Butterworth)
- Implement RMS loudness calculation with 95th percentile
- Add -r flag for track gain (normalizes each file to 89 dB)
- Add -a flag for album gain (normalizes album to 89 dB)
- Update README with full mp3gain compatibility
Closes#1
mp3rgain -a *.mp3 # mp3rgain (requires --features replaygain)
129
+
```
112
130
113
131
## Technical Details
114
132
@@ -127,21 +145,32 @@ Each gain step equals **1.5 dB** (fixed by MP3 specification). The `global_gain`
127
145
128
146
MP3 files contain a `global_gain` field in each frame's side information that controls playback volume. mp3rgain directly modifies these values without touching the audio data, making the adjustment completely lossless and reversible.
129
147
148
+
### ReplayGain Analysis
149
+
150
+
When built with the `replaygain` feature, mp3rgain uses the [symphonia](https://github.com/pdrat/symphonia) crate for MP3 decoding and implements the ReplayGain 1.0 algorithm:
The original [mp3gain](http://mp3gain.sourceforge.net/) has been unmaintained since ~2015 and has compatibility issues with modern systems (including Windows 11). mp3rgain is a modern replacement that:
142
171
143
172
- Works on Windows 11, macOS, and Linux
144
-
- Has no external dependencies
173
+
- Has no external dependencies (base installation)
145
174
- Is written in memory-safe Rust
146
175
- Uses the same command-line interface
147
176
- Includes a library API for integration
@@ -161,13 +190,17 @@ let info = analyze(Path::new("song.mp3"))?;
0 commit comments