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: Replaygain (ogg vs mp3) (Read 5666 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Replaygain (ogg vs mp3)

Ok, silly question.

I encoded an album in ogg, and then encoded it again in mp3.

I then used the respective replaygain tools, and applied album gain to both albums.

Thing is, the gain was applied, but the mp3 set sounds consistently louder than the ogg set. Does mp3gain have a louder default setting ("89dB") than the ogg replaygain utility's default setting?

Just curious.

Replaygain (ogg vs mp3)

Reply #1
I have mixed oggs and mp3's and the oggs seem to sound softer to me as well.  It should be an easy thing to test how much difference there is -- although I haven't done it.

ff123

Replaygain (ogg vs mp3)

Reply #2
Just to be a bit different, I've produced a version of replaygain that I've called WaveGain, for want of a better name, that applies the ReplayGain algorithms to the original wave file. I haven't looked at the MP3 version, but Garf's ogg version, and I imagine they must be the same, converts the ogg files to waves, and then inputs the waves to the replaygain algorithms. So, I thought, why not apply it first, then it will be the same in whatever format it is subsequently encoded. It works in Audiophile/Album and Radio/Single Track modes with wildcard filename input.

Anybody interested? I'll post it on Roberto's site when he's back from vacation.

john33

Replaygain (ogg vs mp3)

Reply #3
Just to clarify - it's not a problem for me, as I don't mix different formats in any single album collection - I was just curious.

As to WAV replaygain - it sounds like a utility I might use sometimes, but ultimately it lacks the benefit of applying gain values to the encoded file - that it can be altered / undone at any time in the future (plus the fact that I have the option to listen to encoded songs in /either/ radio or audiophile mode). Or do I have the wrong idea? ;)

Not to belittle your work - again, I could probably find uses for it. :)

Replaygain (ogg vs mp3)

Reply #4
Quote
Originally posted by john33
Just to be a bit different, I've produced a version of replaygain that I've called WaveGain, for want of a better name, that applies the ReplayGain algorithms to the original wave file.


Groovy. I whipped up a quick-n-dirty program named "WavGain" when I did the first C implementation of the Replay Gain algorithms for David. My program, though, doesn't handle wildcards, and it only analyzes .wav files and spits out the results. It does not go back and apply any changes. At the time I didn't want to deal with clipping issues, and I was more interested in implementing the mp3 version.

So your program sounds quite superior

Quote
I haven't looked at the MP3 version, but Garf's ogg version, and I imagine they must be the same, converts the ogg files to waves, and then inputs the waves to the replaygain algorithms.


Yup. That's how mp3gain calculates the suggested Replay Gain values. What it does with those values (apply them directly to the mp3) is different from what the ogg version does (store the values in a special field), but I think everyone's already clear on that point...


As for the original question about volume difference between ogg replaygain and mp3gain, it's quite likely that the ogg version uses 83 dB as specified by the Replay Gain proposal. Because mp3gain modifies the mp3 file directly, I bumped the default up to 89 dB. That stopped numerous newbie "It's making my mp3s too quiet for my portable!" complaints.

Replaygain (ogg vs mp3)

Reply #5
Quote
Originally posted by Snelg

As for the original question about volume difference between ogg replaygain and mp3gain, it's quite likely that the ogg version uses 83 dB as specified by the Replay Gain proposal. Because mp3gain modifies the mp3 file directly, I bumped the default up to 89 dB. That stopped numerous newbie "It's making my mp3s too quiet for my portable!" complaints.


Nope. It ain't that. Garf's ogg-replaygain also uses 89 dB it seems. I checked with Matthijs Laan's ReplaygainDSPplugin for Winamp. It calculates the replaygain needed for the input signal, which is in total agreement with title-based oggs. It reports a gain of close to 0.00dB for those.

So I tried with mp3. A file was run through MP3Gain radiogained to a volume at 88.3 dB

When played through Winamp, the DSP-plugin calculated a needed gain of +0.71 dB

So I guess the difference some notice must be because of the  0.75 dB margin to either side or a placebo effect

Replaygain (ogg vs mp3)

Reply #6
Quote
Originally posted by YinYang
Nope. It ain't that. Garf's ogg-replaygain also uses 89 dB it seems. I checked with Matthijs Laan's ReplaygainDSPplugin for Winamp. It calculates the replaygain needed for the input signal, which is in total agreement with title-based oggs. It reports a gain of close to 0.00dB for those.


Good to know. Makes sense that they agree down to nearly 0.00 dB, since the ogg-replaygain stores the precise recommended dB change.

Quote
So I tried with mp3. A file was run through MP3Gain radiogained to a volume at 88.3 dB

When played through Winamp, the DSP-plugin calculated a needed gain of +0.71 dB


Again, makes sense. The method I use to losslessly change the volume of an mp3 can only change in increments of 1.5dB, so the final volume can be as much as +/- 0.75 dB off from the precise recommended volume.

Replaygain (ogg vs mp3)

Reply #7
Well, I did my comparison, and I seem to be doing something wrong.  I encoded to both mp3 and ogg, used mp3gain and replaygain, respectively, decoded to wav, and looked at the waveforms in CoolEdit.  The ogg appears not to have had its gain amplified, whereas the mp3 file's gain was.

The ogg tag reads:

RG_PEAK=0.526
RG_RADIO=+6.91 dB

I'm using the Nullsoft Vorbis Decoder v1.17b, with the "Use Replay Gain" box checked and set to Radio / Track.  Also the Clipping Prevention box is checked.

Investigating further..

ff123

Replaygain (ogg vs mp3)

Reply #8
Ok, replaygain for ogg / ogg decoder does work, in the other direction, i.e., for reducing gain.  I just tried it on applaud.wav, and both mp3gain and replaygain produced about the same amplitude file.

But files are not amplified when playing back through the ogg decoder.  Is this a known limitation?

ff123

Replaygain (ogg vs mp3)

Reply #9
Quote
Originally posted by ff123
But files are not amplified when playing back through the ogg decoder.  Is this a known limitation?


Try disabling clipping prevention (and enable the hard limiter)

--
GCP

Replaygain (ogg vs mp3)

Reply #10
Quote
Try disabling clipping prevention (and enable the hard limiter)


I tried it with 1.17g this time, and with your suggestions.  Preamp is set to 0.  Same thing, gain is reduced on files which need it, but not amplified on the others.

ff123

Replaygain (ogg vs mp3)

Reply #11
Quote
Originally posted by Snelg


As for the original question about volume difference between ogg replaygain and mp3gain, it's quite likely that the ogg version uses 83 dB as specified by the Replay Gain proposal. Because mp3gain modifies the mp3 file directly, I bumped the default up to 89 dB. That stopped numerous newbie "It's making my mp3s too quiet for my portable!" complaints.


The ogg version uses the C routines you wrote (version 1.0 I think), where PINK_REF is 64.85. Don't know if that means 83 or 89 dB though.

Replaygain (ogg vs mp3)

Reply #12
Quote
Originally posted by ff123


I tried it with 1.17g this time, and with your suggestions.  Preamp is set to 0.  Same thing, gain is reduced on files which need it, but not amplified on the others.

ff123


1.17e here. Same results. Gain that needs amplification is not applied, but reduced gain is.

Edit: This seems to be regardless whether clipping prevention or hard limiting is applied or not


Replaygain (ogg vs mp3)

Reply #14
everything seems to work fine for me, can you give me any sample files ?
[edit] funny shit, looks like the problem doesn't occur in debug build, hacking in progress...
[edit2] fixed. btw, next time use email rather than send PMs, i get them much quicker.
Microsoft Windows: We can't script here, this is bat country.

Replaygain (ogg vs mp3)

Reply #15
Thanks, Peter!  Works great now.

ff123