Help - Search - Members - Calendar
Full Version: How To Use Mp3 Gain ?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Pages: 1, 2, 3
user
Last update:
2004-08-16


Thanks to westgroveg, we have a brief summary of today's possibilities:



QUOTE(westgroveg @ Aug 16 2004, 12:28 AM)
This thread is always coming backup so here a few extra hints for users





  • Album analyses  calculates track/album values so performing an album analyses is all you need to do.





  • MP3Gain now supports writing changes to ID3 tag so it is 100% lossless, ie. completely reversible.





  • As of LAME 3.96 (track) replaygain values are automatically written to the lame tag,





  • Unlike MP3Gain, values stored in the lame tag need to be applied during playback which requires more CPU processing & the decoder to be aware.





  • Foobar can automatically scan & adjust replaygain values without any need for MP3Gain but of course some of us don’t like this audio player.




  • One more thing, make sure, you tag before using replaygain or instead of your replaygain values being hidden they appear in the comment field for some reason which can be annoying.





*

user
Here is a very short and simple description

How to Stopping Clipping in Mp3 Files for Newbies

written by westgroveG




This has been answered by Snelg/User (see post above) but I think this will simplify it for beginners.


"Clipping" is when the music hits max volume and gets distorted.

To permanently remove clipping and keep volume differences between each track on an album you will need Mp3Gain:

http://privatewww.essex.ac.uk/~djmrob/mp3g...FULLinstall.zip

Open MP3 Gain, adjust:

Options\Each Folder Is Album (tick)

Options\Advanced\Enable Maximizing Features (tick)

Then do an Album/Radio Analyze,
If Any Mp3 file in Mp3gain has a "Y" (yes) under the clipping bar then, Go to the "modify gain" menu, "Apply max no clip gain for album".

If you only want to modify files with clipping and don't care about keeping volume differences between each track on an album you "Apply max no clip gain for each file" instead of "Apply max no clip gain for album".

And that’s it, now your files have no clipping distortion.






What do you do if you want all your MP3's to have the same volume irrespective of the source album?

auldyin


PS.

This would complete the instruction. (I am at work at present and cannot recollect what to do.......its almost automatic now and I'll be damned if I can remember what I did)






Answer by westgroveG


To get all your files to have the same loudness,

Do a Radio Analysis,

In the, Target “Normal” Volume Field choose the Volume all your selected files will have (default 89dB is recommended),

Then do a Radio gain.


If you would like your Mp3 files to be as close to your Target “Normal” Volume as possible while maintaining volume differences between each file on an album you simply
Do a Album Analysis instead of a Radio Analysis & a Album gain instead of a Radio Gain.

And if any file still has clipping you should lower the Target “Normal” Volume value.

B.TW This is Basically answered in the Mp3Gain Help file. If you are unsure of anything else you should probably refer to it first.
user
MP3-CD album-based MP3Gain adjustment for newbies

written by Shadow RD
« on: January 30, 2002, 03:44:40 PM »

--------------------------------------------------------------------------------
I made this list up for myself (yeah I'm a bit lame!) and I thought it may lessen questions to Snelg and help others in the process if I posted it:

------------------------------------------------------------
How To Perform Optimised Album-based MP3 Gain Adjustment For Multiple Albums of MP3s for putting onto MP3-CDs
------------------------------------------------------------


(1) Put MP3 files in sub-folders sorted by album

(2) Open MP3 Gain, adjust:
Options\Each Folder Is Album (tick)
Options\Add Subfolders (tick)
Options\Show Path\File (tick)
Options\Advanced\Performance (tick both boxes)
Options\Advanced\Enable Maximising Features (tick)

(3) Set Target "Normal" Volume to 89 dB (if not already)
- Using 89 dB for the target volume will probably ensure
that no clipping will happen even for older albums
with greater dynamic range
- if clipping does occur with 89 dB you will have to reduce
the value

(4) File\Add Folder - choose folder containing all the album
subfolders

(5) Analysis\Album Analysis - does MP3 Gain Analysis album
by album

(6) Modify Gain\Album Gain - normalizes the MP3 Gain of all
albums relative to each other and as close as possible
to 89 dB

(7) Order files by Max Noclip Gain column (first do Radio
Analysis if Replay Gain information is not there
anymore) and note smallest value in the column

(8) Modify Gain\Apply Constant Gain - select value noted in
(7) to increase files gain by (if this is 0.0 then do
not adjust volume)

------------------------------------------------------------
This should ensure that the MP3s of each album are of comparable loudness and that the overall volume level is optimised.

------------------------------------------------------------
Vincent Kargatis
Is there a way to have mp3gain automatically pick the lowest target volume between the chosen target and max no-clip? I have plenty of really dynamic music, where the peak is normalized, but the average volume is a lot lower than the target.

I know the "real" answer is to set the target to the "lowest maximized volume" in my collection, but I just don't want to set the gain of my whole collection to such a low value (which would be ~70). I'd rather just occasionally adjust the volume for these outlier cuts.

But in the meantime, when I'm doing large folder-based radio gain adjustment, I'm wondering whether I must manually unselect these files so they're not pushed into the clipping range. It's not *that* hard (sorting by radio gain, and deselecting most of the positive ones - those that have low average volumes), but it's still inconvenient. Just wondering if I'm missing an option...
Vincent Kargatis
Well, no answer, so I assume no. Anyway, here's what I'm doing, as I mp3gain my collection (taking a while, since there's about 15,000 to do, though I'm doing them by genre folder, so it's not all at once).

- radio-gain-analyze the folder

- sort by radio gain

- select all negatives (-1.5 down)

- manually additionally select the positive radio gains with max-no-clip-gain greater or equal to the radio [clip(Radio) will not be Y for these]

- apply radio gain

- then manually select all positive radio gain left with 0 < max-no-clip < radio gain

- apply max-no-clip-gain to those

Then I'm done. Since I'm using 89 as a target, I have a few left over that are dynamic tracks already peak-maximized but lower avg volume, but these I'll live with and adjust manually when listening as desired. I have some experimental electronica tracks that have peak-maxed avg volumes in the 50s...

The effort's worthwhile - I have noticed a difference while shuffle listening, among the ones done - better volume balance during the listening period. Thanks, mp3gain authors!
westgroveg
QUOTE(user @ Sep 2 2002 - 08:31 AM)
Here is a very short and simple description

How to           Stopping Clipping in Mp3 Files for Newbies    

written by westgroveG


Thanks user, about time someone past that MP3Gain stuff over here.
High Speed Dubbing
Thanx for the tutorial, been looking for help for ages
holkie
QUOTE
(7) Order files by Max Noclip Gain column (first do Radio
Analysis if Replay Gain information is not there
anymore) and note smallest value in the column

(8) Modify Gain\Apply Constant Gain - select value noted in
(7) to increase files gain by (if this is 0.0 then do
not adjust volume)


Are steps 7 and 8 required/recommended???
user
I sort never manually songs.

The first 2 posts say all. (The first one from me with content of me and Snelg, and the second one by westgroveG)
floyd
ok.. what about the best settings for mp3 portables? I have a creative nomad IIc and I'm assuming it doesn't support mp3gain (do any portables?).. whats the best way to avoid clipping with it? use wavgain before encoding to mp3? any help would be appreciated biggrin.gif thanks.

edit: Apparently the Nomad IIc *does* support mp3gain! I'm surprised, to say the least.
user
mp3gain:
Hardware support is NOT required...

mp3gain makes changes of volume losslessly in the mp3 file.
So every player plays adjusted volume.
gfly3
i have searched for the answer for this but could not find a clear answer , can i use mp3gain on my mp3's then convert to wave and burn to cd. i guess my question is,if i use mp3gain on some mp3's is it carried over to the wave when i convert it ? or does this only apply to mp3 players. please forgive if this has already been posted. thanks gfly3
Snelg
QUOTE(gfly3 @ Oct 28 2002 - 09:03 PM)
i have searched for the answer for this but could not find a clear answer; can i  use mp3gain on my mp3's then convert to wave and burn to cd?

YES

Clear enough for ya wink.gif ?
gfly3
clear enough ! biggrin.gif and a great app. thanks a million.
gfly3
AreteOne
This looks like just what I need for MP3 discs. Many thanks to all those involved as well as help here.

Now.... does anyone know of a similar program for .wav files? I hope so, because rolling the adjustments by hand is a PITA....

TIA.
Jan S.
WAVgain: http://www.answermonkey.net/App_WAVGain.htm
illdie4u
Hello,

how fast does mp3gain work? How long would it take me to adjust about 500 files on a PII 350MHz? Am I able to adjust the mp3's directly on an iPod (will try it this evening, think it should work but may be slow)?

Thanks for helping!

bye

illdie4u
Jan S.
It's the analyse that takes the time, not really the gain change.

Anyway, I imagine that it will take a very long time for you to mp3gain all your files... I believe one album takes about ˝-1 hour on my 266 k6...
CiTay
Time to apply AlbumGain on 12 MP3 files (PIII 1.13 GHz with Seagata Barraccuda IV hard disk):

1 minutes 17 seconds
AreteOne
Now that I've played with MP3Gain, I've got a couple questions......

I've taken a .wav file (loud rock) and normalized its peak to 98. Then I ran it thru LAME v3.91 --ap-s -V1. Then I looked at the MP3Gain track analysis, and it said the average volume was 100.4 and that there was clipping, which makes sense if the average is over 100.

1) First off, when we talk about "peak to 98", just what does 98 measure? I've always assumed it was 98% of some sort of maximum, which is why you can't go above 100.

2) How did a file that had been peaked to 98 wind up with a higher average? Is this function of the MP3 format only being able to express "volume" (what's the correct term here, amplitude?) in increments of 1.5db? Does this limitation mean that we get "rounding" errors because it can't express 98 whatever precisely, just the nearest value, and that value can be driven above 100?

3) What's the highest peak value for a .wav file that won't round to above 100?

TIA.

BTW - very interesting stuff here.
AreteOne
Providing the thread with some more information after doing some reading on various web pages....

It's clear that the process of encoding may introduce clipping to the MP3 even if the source .wav had no clipping itself. This is particulary a problem with CDs that are recorded at near peak volume and heavily compressed (the entire track is loud).

I had done some comparative analysis with a CD of songs that varied greatly in style and compression to take a look at the effect the --alt-presets had on bit rates and files sizes and still had the MP3 files on my hard drive. These MP3s were created by ripping the CD to .wav files using EAC, and then after they had been written to the drive, running RazorLame on them with LAME v3.90.2 and v3.91 (which produced exactly the same results, so I'm using 3.91 right now) without any mods whatsoever.

I went back and used MP3Gain to do a track analysis on these MP3s and almost every one has clipping, while CEP reports that none of their source .wav files have clipping. As a side note, I noticed that a couple tracks that clipped with aps and aps-V1 didn't clip with aps-V0, but that's hardly justification for the increased file sizes. Anyways....

This was pretty eye-opening. I hardly want to be spending the time creating MP3s and using a process that lends itself to clipping. To compensate for this, I've gone back and, using CEP, normalized the .wavs by -2db, and then recreated the MP3s. Now MP3Gain reports that they come in with average volumes nicely in 90s without clipping, and all but one reported that no more gain could be added without clipping.

Some random comments...

o MP3Gain is now part of my creation process simply to check for clipping, and when possible, to increase to the max volume without clipping. My MP3s are still loud enough to be played without having the crank the speakers up to max and I know there's no clipping. A very nice tool.

o I was blown away by how many clipped MP3s I have, both of my own doing and from others. I wonder how much this contributes to people complaining about the format. Maybe my ears suck, but I'm using Sony Digital Headphones and a TB Santa Cruz, and I'm hard-pressed to hear the spots where the music has been compromised; occasionally I can find it (maybe the crispness of a cymbal is a tad lacking), but the other 99.99% of the time it's spot on.

o I tried using WaveGain on a collection of tracks I'm about to master and burn for a Christmas CD. After using MP3Gain, it was a huge letdown. The resulting files were heavily reduced in volume across the board, and made them sound muffled. And, some of the tracks were way off, especially softer music that was left disproportinately louder than it should have been. I guess it's back to doing it by hand.

o I'm just amazed at how poor a job a number of tracks being released on CDs are. I mean, if a rank amature at this like me can figure out in a few minutes how to eliminate the hiss at the end of a track and hide the adjustment so you can't tell where it starts, and make it sound 1000xs better than the source, why can't the professional who mastered it do this? Now it's on to learning how to get rid of the stray noises in the middle. I'll listen to an MP3 and think I've finally found a sample that's produced whooshing or an artifact, only to discover the garbage is on the source, both listening to the CD and to the EAC-ripped .wav. Maybe I'm just too picky, but, really, isn't this the kind of stuff the mastering pro is supposed to catch and eliminate before production?


Bottom line.... MP3 creation procedure is now...

1) Rip with EAC.
2) Trim silence, kill hiss, and smooth fade-outs when necessary.
3) Normalize peak to -2db.
4) Encode with LAME v3.91 --a-ps -V1.
5) Check for clipping in MP3Gain and increase volume if possible.
6) Listen.
7) Tag.
8) Enjoy! B)
CiTay
I don't agree with 2), 3) and 5) (the latter part!).
AreteOne
QUOTE(CiTay @ Nov 21 2002 - 05:43 AM)
I don't agree with 2), 3) and 5) (the latter part!).


I'd be interested in reading why you disagree. It would help me and anyone else reading to make a better decision.

Re #2: I'm aware that some hold to the position that the MP3 should be an exact reproduction of the source, warts and all. Since I don't like extended silence, hiss, or fade-outs that drop off the edge of the table, and have the tools to remove them, I choose to. If the source is good, I leave it alone. I look at MP3s like the 45s I used to buy when I was a kid. If I want to listen to the CD, I'll just play that; it's not my intention to create the CD in another format, but rather to have a jukebox-like collection of tunes for future entertainment. And if I'm making an audio CD, I pull the tracks from the source if I have them rather than decode the MP3 and work with that, for the obvious loss-of-quality issue.

Re #3: If I don't normalize, my MP3's will clip, as I've just discovered. I'm aware that this most likely will introduce rounding errors to the samples, which, at least theoretically, means the MP3 doesn't match the source. I'm more concerned about the effect clipping may have on my listening enjoyment than what are likely to be rounding errors that are imperceptable. And, I'm not sure why one would object to normalizing a .wav file well within an acceptable range when the process of encoding it to MP3 makes a far greater change to the original source. Do you feel there's a better value than -2db that would let me achieve the goal of not clipping and, at the same time, minimize or eliminate the rounding errors? BTW - I should note that if peak is less than -2db, I wouldn't normalize the .wav, but rather boost the volume with MP3Gain.

Re #5: Why don't you like increasing the volume of an MP3 if it won't introduce clipping? Does this introduce rounding errors also? I was under the impression that one can increase and decrease the gain repeatedly without any loss of information because of the way gain is handled in the format - that's what makes it lossless. If rounding errors are introduced, then this wouldn't be true.
CiTay
Why i disagree...

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.

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.

Don't get me wrong, your goal is honorable. It's sometimes a good idea to lower the volume *before* encoding, because too loud music can indeed cause problems occasionally. But i would do this with WaveGain. It doesn't draw it's conclusions just from the peak values. If you use it right, it's better than normalizing. Try these switches: "--album --log --gain 3 --dither 3 --apply". With --gain, you can raise the reference volume, if it is too quiet for you. Dithering is also a good idea, it pushes the noise to the HF region, where it doesn't interfere. And of course, AlbumGain, to preserve the volume differences (again, the "exact reproduction" thing).

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... smile.gif
user
Not the best way:

Bottom line.... MP3 creation procedure is now...

1) Rip with EAC
2) Trim silence, kill hiss, and smooth fade-outs when necessary.
3) Normalize peak to -2db.
4) Encode with LAME v3.91 --a-ps -V1.
5) Check for clipping in MP3Gain and increase volume if possible.
6) Listen.
7) Tag.
8) Enjoy!


My better suggestion:

1) Rip with EAC & tag directly to mp3 / mpc, if you want, you can save in same step the original waves, but quite unnecessary, as you could create high quality mp3s / mpcs .....
2) for original reproduction, leave it out, but for purpose, you can do what you prefer...
3) no, no, no (this is my opinion, if mp3 is your goal, as you have written).
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 !!
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.)
6) due to step 1, you save work, just configure eac once.
7) Listen & enjoy !


IMHO, you should try to use programs at their best, so you avoid unnecessary work.

My way for mp3:
1. EAC: rip & encode to mp3/mpc & name & tag ; all in one step !!!
2. mp3gain: analysis -> either max. noclip gain for album, or adjusting album gain to 89db, or similar, all depends on music, album, purpose.
3. Listen & enjoy

I don't need 8 steps...
AreteOne
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.
CiTay
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.
AreteOne
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.
user
"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 !!!
AreteOne
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?
user
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.
CiTay
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.
tangent
QUOTE(AreteOne @ Nov 22 2002 - 04:05 AM)
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]
AreteOne
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.
AreteOne
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.
tangent
QUOTE(AreteOne @ Nov 22 2002 - 05:55 PM)
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.
floyd
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.
CiTay
QUOTE(AreteOne @ Nov 22 2002 - 10:45 AM)
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.
AreteOne
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.
AreteOne
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.
CiTay
QUOTE(AreteOne @ Nov 22 2002 - 01:57 PM)
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.
tangent
QUOTE(AreteOne @ Nov 22 2002 - 08:51 PM)
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.
illdie4u
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
user
if there is no clipping, all is fine.

For those reasons, there you have the possibility to adjust to max. noclip gain.
illdie4u
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?
ronnie_t
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)
Volcano
http://www.geocities.com/mp3gain/

If you wait a few days, you'll get a nice, fresh, tidied-up 1.0 release. smile.gif
ronnie_t
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?
Bones
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.
Volcano
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 tongue.gif 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...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.