Wiping out tag fields

So many years I've used [version 5.666 Pro] it and never spotted that. Because when I got to know about ReplayGain, I also started using Mp3tag for tagging [and so there was no need for me to go to that window in Winamp anymore]

And so, I used Winamp for checking. But for searching I used Foobar 1.3.10. But adding adding two columns to it with

%REPLAYGAIN_TRACK_GAIN%values and running a scan I came up with a clear distinction between files. And here are some statistics, coming out from those almost 200 albums / singles already mentioned by me: 13 albums / singles had ReplayGain attached to them; and all of those with track ReplayGain had also album ReplayGain [so there were not one case of a single file with only track ReplayGain. So that's around 6%, a part rather significant

[Also in Mp3tag you can just add such two columns]

I also was trying to make a tag field [column] showing a value indicating existence of ReplayGain in MP3 files [in both Foobar and Mp3tag] but I could not achieve that

And here is the important part:

"Remove fields except" action in Mp3tag will not wipe out ReplayGain info from MP3s; if that meta data was applied via MP3Gain software to MP3 made with LAME codec

"Remove fields except" action in Mp3tag will wipe out ReplayGain info from FLACs; assuming that "REPLAYGAIN_TRACK_GAIN" and "REPLAYGAIN_ALBUM_GAIN" are the only way of storing that meta data in that format

And also:

Switch Sound File Converter 4.35 and 4dtos Free Audio Converter 3.1 when encoding FLAC to WAV do not take into account ReplayGain [at least in form of "REPLAYGAIN_TRACK_GAIN" and "REPLAYGAIN_ALBUM_GAIN"]. They will produce pure audio with no changes taken from ReplayGain

But Switch Sound File Converter and 4dtos Free Audio Converter will take into account ReplayGain applied via MP3Gain software to LAME coded MP3 file. They will produce permanently damaged WAV files [if that ReplayGain made clippings]

And it seems that also also Sony Sound Forge 11 loads up FLAC files without ReplayGain info, just as Audacity does. So it seems that this is rather universal approach: to leave ReplayGain out of FLAC when it is edited / processed

If someone can debunk those claims, because I misunderstood all those inner workings and made some tests in a wrong way, please tell. Or confirm my statements

Zerow, your research is interesting but I have one quibble:

If by "ReplayGain info" you mean ReplayGain tags then I don't think that is correct. As far as I know, Mp3tag can remove those tags. Of course, removing the tags does not undo the volume alterations that MP3Gain makes to audio files. Those alterations are not meta data and hence not removable by Mp3tag. Perhaps that is what you meant to say.

One have also to take into account, that MP3Gain applies the tagtype APE in default mode.


As I researched this topic a few weeks back, ReplayGain to FLACs is applied only as metadata [so almost all changes are reversible]

But ReplayGain to MP3s is applied either as metadata or directly to audio data [so when clipping occurs in the second method, the damage is permanent]

MP3Gain applies meta data. But Mp3tag doesn't remove that data [added by MP3Gain on LAME coded MP3s]

I just tested this once more: made a new MP3, boosted it up 2 x 12 db, executed "Remove field except" action in Mp3tag- and the file stayed with all that clipping. And my option for ignoring reading and saving tags in MP3Gain is turned off [which when turned on can make some problems with some tag values]. And in Mp3tag I do have selected "APE" in File > Options > Tags > Mpeg > Remove

So when I do this action in theory I remove also APE tags; but in reality I do not, because my ReplayGain info stays in MP3s

[By saying "applies the tagtype APE in default mode" you imply that this can ReplayGain in MP3Gain can be applied also in some other way- and I don't think it can]

Sure this is as it is ... Mp3tag works with tag data but never with the music stream data.

One can apply MP3Gain in non destructive mode (?), ...
and write ID3 tag, ... see MP3gain command line syntax description, you can find it already here on the forum board anywhere.


See also ...
Mp3Gain DOS commandline tool help:
mp3gain.1.5.1.help.txt ( 3.71K )

einheitliche Lautstärke bei mp3s


Sorry but this is incorrect. It is not an "either...or..." situation. Mp3Gain always alters the MP3 audio. Removing the optional tags that it writes does not undo those alterations, in fact it makes it impossible to undo them! So whether or not you remove those APE tags has no effect on how the audio file sounds. Furthermore, those tags are used only by the Mp3Gain program itself, not by media players.

Please read the Tags section of Mp3Gain Help for an explanation of how their tags work.

This not correct.
And I don't know why you constantly want to misuse this program.
Clipping done with an action like this is always removable with mp3gain.
As long as you keep the tags written by Mp3Gain you can undo to the origin.
If you remove these tags you remove the information about the original state the mp3 was in. The only reason for those tags ist to keep infomation about the original state und so to have the information to undo the actions.
Anyway you can always "repair" the clipping without these tags.

That is how I use it

I had no idea about ability to make it the other way. and I understand why the first method is the "default" one

First: I did not said "ReplayGain to MP3s is applied via MP3Gain either as metadata or directly to audio data" but that " "ReplayGain to MP3s is applied either as metadata or directly to audio data" in general

Second: MP3Gain do not change the raw data at all [in that "default" mode]. If it did I would not be able to undo the changes once a clipping occurs. And I tested this again, but this compared the original file with file-massacred-with-clipping-and-then-restored-to-that-original-state [with MP3Gain] not only with my ears but on spectrogram and in a waveform: not a pixel or line was different between them

That I do not know [and did not claim]

[More on this below, in answers to user "poster"]

Those APE tags that are applied in MP3Gain???

Are we talking about different software? MP3Gain 1.2.5 / back end 1.4.6 [whatever that back end means, but that's how it is described in its Help > About ], from http://mp3gain.sourceforge.net ?

I apply ReplayGain via MP3Gain - and I hear the change when I play such modified MP3 file in any of my players

What may have been misunderstood I will write down once again: I can't remove ReplayGain on MP3 file in Mp3tag; which is not really my goal, because I can do that already in MP3Gain. I can however remove ReplayGain in FLAC file with help of Mp3tag; which is what I was after of

Just for testing purposes

[Normally I use it to lower MP3s by 6 db, because all of my music is below that 89 db "sweat spot". Because when I get my hands on some old bootleg I can than easily pump up volume in it just by leaving it at that ~89 db. So that it is played louder in comparison to all that other "normal" music]

Yes. That's how it works

Yes. That's how it works. That is what my tests confirmed

If I could remove that meta data within Mp3tag, then I could see if the change is applied [which is what you just stated]; or if the files goes back to the original state [as if it was changed back like in MP3Gain]

And here are my settings for Mp3tag [that do not wipe ReplayGain from MP3 file changed with MP3Gain, but remove it from a FLAC] http://s000.tinyupload.com/?file_id=09923894401826332583

Yes indeed! From Mp3gain program help:

That is all that those tags do and so media players ignore them. That is why files processed by Mp3Gain sound the same even after those tags are removed.

Of course, but that change has nothing to do with the tags added by Mp3Gain, which are for its internal use only.

You do not know the structure of a MP3-File and how MP3Gain does this, which is explained in the help-file of Mp3Gain:

[quote="Mp3gain Helpfile"]
The mp3 format stores the sound information in small chunks called "frames". Each frame represents a fraction of a second of sound. In each frame there is a "global gain" field. This field is an 8-bit integer (so its value can be a whole number from 0 to 255).

When an mp3 player decodes the sound in the frame, it uses the global gain field to multiply the decoded sound samples by 2(gain / 4).

So if you add 1 to this gain field in all the frames in the mp3, you effectively multiply the amplitude of the whole file by 2(1/4) = 119% = +1.5 dB.

Likewise, if you subtract 1 from the global gain, you multiply the amplitude by 2(-1/4) = 84% = -1.5 dB.

And to avoid futher misunderstandings:
This "global gain field" is not a tag field, that can we read or written by Mp3Tag. It belongs to the music part of the MP3 and not to the tag part.

There is another method to get gain changes than that done by MP3Gain. Foobar for example is able to store informations in tag fields and during play uses these informations to equalize the music for the hearer. But these informations are only use by Foobar and I think some other compatible players. If you want to apply these changes to be used by all players then you have to do it the way Mp3Gain does. Foobar can do the Mp3Gain-method too in addition to the tag-field method.

So to explain again:

Mp3Gain uses APE-tags to store the gain-informations only for analysis and undo-purpose. These tags are not used by a player to play a a mp3-file louder or less louder. But all players are able to play in the intended loudness because MP3Gain makes changes to the music part of the mp3-file.

There is another method not used by MP3Gain that indeed uses the content of tags after analysis to tell a compatible player, that can read and use these tag-informations, to decide how loud it has to play.

I think you are not aware of these different modes and constantly mix them up.

And if I wanted to detect MP3 files with changes applied by MP3Gain [those that we can't read or write in Mp3Tag] how could I do that?

If I use the Track Analysis in MP3Gain, it just show what it thinks should be done; and not what was already done

AFAIK this file still has the APE tags. So turn on reading APE and see if there are any mp3gain fields.
If, of course, someone has deleted these fields, you are done.

All depends on the Options/Tags-Settings in MP3Gain and if you tell Mp3Gain not to read and write tags, no undo-information tags are stored.
In addition the presence of APE-Tags written by MP3Gain is no clear evidence, that Mp3Gain has made changes to the global gain field, because MP3Gain writes those tags during analyzing (if writing tags is enabled) and it is possible to tell the program to simply analyze without modifying gain. So there is no real way to filter files with global gain change by filtering the gain-tags in mp3tag.

But of course the presence of these ape-tags is an indication, that probably modifying gain has been done.
If these ape-tags are present you could load these files in MP3Gain (options/tags/recalculate disabled), clear analyzing results (Analyses/Clear Analysis), enable recalculate and analyze again. If the results are the same, modifying gain has been done.

But as you want to modyfy track gain anyway, which is not advisable if you want to keep an album balance, why not modify gain on all mp3s with mp3gain again. I can see no strong need for filtering in advance because the only time needed is for reading these files and not for writing, if modify gain has already been done.

That did the trick

Assuming that any value in

%MP3GAIN_UNDO%is all I needed to look for

No, that's not I wanted

I was after an unknown number of few loose cannons in my collection. Long story short: I had to locate ReplayGained MP3s with modification date after 2015 01 01

And as for RepayGain itself- I haven't been using it for years. All my music is normalized by other means, more time consuming but more precise. [And those few MP3s were a kind of quick workaround]

Another question: is there a way to add this Replay Gain values permanently, to those MP3s; and thus getting rid of those APE tags?

Do you refer to the ReplayGain-method (using tags by a player to play with a defined volume level)?
Or do you mean the method of MP3Gain (using tags only for analalizing and undo-functions but changing the global-gain)?

I'm going to be honest: after all that talk I have no idea how / why all my players are playing MP3s louder or quieter after ReplayGain treatment in MP3Gain

So I simply can't answer your question

I thought so after your questions.
If you have treated your files with MP3Gain and you would have understood how Mp3Gain works, you would not have written your questions.
Read again my statement here:
Wiping out tag fields

You also should read help-files of the software you use.
Take a look at the help-file of Mp3Gain and there the chapter "Concept" and then it should be clear why it is not a good idea to use software that just "normalizes" as you stated you've done.

And so my

was a stupid one, because those values are already added to those MP3s. So it's not an issue

But here is another [hopefully not stupid] question: how do I find among my among my XX XXX MP3 files those, that were treated by MP3Gain at some point?

Given that only recently I have turned on in MP3Gain the "Preserve file date / time" option [and thus starting to preserve the original %_file_mod_date% value] and taking into consideration that I'm after files treated by MP3Gain after 2015 01 01, I thought I could use a filter
"$if($eql(%_file_create_date%,%_file_mod_date%),1,0)" IS "0"and then just look for newer MP3s [in terms of %_file_mod_date%]; but that will get me nowhere. Because something like two weeks ago I have moved all my music to a new drive [and thus making a fresh %_file_create_date% value]

I guess, I will not know this ever, as I wasn't able to find out a method for this till now