[PATCH] ReplayGain tags

Gregory Meyer greg at gkmeyer.com
Sun Jan 11 17:05:08 CET 2009


On Sun, Jan 11, 2009 at 10:40 AM, Alex Merry <kde at randomguy3.me.uk> wrote:
> On Sunday 11 January 2009 15:04:53 Gregory Meyer wrote:
>> On Sat, Jan 10, 2009 at 7:08 PM, Alex Merry <kde at randomguy3.me.uk> wrote:
>> > * collectionscanner looks for REPLAYGAIN_ALBUM_GAIN and
>> > REPLAYGAIN_TRACK_GAIN in Vorbis and FLAC files.  Note that MP3 and MP4
>> > files have a global gain field that is interpreted by the MP3 or MP4
>> > decoder, and so don't store this stuff in tags (they store the undo data
>> > in the tags instead, which we don't care about).
>>
>> I'm don't think this is right.  There are multiple methods of applying
>> replaygain to mp3 files and one is to do it exactly like vorbis does,
>> store the values in the tags and then make the volume adjustment in
>> software (foobar2000's replaygain scanner does this).  Actually, I
>> think lame does this automatically now while encoding too.  mp3gain is
>> the software that actually adjusts the mp3 data and stores the undo
>> info in the tags.
>
> Hmm... right.  I'll have to look into that.
>
> Information on how replay gain information is stored is hard to come by.  The
> spec hasn't been updated for 7 years, and so is out of sync with what is
> actually done (and, in fact, has very little information about how the data
> should be stored).
>
> The three most common tools for adding replaygain information to files are
> mp3gain, aacgain and vorbisgain.  aacgain is just mp3gain with MP4 support.
> aacgain and mp3gain set a value in the file itself ("global gain" in MP4,
> "scale factor" in MP3), which instructs the decoder to change the gain of the
> decoded output.  This is obviously completely reversible.  vorbisgain write
> tags, and the vorbisgain man page notes the tag names (REPLAYGAIN_TRACK_GAIN
> and REPLAYGAIN_ALBUM_GAIN), and leaves it up to the player to use them or not.
>
> If you can tell me the tag names for the replay gain values for MP3 (and,
> ideally, MP4 files) when the data is stored in the tags, that would be
> immensely helpful (just what you see when you do, say, `id3v2 -l file.mp3`
> would do).

You may have seen this, but there is lot's of info here:

http://wiki.hydrogenaudio.org/index.php?title=Replaygain

--
Greg


More information about the Amarok-devel mailing list