[PATCH] ReplayGain tags

Gregory Meyer greg at gkmeyer.com
Sun Jan 11 16:04:53 CET 2009


On Sat, Jan 10, 2009 at 7:08 PM, Alex Merry <kde at randomguy3.me.uk> wrote:
> Attached is a patch that scans for the replaygain tags in Ogg Vorbis and FLAC
> files, and puts them in the database.  That's all it does at the moment (the
> database values are not accessible, for example) because I wanted some
> feedback before I continue on whether this is the right thing to do.
>
I personally would love replaygain support.  I am so glad that someone
finally got interested enough in it to implement it.  Thank you, thank
you, thank you.


> * 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.

The difference between methods is that storing values in tags requires
the playback software, whereas modifying the mp3 frames themselves
allows the effects of replaygain to be enjoyed even if the playback
software does not support replaygain.  I think you have to support
replaygain values in tags for mp3 files, at least for playback, but I
would prefer for scanning too.  I use foobar2000 running in wine right
now to scan all of my mp3 files because I don't like the idea of my
files being changed, and I think there are a lot of people like me.

--
greg


More information about the Amarok-devel mailing list