Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to remove ReplayGain from MP3 files? (Read 18427 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to remove ReplayGain from MP3 files?

I've searched for solutions to this problem, but the threads on this forum and others don't seem to have a solution.

Basically, I'm wondering how I can remove the ReplayGain information that is stored in my MP3 files.  I've setup REACT2 to rip each CD to Apple Lossless and to =-v0 mp3 using lame 3.97.  This is a copy of my REACT script:

Code: [Select]
[UserSettings]
Debug=0
Comment=Ripped by Riley Lovendale // Created with EAC/REACT2, @curdate@
EmbedCover=1
ReplayGain=1
ApplyAlbumGain=1
AdjustAlbumGain_dB=+3.0
AddCuesheetAG=0
UseWaveGainAG=0
Opt_Flac=-8 -f
Opt_Wavpack=-hmy
Opt_Tak=-pN -overwrite
Opt_LameMP3=-V0 --vbr-new --noreplaygain --nohist
Opt_NeroAac=-lc -q 0.21
Opt_iTunesAac=-d -s 2000
Opt_OggEnc2=-q 3.0
Ver_Flac=1.2.1b
Ver_Wavpack=4.40
Ver_Tak=1.0.1
Ver_LameMP3=3.97
Ver_NeroAac=1.0.0.2
Ver_OggEnc2=2.83 Lancer aoTuV b5

[DefaultMetaData]
discnumber=1
totaldiscs=1
discname=


So when I load the MP3s into MP3tag or Foobar, it shows the album and track gain stuff.  Each album was ReplayGained to 92db as I planned on using the MP3s on a portable audio player.  I still might do that but would like to know how to remove it in case I want to.  I've tried using Foobar to delete ReplayGain info (from right-clicking on it and manually) and also mp3tag 2.42 by deleting the fields associated with gain.

Any other ideas?

EDIT: It also doesn't show those tags in Foobar and stuff anymore, but the file still plays at a lower volume.  The tags aren't there but the same effect as they are when I directly compare it to my ALAC copy of the same song.

How to remove ReplayGain from MP3 files?

Reply #1
You've ApplyAlbumGain=1 which means that: "Apply the album gain to the files" according to REACT, removing tags doesn't remove the applied gain from the files. How to revert the applied gain? I dunno.. if it's possible at all.

How to remove ReplayGain from MP3 files?

Reply #2
If it works somehow like MP3Gain, it should have stored a tag (maybe APE) with the values needed to undo the gain applied to the frames:

MP3GAIN_UNDO +004,+004,N

So you could use some tool to undo the changes – MP3Gain would use:
mp3gain /u filename.ext

metamp3 would use:
metamp3 --undo-gain filename.ext

How to remove ReplayGain from MP3 files?

Reply #3
The tags were probably there to reverse/circumvent the effect of the Album Gain appliance in Replaygain-aware players, just like MP3Gain stores its undo values in special tags. My guess is that you deleted your only possibility to restore the original loudness of the files.
Nothing is impossible if you don't need to do it yourself.

How to remove ReplayGain from MP3 files?

Reply #4
If it works somehow like MP3Gain, it should have stored a tag (maybe APE) with the values needed to undo the gain applied to the frames:

MP3GAIN_UNDO +004,+004,N

So you could use some tool to undo the changes – MP3Gain would use:
mp3gain /u filename.ext

metamp3 would use:
metamp3 --undo-gain filename.ext


There is that tag like that undo one which I've deleted.  I actually tried removing ALL tags yesterday and still nothing so it makes me think there's something in the files themselves somehow.

So that ApplyAlbumGain switch wasn't just for adding an album gain replaygain tag then?  I thought that just replaygain would do a track gain and that one was for an album gain.  I notice when I rip/encode that after all the mp3s are done it loads them all and does an analysis on their peaks and clipping and stuff in a command window and then applies the gain that it finds before the REACT script ends. 

I just don't know how to undo that if it's in a LAME header or something...

How to remove ReplayGain from MP3 files?

Reply #5
Quote
I just don't know how to undo that if it's in a LAME header or something...


This kind of replaygain alters every frame of MP3 file. It is not just "header".

How to remove ReplayGain from MP3 files?

Reply #6
There is that tag like that undo one which I've deleted.  I actually tried removing ALL tags yesterday and still nothing so it makes me think there's something in the files themselves somehow.

Hmm, didn't you see my previous answer in this thread?

So that ApplyAlbumGain switch wasn't just for adding an album gain replaygain tag then?  I thought that just replaygain would do a track gain and that one was for an album gain.  I notice when I rip/encode that after all the mp3s are done it loads them all and does an analysis on their peaks and clipping and stuff in a command window and then applies the gain that it finds before the REACT script ends. 

I just don't know how to undo that if it's in a LAME header or something...

You should always read instructions how to use a program and not make assumptions.. though I agree that REACT is not the most easiest of software to config (even I don't understand all of the aspects of REACT.. and I'm currently maintaining a mod of it (in case you didn't know)).

Anyways, REACT uses Metamp3 to calculate and apply the gains, so, the advice given by Moonbase should work:
If it works somehow like MP3Gain, it should have stored a tag (maybe APE) with the values needed to undo the gain applied to the frames:

MP3GAIN_UNDO +004,+004,N

So you could use some tool to undo the changes
metamp3 would use:
metamp3 --undo-gain filename.ext

Metamp3.exe is in REACT/tools folder.

How to remove ReplayGain from MP3 files?

Reply #7
I did see your response, that's what I was commenting on.  Thanks!  So I guess my next question is, is there a front end of some sort for metamp3?  I've searched a bit but can't find anything...

How to remove ReplayGain from MP3 files?

Reply #8
How to revert the applied gain? I dunno.. if it's possible at all.

If RG information is in the Lame header (which is done by default), this can still be undone with relative simplicity.  I don't know if there are any tools out there to automate the process, however.

EDIT:
Code: [Select]
[UserSettings]
Opt_LameMP3=-V0 --vbr-new --noreplaygain --nohist
Oops, looks like there won't be any RG information in the Lame header.  Sorry for the false hope.

How to remove ReplayGain from MP3 files?

Reply #9
Well from what they said above I should try metamp3 since that's what REACT uses, I just don't know how to do command line stuff very well....  It was a bear to even get REACT set up how it is now.  Is there even a front end for metamp3?

How to remove ReplayGain from MP3 files?

Reply #10
Well from what they said above I should try metamp3 since that's what REACT uses, I just don't know how to do command line stuff very well....  It was a bear to even get REACT set up how it is now.  Is there even a front end for metamp3?


metamp3 uses MP3GAIN_UNDO tags to undo previously applied gain. Since you deleted all MP3GAIN_UNDO tags  metamp3 will do nothing.

And, you've said before:
Quote
I've setup REACT2 to rip each CD to Apple Lossless and to =-v0 mp3 using lame 3.97.

so you can just encode your lossless files to mp3.

How to remove ReplayGain from MP3 files?

Reply #11
Oh I just copied a file to my desktop and was messing around with that.  The whole library is still on my hard drive with all the original tags in tact.  I'd rather not encode them all again if I could avoid it...

How to remove ReplayGain from MP3 files?

Reply #12
metamp3 uses MP3GAIN_UNDO tags to undo previously applied gain. Since you deleted all MP3GAIN_UNDO tags  metamp3 will do nothing.

Exactly. Too bad. Seems there is not much hope. If you had been using MP3Gain I’d have had the hope that you maybe only have deleted the ID3 tags, not APE, so it could be restored from the APE tag—but since metamp3 (fortunately, for normal use) writes ID3 tags … no hope.

This is exactly the reason why I usually recommend people to use ReplayGain Tags only and not mess up the frame data. I’ve seen just too many such cases …

How to remove ReplayGain from MP3 files?

Reply #13
Quote
Oh I just copied a file to my desktop and was messing around with that.  The whole library is still on my hard drive with all the original tags in tact.  I'd rather not encode them all again if I could avoid it...


Ok. The easiest way is to download MP3gain ( http://mp3gain.sourceforge.net/download.php ), run MP3GainGUI.exe, "Add Folder" with your MP3s and use "Modify Gain" -> "Undo Gain changes".

How to remove ReplayGain from MP3 files?

Reply #14
Quote
Oh I just copied a file to my desktop and was messing around with that.  The whole library is still on my hard drive with all the original tags in tact.  I'd rather not encode them all again if I could avoid it...


Ok. The easiest way is to download MP3gain ( http://mp3gain.sourceforge.net/download.php ), run MP3GainGUI.exe, "Add Folder" with your MP3s and use "Modify Gain" -> "Undo Gain changes".


Tried that before, just tried it again, doesn't work....

How to remove ReplayGain from MP3 files?

Reply #15
EDIT:
Code: [Select]
[UserSettings]
Opt_LameMP3=-V0 --vbr-new --noreplaygain --nohist
Oops, looks like there won't be any RG information in the Lame header.  Sorry for the false hope.

That option is only used with lame.exe which only does encode the file, metamp3.exe is used to tag all of the tags and calculate(+apply) RG separately. Now, I don't know for sure but I suspect that metamp3 is capable of producing the needed Lame header (or whatever, escapes my knowledge). Why else would it have the --undo-gain command line switch?

Tried that before, just tried it again, doesn't work....

I suggest that you test with metamp3.exe since that was used to apply the RG gain value. It would make sense to try out that it works before thinking of about how to automate that for the whole collection of yours.

Here's some steps to help you out (in WinXP):
1) Copy one mp3 file to your destop.
2) Click Windows start button -> Run -> type cmd.
3) type cd desktop
4) type "C:\Program Files\REACT2\tools\metamp3.exe" --undo-gain "THE MP3 FILENAME ON YOUR DESKTOP"

I'm not sure if that still leaves the "normal" RG tags in the file, so make sure that the ReplayGain options are off in your media player when playing the file.

How to remove ReplayGain from MP3 files?

Reply #16
Oh I just copied a file to my desktop and was messing around with that.  The whole library is still on my hard drive with all the original tags in tact.  I'd rather not encode them all again if I could avoid it...

Quote
Ok. The easiest way is to download MP3gain ( http://mp3gain.sourceforge.net/download.php ), run MP3GainGUI.exe, "Add Folder" with your MP3s and use "Modify Gain" -> "Undo Gain changes".
Tried that before, just tried it again, doesn't work....

If you tried this with that file on your desktop - of course it doesn't. You should add to MP3GainGUI files "with all the original tags in tact."
I was wrong: metamp3 adds id3v2 tags that MP3Gain doesn't understand.

How to remove ReplayGain from MP3 files?

Reply #17
Quote
Here's some steps to help you out (in WinXP):
1) Copy one mp3 file to your destop.
2) Click Windows start button -> Run -> type cmd.
3) type cd desktop
4) type "C:\Program Files\REACT2\tools\metamp3.exe" --undo-gain "THE MP3 FILENAME ON YOUR DESKTOP"

I'm not sure if that still leaves the "normal" RG tags in the file, so make sure that the ReplayGain options are off in your media player when playing the file.


BAM!  That worked!  Took me a minute to figure out cuz I forgot that I set my Desktop to my D:\ partition on my hard drive.  So now the question is, how to apply that to 19GB of mp3s in a Rips folder...

 

How to remove ReplayGain from MP3 files?

Reply #18
Hope this will help:
Create file runme.cmd with the following content:
Code: [Select]
@echo off
for %%f in (*.mp3) do d:\metamp3.exe --undo-gain "%%f"
for /F "usebackq delims=\" %%d in (`dir /a:d /b`) do (
pushd "%%d"
call d:\runme.cmd
popd
)

I assume that both runme.cmd and metamp3.exe are in d:\  folder. If not - write actual paths to this file. Then, run cmd.exe, navigate to your music folder and type d:\runme.cmd.

How to remove ReplayGain from MP3 files?

Reply #19
Thank you so much!  I'm a programming noob, but I can just copy paste I suppose.  Will it automatically find just all the mp3s in that music folder even if they are in separate artist/album folders?

So I have my Rips folder, then inside that are all the artists folders, then inside that a folder with [year]album name, then inside each album folder are the mp3s and a text log for each album.  So I copy/paste that code into the txt file, place that in the Rips folder along with metamp3.exe and then run it?

How to remove ReplayGain from MP3 files?

Reply #20
Yes, it will process all of your mp3 files in all of your subfolders.

How to remove ReplayGain from MP3 files?

Reply #21
This is exactly the reason why I usually recommend people to use ReplayGain Tags only and not mess up the frame data. I’ve seen just too many such cases …
You say that as if the loudness of the original CDs is in some way important.

IMO opinion, it isn't - but then I would say that!

Glad the OP worked it out - however, a much simpler solution to a bunch of mp3s ReplayGained to 92dB or greater (i.e. probably too loud, possibly clipping) would be just to drop the level by 3dB on the entire collection - bingo: 89dB.

Cheers,
David.

How to remove ReplayGain from MP3 files?

Reply #22
You say that as if the loudness of the original CDs is in some way important.

IMO opinion, it isn't - but then I would say that!


It is important in digital libraries, from the moment you start to listen to mixed playlists. If you listen to whole albums, it is nice if you do not need to suddenly turn down the volume when the second album starts. Replaygain does not work for classical music. So the needs for replaygain depend on your listening habits.

How to remove ReplayGain from MP3 files?

Reply #23
He didn't say that the loudness wasn't important, he said that the original loudness wasn't important. The user needs to make the final determination on loudness because the record companies are totally botching it.