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: wav->ReplayGain->mp3->Mp3Gain = lower bitrate (Read 4096 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

wav->ReplayGain->mp3->Mp3Gain = lower bitrate

I have a wav with loudness of 97 dB. When I encode it with LAME 3.96 -V7 --vbr-new, I get a bitrate of 119 kbps. If I ReplayGain it first with foobar2000 and get it to 89 dB and then encode it, I get a bitrate of 107 kbps. The question is: if I use Mp3Gain to get the 107kbps file to go to 97dB again, will there be any quality difference from the original 119kbps file? They sound the same

EDIT: I read the big Mp3Gain vs ReplayGain thread in the FAQ, but I didn't understand if there was a conclusion or not 

wav->ReplayGain->mp3->Mp3Gain = lower bitrate

Reply #1
You can use wavgain in calculation mode, and get a scale value.  Then use, for instance, lame.exe --alt-preset extreme --scale 0.4149

It has the same effect on bitrate, and album is scaled to 89.0dB exactly.  I think the conclusion from the other thread was that if you were going to listen to the GAINed files anyway this solution would offer the same quality with less filesize.

wav->ReplayGain->mp3->Mp3Gain = lower bitrate

Reply #2
But the problem is that you crank the volume back up again with MP3gain after encoding. I think the reason for the bitrate reduction when lowering volume before encoding is that more of the sound falls below a threshold which the encoder considers as inaudible. The encoder then throws that information away and thus bitrate is reduced. If you then turn the volume up again, these sounds would have been (possibly) audible if the encoder had not thrown them away...

So at least theoretically your procedure will reduce quality.

BTW, do you know that 97 dB as target in MP3gain should introduce clipping on most samples...?

wav->ReplayGain->mp3->Mp3Gain = lower bitrate

Reply #3
Quote
BTW, do you know that 97 dB as target in MP3gain should introduce clipping on most samples...?

Yes, I know, but it's for my not-purchased-yet car mp3 player and most of the mp3s will be transcoded from other mp3s just to reduce bitrates. The reason I want to use mp3gain as a last step, is because 89dB is pretty low and switching between mp3s and fm tuner will bring me headaches 


wav->ReplayGain->mp3->Mp3Gain = lower bitrate

Reply #5
Quote
Quote
BTW, do you know that 97 dB as target in MP3gain should introduce clipping on most samples...?

Yes, I know, but it's for my not-purchased-yet car mp3 player and most of the mp3s will be transcoded from other mp3s just to reduce bitrates. The reason I want to use mp3gain as a last step, is because 89dB is pretty low and switching between mp3s and fm tuner will bring me headaches 

Yeah, I know what you mean. I have the same problem with my MP3/FM portable. Anyway, personally I wouldn't use your procedure to reduce bitrate in that case. It seems safer to me to use standard methods (-V, lowpass, abr) instead since you are already on the "low-quality" end of the scale (~100 kbps). It did cut off 12 kbps and at those bitrates... Seems a bit risky to me... Just because one sample sounds ok doesn't mean all will...

wav->ReplayGain->mp3->Mp3Gain = lower bitrate

Reply #6
It would seem to me that when you are changing the wave file from 97 dB to 89 dB, it would actually be clipping at the bottom rather than the top so then, when you encode it to MP3, the encoder realizes that there are sounds which are inaudable now (although they may have been audible when it was at 97 dB) so it throws them away, thus the reason for the smaller file size.

If you had no plans on ever replay gaining it back up after it was an MP3, this would be fine. But if you were to replay gain it back up, these sounds are already gone and wouldn't magically come back.

Just think about it this way: Let's say you didn't touch the original WAV file at all (i.e. it was still 97 db), then you converted it to MP3 and wound up with a 119Kbps file. Now if you were to use MP3Gain and drop it to some ridiculusly low level where you could barely even hear it, you will notice that the MP3 file is still exactly the same size. This means that the data is still there but you just can't hear it. But if you were to then MP3Gain it back up again to 97 dB, it would be exactly as it was before.

However, if you were to do the same procedure as you described it (i.e. replay gain the WAV file down to some ridiculusly low level then convert to MP3), you would wind up with a much smaller file. And even if you MP3Gained it back up to 97 dB, it would still not come back. The data is just not there any more.

So, the only way I see your idea making practical sense would be if you intend to drop it to a certain level (i.e. 89 dB) and leave it there and not try to bring it back up. In that case, it seems like it might make more sense to replay gain it down like that BEFORE you encode it to MP3.

But like others have said, there is still the matter of how to drop it down before you encode it. You could do WaveGain on the WAV file itself first, or you could use the LAME command line options like "--scale" instead. It would seem to me that the "--scale" option would probably be the best way to go. Again, this still would only apply if your true intention was to replay gain the track to the desired level (i.e. 89 dB) and leave it like that without ever trying to MP3Gain it back up after the fact.

wav->ReplayGain->mp3->Mp3Gain = lower bitrate

Reply #7
Wizard,
Using MP3gain isn't really changing the mp3s you made. It only 'turns the volume knob' for you.  You could easily remove the mp3gain settings if you want.
Why not make copies for use at home and different copies to use in the car ?
And try 93 dB instead of 89 dB.  Works for me.  Loud enough and no clipping
_____________
[collector]