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: Difference between Mp3gain and Replaygain (Read 141591 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Difference between Mp3gain and Replaygain

Reply #25
I was being stupid. The log doesn't know that I later specify the /k option. Worked like a champ. Feel like a chump! 

Difference between Mp3gain and Replaygain

Reply #26
this entire thread has been VERY interesting.

Isn't the easiest thing to just use MP3Gain to adjust the gain values in the files and not worry about the ReplayGain tags?  Then the files should play properly on any MP3 device.

is there some downside to doing this versus using ReplayGain tags?

Difference between Mp3gain and Replaygain

Reply #27
The files are modified? That's about it, really... I guess if you drive it to clipping, then it doesn't have a peak tag for an RG-supporting player to scale down with.

Difference between Mp3gain and Replaygain

Reply #28
With MP3Gain you must choose between Track RG and Album RG. With RG metadata you can have both.

But truthfully if your CD is not mastered to be seamless between tracks, you can just ignore Album RG.

Difference between Mp3gain and Replaygain

Reply #29
The files are modified? That's about it, really... I guess if you drive it to clipping, then it doesn't have a peak tag for an RG-supporting player to scale down with.



How does the peak tag work?

Difference between Mp3gain and Replaygain

Reply #30
Is there some sort of standard in the meantime?
I'd find it great if RG values would be stored in APEv2 and/or id3 as metadata only by more or less every programm and for any format that can handle those.
For formats that can't handle metadata I can imagine the player of choice's media library handling the RG values for those files.

I'm just curious if there is that kind of consensus because it would make it easier for new players to handle RG values properly.
II may try to convince the Aqualung developers to use RG instead of their own RVA-System which seems to be very similar to replaygain but is, as far as I know, uniquely supported by aqualung.
Convincing them might be difficult if every program handles and tags RG in a different way.

Maybe someone with more insight can comment on this.

Difference between Mp3gain and Replaygain

Reply #31

"MP3Gain determines the Replaygain values for the MP3 file. MP3Gain then writes to the global gain header of every block, adjusting them all up or down by the same amount in order to achieve those Replaygain "



I have read conflicting things about how to operate the MP3Gain GUI and what it does.  If i only want to write to the global gain header of an MP3file (and not worry about writing the ReplayGain tags),  what actions do i take in the GUI?

I've read that hitting the "track analysis" button will modify the "volume bits" (i assume that is the global gain header) but in my experience i have to hit the "Gain" button to actually alter the volume of the files.

I'd like to modify the volume of my MP3s so they play consistently in my iPod as well as my Squeezebox.  the iPod, of course, does not recognize ReplayGain tags, but my Squeezebox does.  If i understand correctly, i can modify the global gain header and it will work the same way in both my iPod and my Squeezebox (i would NOT use the Volume Adjustment option in my Squeezebox).

Can anyone help me with this?

Difference between Mp3gain and Replaygain

Reply #32
Maybe someone with more insight can comment on this.

The de-facto RG tag fields are :

replaygain_track_gain
replaygain_track_peak
replaygain_album_gain
replaygain_album_peak

They where originally proposed by Garf for making an RG standard for Vorbis and where then implemented in VorbisGain and since then everyone has followed.

For MP3, then mp3gain.exe sets the four above tags + between 1 and 3 others depending on the situation as APEv2 tags, but as APEv2 tags on MP3's never really has catched up, then fb2k and Winamp sets the four above tags as ID3v2 TXXX frames and in which i believe will sooner or later become the de-facto standard for MP3 RG tags(if it isn't allready).
If i only want to write to the global gain header of an MP3file (and not worry about writing the ReplayGain tags),  what actions do i take in the GUI?

Disable tagging and then apply track/album gain
Quote
I've read that hitting the "track analysis" button will modify the "volume bits" (i assume that is the global gain header) but in my experience i have to hit the "Gain" button to actually alter the volume of the files.

When analyzing in MP3Gain, then mp3gain.exe will RG scan the files and set APEv2 RG tags on them, but the global gain fields in the headers of each MP3 frame aren't touched. This is the same if you just run "mp3gain *.mp3".
Quote
I'd like to modify the volume of my MP3s so they play consistently in my iPod as well as my Squeezebox.

Load the MP3's into MP3Gain and apply track or album gain.

Difference between Mp3gain and Replaygain

Reply #33
Thanks!

One thing confuses me:  if sounds like if i do an "analysis" with MP3Gain that it will write RG tags to the files -- if that's correct, why don't the files show an new "date modified" value in Windows Explorer?  if MP3Gain is writing these tags to the files, doesn't that modify the files?

And when does it actually write the tags?  if you load a bunch of files in and do an analysis, it will tell you how the files differ from the target volume value.  But if you change the target volume value, it immediately updates the difference amount for all the files -- but too quickly to actually be writing to the files.  Is "analysis" really writing anything to the files?

Difference between Mp3gain and Replaygain

Reply #34
if sounds like if i do an "analysis" with MP3Gain that it will write RG tags to the files

Correct.
Quote
if that's correct, why don't the files show an new "date modified" value in Windows Explorer?

Press F5 to update Windows Explorer. If still not showing, then check if you have disabled tagging. If tagging isn't disabled, then whenever you reload some MP3's that you have analyzed before, then the RG info will be displayed immidiately, without the need to rescan the MP3's again.
Quote
And when does it actually write the tags?

Right after the analysis is finished.
Quote
if you load a bunch of files in and do an analysis, it will tell you how the files differ from the target volume value.  But if you change the target volume value, it immediately updates the difference amount for all the files -- but too quickly to actually be writing to the files.  Is "analysis" really writing anything to the files?
Yes, "Analysis" is really writing to the files, but the RG tags that's set during analyzing are relative to the de-facto reference loudness i.e. 89dB(the RG spec. is actually 83dB, but that is outdated and never used anymore). If you then apply an e.g. value of 92dB right after you have analyzed the MP3's, then the RG tags is altered to reflect the new change in loudness.

 

Difference between Mp3gain and Replaygain

Reply #35
Hello,

after diving through all of these topics concerning the usage of mp3gain and, respectively, foobar's replaygain, I still got stuck with the following problem, as before mentioned in these topics:

http://www.hydrogenaudio.org/forums/index....showtopic=52283
http://www.hydrogenaudio.org/forums/index....showtopic=57038

(I'll post it here anyway because this seems to be to most comprehensive one)

In spite of that I prefer the simplicity of replaygain's concept - to write a single header which enables the decoder to do track- as well as album-gain on the fly - I really appreciate the functionality of mp3gain, simply because my hardware player doesn't support that replaygain header (as it is the fate of many great concepts which don't get the appropriate promotion...). My problem is, though: when i make any change to the ID3 tag with foobar later, the tag holding the origininal gain values which mp3gain wrote to the file in order to make the gain change reversible, gets lost (I don't know which kind of tag holds this information, though it can't be identical with the replaygain tag).

On the other hand, if I do the same thing mp3gain does with foobar ("apply track/album replaygain to mp3 data"), it seems that foobar won't store any such information of the origininal gain and thus it becomes irreversible (the function "remove replaygain info from files" just strips the ordinary replaygain tag, not the gain information applied to the mp3 data)

Here's an example: if i track-gain a bunch of mp3s in order to play them shuffled on my hardware-player, it's important for me to keep the original gain value, so that the intended relative volume of each track remains intact, when I want to listen a whole album. Now that would be fine with mp3gain: I'd just have to "undo gain changes" later. But when foobar comes in - which is really essential as a player and tagger for me - the according information get lost. However, when I use foobar instead of mp3gain, such information won't be maintained at all. Now isn't that an absolutely unnecessary annoyance? It could easily be avoided, either if Foobar would simply maintain the tags written by mp3gain, or even better, write it's own tags containing undo-information (so one wouldn't need mp3gain at all).

Does maybe someone know any workaround on this problem? Is there a chance that the beforementioned functionality could be implemented in future foobar versions (it would make the best mp3 player out there even better)?

PS. Please excuse my mediocre English. I hope it's enough to be roughly understood, though.

Difference between Mp3gain and Replaygain

Reply #36
PS. Please excuse my mediocre English. I hope it's enough to be roughly understood, though.

If you had not said anything then I never would have guessed that English wasn't your native language, so stop apologising.

Difference between Mp3gain and Replaygain

Reply #37
Here is a - from my understanding - safe procedure to have BOTH, mp3gain-style block-modification and foobar-style RG-tagging:

- use mp3gain or foobar to apply ALBUMGAIN to the individual frames. Leave the target-value at the de-facto standard 89db. Do not bother adding undo-information.

- then scan the mp3 with foobars replaygain and add RG-tagfields for albumgain and trackgain.


Why? Well, the situation afterwards will be the following:
- non-replaygain aware players will correctly play your files in albumgain mode
- the relative differences in loudness between tracks, as well as seamless trackchanges, will be kept intact, because albumgain was used. Because of this, you can also use any tag-based RG-scanner like foobars, to analyze the files, without strange things happening
- RG-tagfield aware players will be able to make use of albumgain or trackgain, so you get the full functionality of tag-based replaygain

The deciding choice in this scheme is to irreversibly albumgain the mp3-file without bothering to add undo-information. Because of this, all the mentioned conflicts and issues become irrelevant. But since albumgain was used, there isn't really any need to undo the changes, because relative differences in loudness between tracks will be kept intact.

The only downside i can think of is of purely informative nature: The tagbased albumgain-value will always be near zero (because the file was already albumgained by mp3gain). So, if it is important to you to afterwards see the "true" albumgain value of an album, then you may dislike this scheme. Notice that this does not really hurt normal usage in practice - it just means that you have one less "nice number" to look at.
I am arrogant and I can afford it because I deliver.

Difference between Mp3gain and Replaygain

Reply #38
If you had not said anything then I never would have guessed that English wasn't your native language, so stop apologising.
Sorry 

Here is a - from my understanding - safe procedure to have BOTH, mp3gain-style block-modification and foobar-style RG-tagging:

- use mp3gain or foobar to apply ALBUMGAIN to the individual frames. Leave the target-value at the de-facto standard 89db. Do not bother adding undo-information.

- then scan the mp3 with foobars replaygain and add RG-tagfields for albumgain and trackgain.

[...]
Thanks for your reply. I agree with you that the loss of original gain-values isn't that serious when album-gain is applied instead of track based gain, since the relative volume levels remain, but the underlying problem for me is the irreversible change to the mp3-data. I'm just bothered because there actually is a simple and adequate method to safe this undo-information - but replaygain somehow manages to discard it. So why should I irreversebly alter my whole mp3 collection just because foobar is oddly at odds with mp3gain!?

Difference between Mp3gain and Replaygain

Reply #39
I have one stupid question....

Turning an MP3 gain down to -8.0dB and then playing it on a stereo with volume much louder than the original gain it had (playing at let's say +8.0dB) will it have the exact sound/feeling/bass/treble/stuff that the original gain?

I ask this because I have read "replaygain" is not perfect. So just making sure...

Difference between Mp3gain and Replaygain

Reply #40
7.5dB or 9dB - mp3gain only works in multiples of 1.5dB.

With 24 bit decoding from a 16 bit source - identical, except any decoder related clipping will be removed.

With 16 bit decoding from a 16 bit source - identical, except any decoder related clipping will be removed, and any information in the last 1 or 2 bits will be rounded away or dithered depending on the decoder (i.e. effectively noise is introduced at -96dB in the final 16-bit decode).

Cheers,
David.

Difference between Mp3gain and Replaygain

Reply #41
I have one stupid question....

Turning an MP3 gain down to -8.0dB and then playing it on a stereo with volume much louder than the original gain it had (playing at let's say +8.0dB) will it have the exact sound/feeling/bass/treble/stuff that the original gain?

I ask this because I have read "replaygain" is not perfect. So just making sure...


There will be no difference in the overall sound of the track because all frequencies are affected by the same amount of gain change (no equalizing is done). Howewer, if there's a very quiet sound in a certain frequency area, which was hardly audible even on original gain, it may sink under the noise-floor of your playback equipment when lowering the gain. But i guess this is rather a theoretical concern because most music produced today is heavily dnr-compressed, so that there shouldn't be much of a risk this could actually produce audible consequences...

Difference between Mp3gain and Replaygain

Reply #42
David...

So, consider two WAV files, one processed and one original.
One of them I WAVEGAIN it down to -12.00 and the original I leave alone.
If I play the one that has been processed with a higher volume (+12.00 from that starting point) will be equally loud identical to the original file?

I know MP3Gain does it by 1.5 steps, but foobar2000 does not calculate with that limitation, unless it's not saying it properly....

Quote
There will be no difference in the overall sound of the track because all frequencies are affected by the same amount of gain change (no equalizing is done). Howewer, if there's a very quiet sound in a certain frequency area, which was hardly audible even on original gain, it may sink under the noise-floor of your playback equipment when lowering the gain. But i guess this is rather a theoretical concern because most music produced today is heavily dnr-compressed, so that there shouldn't be much of a risk this could actually produce audible consequences...


Hmm... I sometimes DO NOTICE some kind of ANNOYANCE when I replaygain very clip-pressed albums and play them "as the old good CD back in the 80's". It just doesn't sound the same, and the sound gets really flat. I mean, they sound better loud & left alone.. could it be what you're saying?

Difference between Mp3gain and Replaygain

Reply #43
7.5dB or 9dB - mp3gain only works in multiples of 1.5dB.

With 24 bit decoding from a 16 bit source - identical, except any decoder related clipping will be removed.

With 16 bit decoding from a 16 bit source - identical, except any decoder related clipping will be removed, and any information in the last 1 or 2 bits will be rounded away or dithered depending on the decoder (i.e. effectively noise is introduced at -96dB in the final 16-bit decode).
Clipped and precise, and faster than me
But now as this topic is hounoured by your presence... could you maybe comment on the mp3gain stuff? 

Hmm... I sometimes DO NOTICE some kind of ANNOYANCE when I replaygain very clip-pressed albums and play them "as the old good CD back in the 80's". It just doesn't sound the same, and the sound gets really flat.
I know what you mean. But that's due to the inferior production standarts today... which are revealed when the stuff is played back on a reasonable gain level and compared with a sound production of good ol' times...

Difference between Mp3gain and Replaygain

Reply #44
I just never knew what that was... you put it right... "if there's a very quiet sound in a certain frequency area, which was hardly audible even on original gain, it may sink under the noise-floor of your playback equipment when lowering the gain."

I actually find this very annoying and end up not applying the ReplayGain on the songs for the stereo playback. (on the PC with headphones is fine).

Difference between Mp3gain and Replaygain

Reply #45
I just never knew what that was... you put it right... "if there's a very quiet sound in a certain frequency area, which was hardly audible even on original gain, it may sink under the noise-floor of your playback equipment when lowering the gain."

I actually find this very annoying and end up not applying the ReplayGain on the songs for the stereo playback. (on the PC with headphones is fine).

For this to happen in practice, you need uncompressed classical music and a playback-level which is at an ear-damaging 100 dB..... but then again, at such large dynamic range, the ATH-model of the mp3-encoder may be a much more serious issue.

...either that, or you need a highly defective equipment-part in your playback chain.... something which has an insanely high noisefloor. I do not just mean bad equipment - i really mean defective.

However, in spite of the above, there is another explanation with a much higher degree of probability: Placebo.
I am arrogant and I can afford it because I deliver.

Difference between Mp3gain and Replaygain

Reply #46
oh yes it's placebo and the dogma of the enigma is outbursting into a ship clouded by noise shaping skull nonbrain case of /mnt but you're not root then you can't do it.

Difference between Mp3gain and Replaygain

Reply #47
oh yes it's placebo and the dogma of the enigma is outbursting into a ship clouded by noise shaping skull nonbrain case of /mnt but you're not root then you can't do it.
Uhm... sounds like the lyrics of a Current 93 song

Difference between Mp3gain and Replaygain

Reply #48
When I read out the APEv2 tags written by Mp3gain with Mp3tag, it correctly displays the following fields:

Code: [Select]
MP3GAIN_ALBUM_MINMAX = 067,208
MP3GAIN_MINMAX = 121,178
MP3GAIN_UNDO  = +002,+002,N
REPLAYGAIN_ALBUM_GAIN = -1.830000 dB
REPLAYGAIN_ALBUM_PEAK = 0.929289
REPLAYGAIN_TRACK_GAIN = -0.610000 dB
REPLAYGAIN_TRACK_PEAK = 0.694031


After doing any change to the tags with foobar, the MP3GAIN_* fields are vanished. I even tried to outsmart foobar by some script like <copy "MP3_GAIN_UNDO" to "MP3_GAIN_UNDO">, but it's futile. foobar just doesn't recognize the tags written by mp3gain. The REPLAYGAIN_* fields are all recalculated after a tag change - so foobar doesn't seem to recognize them either. I also tried to check "compatibility mode" in Preferences/Advanced/Tagging, but without any success.

So what's about these APE tags written by Mp3gain that Mp3tag reads them correctly but foobar doesn't handle them at all?

Difference between Mp3gain and Replaygain

Reply #49
To understand this behaviour, a bit of background information is necessary. You need to be aware of the following:

1. Foobar2000 is NOT designed around the idea of the user manually managing tag-types. It is especially not designed for having different kinds of metadata in different tag-types simultaneusly. The approach which foobar uses is to "abstract" metadata: The user only enters the desired metadata, and foobar automatically cares about how to store it. This way, metadata-manipulation across different filetypes works identical on the user-side and therefore is compatible with each other. No matter if you manipulate metadata about an MP3, or metadata about a FLAC, it is always the same procedure and interface. This however can only work, if there is "metadata integrity" - meaning that all metadata of a given filetype is stored the same way and there are not multiple tags in a single file with conflicting metadata. In short: this approach is only feasible when all files and metadata are "in sync". It does not matter if you agree with this approach or not - it just matters that foobar is designed around this approach... therefore, if you cannot live with it, then foobar is the wrong tool for your needs.

2. Foobar currently does not do any merging of metadata when reading files. In the case of mp3, it only reads from the selected (advanced preferences) tag-type and ignores the rest. As for "why?" - well, i dont know the full story, so a dev-reply would be needed for the full picture. What i know however is, that in the past there was no robust idea on how to merge multiple tagtypes when reading - what i mean is the "ruleset when merging". Part of the problem is that when the same metadata field exists in multiple tagtypes (dupe-info), then how should a machine decide which one is preferable? A machine does not understand what metadata like TRACKTITLE says... its just a bunch of random letters to it.

3. For MP3, foobar supports the following tagging schemes: ID3v2, ID3v1 + ID3v2, APE, ID3v1 + APE. Why is there no APE + ID3v2? Well, because ideally, there is absolutely no point to it. APE is a "replacement" for ID3v2, not an addition. The point of using APE tags is getting rid of ID3v2 and its conflicting standards. If you use ID3v2, then there is no point in APE. HOWEVER, for whatever strange reasons, mp3gain uses exactly this weird and senseless combination of tagtypes. The mess starts here.... continue reading....

4. When foobar changes metadata, then it works the following way: First read metadata according to the above rules. Save it in RAM temporarily. Then modify this read metadata according to the user. Then REPLACE the metadata in the file, with this modified metadata.... therefore dropping all unsupported metadata. Why? Well, read "1." again... the whole point of foobars metadata management is that the metadata in files is in sync without the user having to care about it.

From my POV, what we have here is the combination of two design-flaws..... a flaw in mp3gain, and a flaw in foobar. Just one of the flaws is sufficient, to render the current undo-information of mp3gain useless. The flaw on foobar2000's side is that it has not even the slightest capability of merging tagtypes when READING. What FB2k IMO should do in the current scenario, is reading the APE-metadata of mp3gain, and then delete the APE tag and save the undo-information in ID3v2, therefore not causing any dataloss, but making the undo-data incompatible with mp3gain.

The flaw in mp3gain is using a stupid combination of tagtypes. It should write its undo-information in the already existing tagtype instead - so, usually as ID3v2.
I am arrogant and I can afford it because I deliver.