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 Use Mp3 Gain ? (Read 403801 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How To Use Mp3 Gain ?

Reply #25
Quote
with 2): For the very reason you mentioned: I want an exact reproduction, in terms of silences and even hiss (it can add that special flavor, think old jazz records). Silence is encoded at 32 kbps, in MPC even lower, so there's no problem.


I understand your perspective.  For me, the silence issue is one of not wanting a bunch of seconds of silence on the front or back end of the track.  For instance, the first song on the Counting Crows debut album has something like 14 seconds of silence.  That's great for effect when looking at the album as an artistic entity, but if I add that track to a mix MP3 disc and play it in shuffle mode, everyone's going to wonder why the player quit working.  It's not a file size thing, but rather a mixing thing.  When I burn my own mix CDs, one of the important parts is deciding how much silence to put between each track - some tracks have little to none; I want them them to blend together while others needs more silence for the effect I want to communicate.  As for the hiss, I should be clear that I'm only talking about the hiss at the very end of a track, where the song itself is over but the master tape hiss is still audible.  I don't remaster an entire track.  A lot of CDs are just plain lazy in cleaning this up in the mastering process and I find it very annoying that a great song has to end with hiss that sounds like it's from a casette tape copied three times from the original.


Quote
with 3): You obviously strive to boost the volume as much as possible (without clipping), however, the perceived loudness doesn't depend on the peak volume (compare dynamically compressed music with classical music). While peak normalizing usually adds some 3 dB noise, the loudness gain is maybe <1 dB with today's music productions. And don't forget that the music has already been peak-normalized in the studio.


Yes, I understand the difference between peak and average.  I've found that -2db for peak is a number that lets me produce MP3s that don't clip.  I should be clear that I'm reducing the amplitude when I do this, not raising it.  I haven't had a track yet where the peak is more than -2db, and when I do get one, I'll leave it alone, since it don't expect that it would clip on encoding.  The music that's been peak-normalized in the studio is what's producing clipped MP3's because they're highly compressed tracks with a peak of ~ -.5.  I might find this changes the deeper I get into my CDs, but I went back and did an MP3Gain analysis on a bunch of MP3s I'd already encoded and well over half are clipping.

I'll try some more work with WaveGain, but my initial experience with it was less than positive, and this was partially because of how useful MP3Gain is.  It's my understanding that CEP works at 32-bit and dithers down to 16 when it writes the file.  Are we talking about 2 different types of dithering?  And as for balancing the average volume amongst tracks with WaveGain, I didn't see anyway to pick my target without clipping and it gave me an average that was way too low, which I confirmed looking at the stats in AudioGrabber.  But that's for another thread, and to be sure I haven't spent a lot of time with the program.  MP3Gain makes complete sense, and its analysis tool is extremely helpful.


Quote
with 5): Why do you always want to increase volume? Many playback systems start to have problems at -3 dB below FS already. The reference volume in ReplayGain was introduced to have a safe, uniform volume level across the board. You put this ad absurdum. But i'm sure, one day you'll discover the great benefit of ReplayGain...


As I noted above, I'm almost always decreasing the amplitude as compared to the source.  On the rare occasion I didn't need to, MP3Gain has shown that the opportunity to increase it exists.  In the alternative, I could have gone back to source and re-encoded without the -2db normalization and wound up in the same place, and perhaps that would be a better way to handle it.  The only playback systems I'm concerned about are mine, and I prefer to have the source of the music loud enough to not force me to crank up the volume to abnormal levels just to hear it.  What I noticed about WaveGain is that it reduced the amplitude of the tracks so much they sounded like they were recorded under a pillow.

I'll be happy to explore ReplayGain further - after all, it's the foundation for MP3Gain, right?, and I'm very impressed with that, although I do find that the default goal of 89db is a bit too low for my liking, on an individual track basis.  I understand that when the day comes to burn a 100 MP3 disc, there's going to be some softer (on an average volume basis) tracks and that the louder ones will have to come down because raising the softer ones will result in clipping.  And, as has been pointed out, if, down the road, I find my MP3s are too loud, I can run them thru MP3Gain and kick them down a notch or two without any loss of information.


BTW - what does FS stand for?  And what playback systems are you aware of that have problems as amplitude approaches 0db?  Are you saying as average volume moves past -3db, or peak?  I'm assuming it's peak.

I've only seen the math (and it's not in front of me) for a couple days on the relationship between % and db, but I seem to recall that -1db == 81%, and I know from the analysis that AudioGrabber does, most of the tracks I'm working with have an average around this (usually between 65% and 80%).  I'm not trying to pin the VU meter in the red, but I guess, at this point, I don't see the problem with the MP3 itself providing "robust" volume so I don't have to crank the speakers up to 11 just to hear the music.

But I'm here to learn, and I appreciate this discussion.

How To Use Mp3 Gain ?

Reply #26
Quote
As for the hiss, I should be clear that I'm only talking about the hiss at the very end of a track, where the song itself is over but the master tape hiss is still audible.


Ah, i'm sorry, i thought you were talking about some kind of noise reduction for whole songs. This is something different then.

Quote
Are we talking about 2 different types of dithering?


My bad again. I meant dithering in conjunction with noise shaping. But don't give up on WaveGain yet, you can do exactly what you need with it (clipping prevention + uniform, but modest, volume reduction)! Experiment with the --gain switch, as explained in the command-line help.

Quote
BTW - what does FS stand for? And what playback systems are you aware of that have problems as amplitude approaches 0db?


Well, many consumer soundcards begin to distort at -3 dB. There was a sample somewhere, for testing with your own system... maybe i'll find it later. "FS" means full scale, BTW. Also, in many CD players, high frequencies can't be reproduced up to full 0 dB; instead, the peaks get cut off during playback. This has been reported in an AES paper IIRC.

Quote
to crank up the volume to abnormal levels just to hear it.


No, there's only one thing that's abnormal: The volume level on today's CDs. A reference volume of 89 dB, as applied by ReplayGain, is an intelligent countermeasure.

How To Use Mp3 Gain ?

Reply #27
Quote
3) no, no, no (this is my opinion, if mp3 is your goal, as you have written).


But if I don't, then my MP3s will almost certainly clip.  I see you're ripping and encoding in one step.  Leaving aside the issue of .wav editing before encoding, how do you prevent clipping in your MP3s?  I'm doing this to reduce the amplitude of the source and prevent clipping, not to increase its amplitude before encoding.


Quote
4) umm, --alt-preset standard with addition -V1 is nowhere recommended. There are no test sessions made with this. In fact, the alt-preset was optimized as it is, so you do only cause trouble by adding NOT RECOMMENDED SWITCHES. For higher or lower quality or filesize, choose recommended presets from list !!


I asked for feedback in the presets thread, and so far haven't received any.  If there hasn't been any testing, how do you know that adding this switch will cause trouble?  I understand that it's not on on the recommended list, but that doesn't mean it therefore causes problems.  As I wrote in the other thread, I remember agreeing with the argument for V1 on the r3mix site, and would like to keep this in the absense of knowledge that it's adversly affecting the encoding.  I did read a message where someone reported swooshing with -V0.  I guess I' m just one of those people who, when told "You're not supposed to do that!", reply, "Why not?"  But this is for another thread.


Quote
5) check for clipping (yes, here, not earlier like in 2, normalizing the mp3 is lossless by mp3gain, so it is better, and otherwise you would have double work, here in mp3gain you can adjust volumes much better than in step 2.)


Well, if your MP3 is clipping at this point, it's already damaged, right?  I mean, if amplitude is an 8-bit signed integer and there are frames where the value is 16384, using MP3Gain to reduce this value won't get back the information that was clipped off during the encoding process, right?  Yes, after you apply the gain change, a second analysis will report no clipping, but that's because you reduced a clipped number.  My goal is to be sure there's never a clipped number in the original MP3; after that, you can move it up and down all you want (as long you as don't clip it in the process), and the changes will be lossless, right?

When you run MP3Gain on your just-created MP3s and see that some are clipped before you apply any changes, how do you feel about that?


Quote
I don't need 8 steps...


Well, I'm all for efficency, too, but all my work is going thru a .wav editor for the reasons I've already explained before it gets encoded, so using EAC to encode and tag isn't an option.  I'll gladly modify what I'm doing as long as it doesn't harm the result.  That's why I want to better understand how gain modification affects .wav files as well as why adding the -V1 switch may affect the quality of the MP3.

How To Use Mp3 Gain ?

Reply #28
"If there hasn't been any testing, how do you know that adding this switch (-V1 to aps) will cause trouble? "

erm, misunderstanding, the --alt-presets have been developed and tested over a long time.
It is obvious that developers will have considered of v0, or v1 vs. v2.
If they took v2, they will have had their reasons.

But this belongs to another thread.





" Well, if your MP3 is clipping at this point, it's already damaged, right? "



hmm, probably your misconception of mp3.

As far as today I understood mp3 with mp3gain as follows:

the clipping (higher peaks than 32767) shown in mp3gain is the clipping that would occur AFTER DEcoding to 16bit, 44.1 wave.

So, mp3 saves properly these values above 32767. Only the decoder will cut at 32767.

So, the mp3 itself is NOT damaged, if it contains values above 32767.
(only the decoded wave would be)
So, lowering/increasing the volume lossless (see !)  by mp3gain, you can create mp3s, which don't clip, or even clip after decoding.

you may take a proper mp3 with max gain peak value below 32767.
you can increase the volume losslessly  by mp3gain to values far above from 32767, to 50000 for example, no problem, really.

If you play such mp3, you will know, what clipping is...

Then take this mp3 with values above 50000 and decrease the volume below 32767.

It will sound well again !!!

How To Use Mp3 Gain ?

Reply #29
Quote
hmm, probably your misconception of mp3


Well, that could well be the case.  That's why I'm here.

I went back and read the help file for MP3Gain, and I misunderstood what the clipping indicator meant.  It actually means that it will clip upon decoding.  But, I think we can agree that an MP3 file isn't of much value until it's been decoded, so we need to adjust it to prevent this.

We can do this one of two ways:

1)  Adjust the .wav file before encoding such that the resulting MP3 file won't clip when decoded.
2)  Adjust the MP3 file after encoding.

I was also mistaken about what was being stored.  The globabl gain value, according the help file, is an 8-bit integer, so this has to be between 0 and 255.  It also explains why the increment of change is 1.5db.  I'm going to read up more on the Global Gain Field, since there has to be some limitation to how much you can increase or decrease the number, (which I hope is addressed in the program), but what's important here is to recognize this increment itself.

So, the question comes down to this: Is it better to adjust the .wav before encoding where the adjustment increment can be virtually unlimited but introduce rounding errors to the original sample values or adjust the MP3 file after encoding where the adjustment increment is rather coarse, but applied to a file created from a "true" source?

Opinions?

How To Use Mp3 Gain ?

Reply #30
you know my opinion.

to do it with the least time and work, but result is the closest to original source:

1. eac -> ripping & encoding to mp3 & naming & tagging
2. mp3gain -> analysis -> noclipgain, adjusting averaged volumes to album or title levels.

if you want to work with/on the specific music, you will do it on the waves.
but very likely you have to do still mp3gaining/noclip after encoding to mp3, due to peaks created by encoding to mp3.

How To Use Mp3 Gain ?

Reply #31
Here's the file i mentioned before: overloadtest.flac

Check when your soundcard distorts. Use headphones if you can, and don't turn it up too loud.

How To Use Mp3 Gain ?

Reply #32
Quote
So, the question comes down to this: Is it better to adjust the .wav before encoding where the adjustment increment can be virtually unlimited but introduce rounding errors to the original sample values or adjust the MP3 file after encoding where the adjustment increment is rather coarse, but applied to a file created from a "true" source?

If you have been around for a while, the forum in general recommends using mp3gain based on the philosophy of not touching the original as much as possible, and I concur.

Regarding -v1 and -v2:
There are many things to adjust which can affect the quality of a VBR encoding, and -v is one of them. -v mainly deals with the position of the ath curve iirc, and is not really the optimal way of scaling VBR presets although it is a quick and easy way. During testings, Dibrom found that going below -v2 is redundant so that is probably around where the real ath lies. In most cases you get larger bitrates but the quality would not be noticable, and the bits are probably better spent in other ways. In some cases, especially when you hit the 320kbps frame limit you may get lower quality where bits are not optimally used.


[EDIT]
Another reason to use mp3gain is that you can be sure that the result will not clip. If you do your own normalizing before hand, you have absolutely no idea how much you need to attenuate by to prevent clipping.
[/EDIT]

How To Use Mp3 Gain ?

Reply #33
Quote
Here's the file i mentioned before: overloadtest.flac

Check when your soundcard distorts. Use headphones if you can, and don't turn it up too loud.


Thanks.  Got it and the plug-in for winamp.  It sounds like a constant tone that gets louder.  I don't hear any distortion.  Would you mind explaining in a bit more detail what I'm looking for and how to do it, or pointing to a link.  I'm using a TB Santa Cruz with Sony MDR-CD999 headphones.

Thanks.

How To Use Mp3 Gain ?

Reply #34
Quote
If you have been around for a while, the forum in general recommends using mp3gain based on the philosophy of not touching the original as much as possible, and I concur.

Another reason to use mp3gain is that you can be sure that the result will not clip. If you do your own normalizing before hand, you have absolutely no idea how much you need to attenuate by to prevent clipping.


Yes, I'm aware of that perspective, and, in general agree with it.  I need to do more research into the effect the rounding errors have on the samples when applying the adjustment to the .wav file.  I've found, in limited testing to be sure, that an absolute peak normalization of -2db prevents clipping when encoded.  Further testing might reveal this number can be a bit less, as well as that there are tracks where even this isn't enough, although it passed muster on one that was extremely loud and compressed the whole way thru.


Quote
Regarding -v1 and -v2:
There are many things to adjust which can affect the quality of a VBR encoding, and -v is one of them. -v mainly deals with the position of the ath curve iirc, and is not really the optimal way of scaling VBR presets although it is a quick and easy way. During testings, Dibrom found that going below -v2 is redundant so that is probably around where the real ath lies. In most cases you get larger bitrates but the quality would not be noticable, and the bits are probably better spent in other ways. In some cases, especially when you hit the 320kbps frame limit you may get lower quality where bits are not optimally used.


Thanks.  Now we're getting somewhere.  We should probably continue this on the settings thread, so I'm going to go over there.

How To Use Mp3 Gain ?

Reply #35
Quote
Yes, I'm aware of that perspective, and, in general agree with it.  I need to do more research into the effect the rounding errors have on the samples when applying the adjustment to the .wav file.  I've found, in limited testing to be sure, that an absolute peak normalization of -2db prevents clipping when encoded.  Further testing might reveal this number can be a bit less, as well as that there are tracks where even this isn't enough, although it passed muster on one that was extremely loud and compressed the whole way thru.

This depends on settings used.
-aps should clip very rarely
-ap128 requires 93% normalisation
If you check out the -ap table in the source codes, the recommended --scale decreases as bitrate decreases.

How To Use Mp3 Gain ?

Reply #36
I got quite a bit of clipping in some Iron Maiden with -ap128, when using the default scale .93.  Total number of clipped samples was reduced from using --scale 1, but still high enough to be audible in places.  I'm not really convinced scale is a parameter the presets should be promoting, when we are at the same time promoting mp3gain as the solution to clipping and volume normalization across tracks/albums. 

Also I don't think that a lot of LAME users even know that --scale is being used in the presets, and probably mp3gain afterward anyway.

How To Use Mp3 Gain ?

Reply #37
Quote
Would you mind explaining in a bit more detail what I'm looking for and how to do it

Just listen to it. You shouldn't hear the differential tone at 3.7 kHz. If you do, your soundcard distorts. Bad soundcards already distort at -6 dB, better ones maybe at -2 dB. The sample goes from -12 dB to 0 dB.

How To Use Mp3 Gain ?

Reply #38
Quote
This depends on settings used.
-aps should clip very rarely


Looking at the analysis from the CD I used to test various settings, MP3Gain reports that 11 out of 13 songs are clipping when encoded with --a-ps and --aps-V1.  When encoded at --a-ps-V0, it drops to 9 out of 13.  And that's based on a straight encode of the .wav with absolutely no adjustments made to the source before encoding.  Yes, it's a loud CD of rock Xmas music that seem to be from various sources and not much time was spend mastering them together, and it's just one CD.  But that's the datapoint I have.

I just ran MP3Gain against the same 13 files encoded at --a-pe and it's still 11 out of 13, but the two tracks that aren't clipping are different than the two at aps.

How To Use Mp3 Gain ?

Reply #39
Quote
Just listen to it. You shouldn't hear the differential tone at 3.7 kHz. If you do, your soundcard distorts. Bad soundcards already distort at -6 dB, better ones maybe at -2 dB. The sample goes from -12 dB to 0 dB.


Ok. Great.  The first time I tried it I had the volume way down per your warning, so I didn't hear anything until the very end.  After turning it up, I still don't hear anything at first, and then it's a constant sound that gets louder until it stops.  It never distorts.

How To Use Mp3 Gain ?

Reply #40
Quote
After turning it up, I still don't hear anything at first, and then it's a constant sound that gets louder until it stops.

You're overcautious. You should make it loud enough to clearly hear the tone at the beginning. My warning about the loudness is not because of your ears, but because of cheap tweeters in PC speakers! The speakers in headphones should be more robust.

How To Use Mp3 Gain ?

Reply #41
Quote
Looking at the analysis from the CD I used to test various settings, MP3Gain reports that 11 out of 13 songs are clipping when encoded with --a-ps and --aps-V1.  When encoded at --a-ps-V0, it drops to 9 out of 13.  And that's based on a straight encode of the .wav with absolutely no adjustments made to the source before encoding.  Yes, it's a loud CD of rock Xmas music that seem to be from various sources and not much time was spend mastering them together, and it's just one CD.  But that's the datapoint I have.

Since -aps has been tested extensively by Dibrom, what I assume is that clipping does occur with -aps, but are often not audible. To be audible, clipping normally has to occur for quite a few consecutive samples. You can set this threshold for clipping detection in advanced wave editors, but I guess mp3gain doesn't do this and detects all single sample clippings.

How To Use Mp3 Gain ?

Reply #42
Is there any problem if I set the output level in MP3Gain to 92dB instead of the recommended 89dB and MP3Gain says there is no clipping in my MP3 Files? Adjusting them to 89dbB makes them sound 'very' silent on my iPod (don't want to hear my music with the volume control at 60%).

Thanks for helping.

illdie4u

How To Use Mp3 Gain ?

Reply #43
if there is no clipping, all is fine.

For those reasons, there you have the possibility to adjust to max. noclip gain.

How To Use Mp3 Gain ?

Reply #44
But for portable reasons I want my whole collection to have almost the same volume, but 'max. noclip gain' won't do this, because every single song gets his maximum non clipping volume, right?

How To Use Mp3 Gain ?

Reply #45
what mp3-gain program should i use, and where can I download it?
As a newbie, I could not follow the FAQ, because I have the program MP3Gain, but this program doesn't have te same options as discribed in this FAQ (current peak level, radio-gain, options-menu)


How To Use Mp3 Gain ?

Reply #47
i use that version, but again, I can't follow this FAQ!
Can I use an older version or does this FAQ need to be re-written?

 

How To Use Mp3 Gain ?

Reply #48
I just checked out that overload sample.  I used a pair of Grado SR80 phones with a TB Santa Cruz, played using Foobar.  Results were somewhat interesting:

- Without the -6dB limiter, I heard no change in tone.
- With the -6dB limiter, I heard no change in tone.
- With equalizer DSP and limiter, I heard no change in tone.
- With the resampling DSP set to 48KHz, I heard a change in tone near the end of the sample.  Fast and slow mode resampling made no difference.

I guess resampling to 48 is not all it's purported to be.  I don't use the resampler, 'cause I could never hear a difference, but this sample clearly demonstrates that there is one.  I'm not sure how often this sort of artifact would occur in real music with the resampler, but I'll definitely never use it after hearing that.

How To Use Mp3 Gain ?

Reply #49
ronnie_t:

Quote
Can I use an older version or does this FAQ need to be re-written?


I don't know, I have never read it  MP3Gain includes a nice help file which describes very clearly how to use the program, try that. Although I don't understand how one can find the program that hard to use, to be honest...