#1126519 ITP: mp3rgain -- Lossless MP3 volume adjustment tool written in Rust

#1126519#5
Date:
2026-01-27 22:12:08 UTC
From:
To:
* Package name    : mp3rgain
  Version         : 1.5.0
  Upstream Contact: M-Igashi <me@tyna.ninja>
* URL             : https://github.com/M-Igashi/mp3rgain
* License         : MIT
  Programming Lang: Rust
  Description     : Lossless MP3 volume adjustment - a modern mp3gain
replacement

mp3rgain is a modern, memory-safe replacement for the classic mp3gain tool,
written in Rust. It adjusts MP3 volume without re-encoding by modifying the
global_gain field in each frame's side information, preserving audio quality
while achieving permanent volume changes.

Features:
 - Lossless and reversible volume adjustment
 - ReplayGain track and album analysis
 - Full command-line compatibility with original mp3gain
 - Support for MP3, AAC/M4A formats
 - Memory-safe implementation

Relationship to mp3gain:

mp3gain (1.6.2) is currently available in Debian repositories. However,
according to the Debian Security Tracker, it has multiple known security
vulnerabilities including CVE-2023-49356 (stack buffer overflow, unpatched).

mp3rgain is a separate package that provides a memory-safe alternative:
 - Written in Rust with compile-time memory safety guarantees
 - Uses symphonia (pure Rust) for audio decoding instead of C libraries
 - Implements APE tag handling in safe Rust
 - Maintains full CLI compatibility with the original mp3gain

This is intended as a complementary package, not a replacement for mp3gain.
Users who prefer a memory-safe implementation can choose mp3rgain.

Prior Communication:

I contacted the current mp3gain Debian maintainer (Scott Hardin) via email
on 2026-01-21 to discuss potential collaboration or coexistence. After
waiting one week with no response, I am proceeding with this ITP.

Packaging Notes:

This package is published on crates.io (https://crates.io/crates/mp3rgain)
and can be built using debcargo. Pre-built .deb packages are also available
from GitHub releases for testing.

I intend to maintain this package with the Debian Rust Team. If you are
interested in co-maintaining or sponsoring, please contact me.

#1126519#10
Date:
2026-10-23 23:47:42 UTC
From:
To:
Hi,

An update on this ITP, which is still active.

* The current version is 3.12.1 (the ITP said 1.5.0).
* Besides MP3, it now adjusts AAC in M4A/MP4 and raw ADTS .aac files the
same way, by rewriting the global_gain field of each frame, so it also
covers what aacgain did. ReplayGain 1.0 values match mp3gain; ReplayGain
2.0 and EBU R128 are available as options.
* License (MIT) and upstream (https://github.com/M-Igashi/mp3rgain) are
unchanged. The crate on crates.io is the source. MSRV is 1.85, which
trixie's rustc 1.85.1 meets.

Users have asked for it in the archive:
https://github.com/M-Igashi/mp3rgain/issues/394

Dependency status against unstable, checked on 2026-10-24:

* Already packaged at compatible versions: symphonia 0.6.1 and every
subcrate it uses (bundle-mp3, codec-aac, format-isomp4, metadata, common,
core), rayon, colored, serde, serde_json, anyhow, thiserror, and all of
their dependencies.
* Not in Debian: id3 1.17.x. Its own dependencies (bitflags 2, byteorder,
flate2) are all packaged. I plan to prepare it in debcargo-conf first.
* Only in experimental: indicatif 0.18 (0.18.6-1) and console 0.16
(0.16.6+ds-1). mp3rgain moved from indicatif 0.17 to 0.18 without any
source change, so it can either wait for them to reach unstable or build
against 0.17 with a patch, whichever the team prefers.

Once id3 is in, I will prepare mp3rgain in debcargo-conf as well. I am not
a DD or DM, so I am looking for a sponsor from the Rust team for both
uploads. Any pointers are welcome.

Thanks,
M-Igashi / JPHFA