Menu

1 / 11

I rewrote mp3gain in Rust — 'compatible' turned out to be three different things

DEV Community·Jesse Pinkman·7 months ago
#MKEib8AQ
#layer#rust#mp3gain#mp3rgain#enter
Reading 0:00
15s threshold

If you maintain a podcast, music server, or any audio pipeline that needs consistent volume across files, there's a non-trivial chance you have one of these somewhere:

RUN apt-get install -y mp3gain

Enter fullscreen mode

Exit fullscreen mode

Or in a beets config:

replaygain : backend : command command : mp3gain

Enter fullscreen mode

Exit fullscreen mode

Or buried in a cron job from 2014.

mp3gain was written in C by Glen Sawyer in 2003. Upstream development stopped around 2009. Distributors (Debian, Ubuntu, Homebrew) keep it alive with security patches, but no new features have shipped in 15+ years. Its AAC counterpart aacgain died around the same time and doesn't even build cleanly on modern 64-bit systems.

People keep using both because the popular alternatives — loudgain , rsgain , ffmpeg loudnorm — solve a related problem (writing ReplayGain tags) but not the same problem.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.