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
**Lossless MP3 volume adjustment - a modern mp3gain replacement written in Rust**
7
8
8
9
mp3rgain adjusts MP3 volume without re-encoding by modifying the `global_gain` field in each frame's side information. This preserves audio quality while achieving permanent volume changes.
9
10
10
11
## Features
11
12
12
-
- 🎵 **Lossless**: No re-encoding, preserves original audio quality
13
-
- ⚡ **Fast**: Direct binary manipulation, no audio decoding required
14
-
- 🔄 **Reversible**: All changes can be undone
15
-
- 📦 **Zero dependencies**: Single static binary (no ffmpeg, no mp3gain)
16
-
- 🦀 **Pure Rust**: Memory-safe, cross-platform
13
+
-**Lossless**: No re-encoding, preserves original audio quality
14
+
-**Fast**: Direct binary manipulation, no audio decoding required
15
+
-**Reversible**: All changes can be undone
16
+
-**Zero dependencies**: Single static binary (no ffmpeg, no mp3gain)
17
+
-**Cross-platform**: macOS, Linux, Windows (x86_64 and ARM64)
18
+
-**mp3gain compatible**: Same command-line interface as the original mp3gain
19
+
-**Pure Rust**: Memory-safe implementation
17
20
18
21
## Installation
19
22
@@ -23,35 +26,26 @@ mp3rgain adjusts MP3 volume without re-encoding by modifying the `global_gain` f
23
26
brew install M-Igashi/tap/mp3rgain
24
27
```
25
28
26
-
### From source
29
+
### Cargo (all platforms)
27
30
28
31
```bash
29
32
cargo install mp3rgain
30
33
```
31
34
32
35
### Download binary
33
36
34
-
Download the latest release from [GitHub Releases](https://github.com/M-Igashi/mp3rgain/releases).
37
+
Download the latest release from [GitHub Releases](https://github.com/M-Igashi/mp3rgain/releases):
-`-u` (Undo from tags) - requires APEv2 tag support
112
+
73
113
## Technical Details
74
114
75
115
### Gain Steps
@@ -98,12 +138,12 @@ MP3 files contain a `global_gain` field in each frame's side information that co
98
138
99
139
## Why mp3rgain?
100
140
101
-
The original [mp3gain](http://mp3gain.sourceforge.net/) has been unmaintained since ~2015. mp3rgain is a modern replacement that:
141
+
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:
102
142
103
-
-Is actively maintained
143
+
-Works on Windows 11, macOS, and Linux
104
144
- Has no external dependencies
105
145
- Is written in memory-safe Rust
106
-
-Provides a clean, modern CLI
146
+
-Uses the same command-line interface
107
147
- Includes a library API for integration
108
148
109
149
## Library Usage
@@ -121,14 +161,20 @@ let info = analyze(Path::new("song.mp3"))?;
Introducing mp3rgain: A modern Rust rewrite of mp3gain
4
+
mp3rgain: A drop-in Rust replacement for mp3gain with full command-line compatibility
5
5
6
6
## Body
7
7
@@ -11,25 +11,43 @@ I wanted to share a project that might be of interest to the mp3gain community.
11
11
12
12
### Introducing mp3rgain
13
13
14
-
I've created [**mp3rgain**](https://github.com/M-Igashi/mp3rgain), a modern reimplementation of mp3gain written in Rust. It provides the same core functionality - lossless MP3 volume adjustment by modifying the global gain field - but with some modern advantages.
14
+
I've created [**mp3rgain**](https://github.com/M-Igashi/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.
15
15
16
-
### Why a new implementation?
16
+
### Command-line Compatibility
17
+
18
+
mp3rgain uses the **same command-line syntax** as mp3gain:
The original mp3gain has been an invaluable tool for many years, but:
19
37
- Development appears to have stalled
20
38
- There are reports of compatibility issues with Windows 11
21
39
- Building from source can be challenging on modern systems
40
+
- Users need a tool that "just works" on modern platforms
22
41
23
-
### Features of mp3rgain
42
+
### Features
24
43
25
-
-**Lossless** - Modifies global gain field directly, no re-encoding
26
-
-**Fast** - Pure binary manipulation, no audio decoding required
44
+
-**Full CLI compatibility** - Same command-line interface as mp3gain
45
+
-**Lossless** - Modifies global_gain field directly, no re-encoding
46
+
-**Cross-platform binaries** - macOS, Linux, Windows (x86_64 and ARM64)
27
47
-**Zero dependencies** - Single static binary, no external tools needed
28
-
-**Cross-platform** - macOS (Intel/Apple Silicon), Linux, Windows (x86_64/ARM64)
29
48
-**Memory safe** - Written in Rust
30
-
-**Easy installation** - Available via `cargo install mp3rgain`, Homebrew, or binary download
31
49
32
-
### Technical compatibility
50
+
### Technical Compatibility
33
51
34
52
mp3rgain uses the same approach as the original mp3gain:
35
53
- Modifies the global_gain field in MP3 frame side information
@@ -38,20 +56,49 @@ mp3rgain uses the same approach as the original mp3gain:
38
56
- Handles VBR and CBR files
39
57
- Preserves ID3v2 tags
40
58
59
+
### Current Status
60
+
61
+
**Implemented:**
62
+
-`-g <i>` - Apply gain in steps
63
+
-`-d <n>` - Apply gain in dB
64
+
-`-s c` - Check/analyze files
65
+
-`-p` - Preserve timestamp
66
+
-`-c` - Ignore clipping warnings
67
+
-`-q` - Quiet mode
68
+
69
+
**Not yet implemented (contributions welcome!):**
70
+
-`-r` - Track gain (requires ReplayGain analysis)
71
+
-`-a` - Album gain (requires ReplayGain analysis)
72
+
-`-u` - Undo from APEv2 tags
73
+
41
74
### Links
42
75
43
76
-**GitHub**: https://github.com/M-Igashi/mp3rgain
44
77
-**crates.io**: https://crates.io/crates/mp3rgain
78
+
-**Releases**: https://github.com/M-Igashi/mp3rgain/releases (binaries for all platforms)
45
79
46
-
### Looking for contributors
80
+
### Looking for Contributors
47
81
48
82
I'm actively looking for contributors, especially those with experience in:
49
-
- Windows development and testing
83
+
- Windows development and testing (especially Windows 11)
84
+
- ReplayGain implementation (`-r` and `-a` options)
85
+
- APEv2 tag handling (`-u` option)
50
86
- MP3 format internals
51
-
- ReplayGain implementation
52
87
53
88
If anyone from the mp3gain community would like to contribute, test, or provide feedback, I would greatly appreciate it!
54
89
90
+
### Installation
91
+
92
+
```bash
93
+
# Homebrew (macOS)
94
+
brew install M-Igashi/tap/mp3rgain
95
+
96
+
# Cargo (all platforms)
97
+
cargo install mp3rgain
98
+
99
+
# Or download binaries from GitHub Releases
100
+
```
101
+
55
102
---
56
103
57
-
Thank you for maintaining the original mp3gain all these years. It's been an inspiration for this project.
104
+
Thank you for maintaining the original mp3gain all these years. The goal of mp3rgain is to carry on that legacy with a modern, maintainable codebase while preserving full compatibility for existing users.
0 commit comments