»Trivia

Why is Audacious ignoring my brand-spanking-new ID3v2 replaygain tags?

It turns out that Audacious doesn't refresh tag info from a saved playlist, even for the file it's currently or about to play. It uses the cached data forever, even across restarts, unless you explicitly refresh it (e.g., by hitting F5). So you might think your new replay gain info isn't working, while it in fact would be if you were starting from a fresh playlist or track.

How do I do replaygain for MP3s The Right Way™?

First, review some good background info on mp3gain.

I avoid the use of the gain field in global frame headers: it's a hack, it requires you to decide track vs. album gain once even though you want different behavior depending on whether you're playing individual tracks or entire albums, and it can result in gain being applied twice by dumb players that don't know to undo the global gain before applying replaygain. Just do what is done for every other audio format, which is to indicate the computed gain adjustments for both track and album in a tag and let the player apply the adjustment at playback time according to how it's configured.

If you initially used the gain field in global frame headers, undo it like so:

mp3gain -p -u *.mp3

Then, if like me you initially added replaygain tags with mp3gain's default (APE tags) and find that it doesn't work anywhere, you should switch to ID3v2 tags. For each album, first remove the APE tags:

mp3gain -p -s a -s d *.mp3

Then, re-compute replaygain with the ID3v2 tag type (-s i), adjusting gain to avoid clipping (-k):

mp3gain -p -k -s i *.mp3

You might be able to avoid the recomputation by adding the ID3v2 tags before removing the APE tags, but I didn't test it that way so I am not going to recommend that.

Finally, remember to refresh the Audacious playlist before testing to see if it worked!

Why is the MP3 ecosystem such a dumpster fire?

Probably because it was the first commonly-available lossy audio codec, with millions of files traded before there were any consistent standards for this stuff, and everything needs to remain backward compatible with garbage produced by Xing with a motley collection of metadata tags implemented as hacks compatible with every crappy MP3 player that appeared in the mid- to late-90's and beyond.

If you're ripping CDs now, just do as God intended and use FLAC, and—for good measure—tag the resulting rips with Picard.

CDs? What about vinyl? Or—at the opposite end of the spectrum—192-bit playback?

If you really like that warm vinyl sound, you can find any number of DSPs that will reproduce that sound for you from a CD source without the fidelity loss of a format that is inseparable from its substrate's material characteristics.

Re: high-res encodings for playback, learn from Monty at Xiph.org (the originators of FLAC, Vorbis, Speex, Opus and other codecs used widely in industry) why they make no sense and are often counterproductive for audio quality, and represent a fundamental misunderstanding of the digital audio theorem.