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: MP3Gain and Clipping (Read 13748 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

MP3Gain and Clipping

Hi all! Just a quick question for those that may be familiar with the MP3Gain application. I am about to encoded a higher decibel level on all my tunes on my iPod (something like 22 gigs worth of music) and something is holding me back... It's the fear that the "Clip" that the majority of tracks will "gain" that worries me. How will this affect the sound of the songs? Now I'm hardly a stickler for "perfect" audio sound, but I do want as faithful a representation as I can get. Any suggestions? Should I just go ahead and do it? Don't bother? What's the worst that can happen? Thanks for any help in advance!

MP3Gain and Clipping

Reply #1
Well... from my experience, I worn out in efforts to stick with perfect audio. MP3Gain will just lower the volume of your MP3 files, you won't lose any quality. It's certain that the perfectionist won't like to have the sound physically adjusted, but in the future if ReplayGain is fully implemented in hardware players, we can undo those MP3 gain adjustments and thank MP3Gain for that. (Don't mess around with tags after applying though). Stick with 89dB MP3Gain recommendation it's likely nothing is going to clip (or show the "Y" warning).

You just won't get perfect audio. You might have songs that have been unproperly mastered (and that's going to stay like that), albums with several different volume levels. It's hell to keep a consistent and perfect collection of audio. Loudness race has gone too far. Well mastered tracks will stand out as "weak" ones due to the number of so much destroyed music with current mastering, remastering and re-releases.

The dream is to have a compressor that will do just like FM. A volume for all.

Whether clipping is audible from tracks up to 99db (like any Oasis song) it's kinda difficult. A couple of years ago you could hear clipping from these tracks due to the bad encoder they were made with. But as encoders improved and stressed stability (like LAME) it's unlikely one can hear the clipping (that is already present in the WAV source).

MP3Gain and Clipping

Reply #2
Well, I was thinking of just getting a baseline of around 99db, so the majority of my tracks won't be altered... much. Some though will change as much as 25db, but this is hardly the norm.

Anyway, as long as I keep the Saved Analysis File for the tracks I am adjusting, I will always be able to reverse the procedure, right? Even if I add more music later on to the iPod?

MP3Gain and Clipping

Reply #3
If you're aiming for 99 dB you're probably asking for trouble, but mp3gain stores Undo info in a tag to let you recover and also lets you apply a fixed gain (in 1.5 dB multiples) so you could adjust by -6.0 dB if things were too bad. Obviously you don't use Soundcheck on these files in the iPod, but if you change the files, you may need to removed them from iTunes database then add them back to refresh any changes you make.

Sure heavily dynamic-compressed tracks like most of the last few years will be unaltered, but most people find that 92-94 dB is about as far as they'll go, and not often suffer from noticeable clipping distortion because of more dynamic music.

Clearly you aren't getting enough volume from your iPod. Another solution is to stick to 89 dB and over-ride the volume-limiter used to protect you ears (at your own risk!) - this limiter is included in iPods sold in Europe and some other regions. This blog post offers one solution, namely to run goPod every time you update your iPod firmware (if your iPod version is supported), which will remove the artificial volume control limit. I suspect iPods are configured for the "highest common denominator" - i.e. the most loudly mastered CD tracks in existence - to protect ears, but that's no use for some noisy environments or for low sensitivity headphones.

Anyway, just bear in mind that it's at your own risk.
Dynamic – the artist formerly known as DickD

MP3Gain and Clipping

Reply #4
If you're aiming for 99 dB you're probably asking for trouble, but mp3gain stores Undo info in a tag to let you recover and also lets you apply a fixed gain (in 1.5 dB multiples) so you could adjust by -6.0 dB if things were too bad. Obviously you don't use Soundcheck on these files in the iPod, but if you change the files, you may need to removed them from iTunes database then add them back to refresh any changes you make.

Sure heavily dynamic-compressed tracks like most of the last few years will be unaltered, but most people find that 92-94 dB is about as far as they'll go, and not often suffer from noticeable clipping distortion because of more dynamic music.

Clearly you aren't getting enough volume from your iPod. Another solution is to stick to 89 dB and over-ride the volume-limiter used to protect you ears (at your own risk!) - this limiter is included in iPods sold in Europe and some other regions. This blog post offers one solution, namely to run goPod every time you update your iPod firmware (if your iPod version is supported), which will remove the artificial volume control limit. I suspect iPods are configured for the "highest common denominator" - i.e. the most loudly mastered CD tracks in existence - to protect ears, but that's no use for some noisy environments or for low sensitivity headphones.

Anyway, just bear in mind that it's at your own risk.


Well, it's not that the the Sound Check isn't working or the volume limiter gibbed... I need to jack the sound strictly for when I am driving around in my car, and am playing from the iPod directly. I also use my iPod as my primary music backup, so Sound Check is enabled when I listen through it on my computer, and refreshing the songs probably won't be a problem since it's streamed right off the iPod anyway. You think 94db is going to be enough? I suppose as long as the volume is constant, it's better than nothing... I was just hoping to push it as far as the volume could go without to much distortion in order to drown out the sound of the traffic on the factory installed radio.

MP3Gain and Clipping

Reply #5
Well, I was thinking of just getting a baseline of around 99db, so the majority of my tracks won't be altered... much. Some though will change as much as 25db, but this is hardly the norm.


Well if that means 25dB upward then forget it, there's no way that will work without severe clipping. The sad fact is that if you want all your music the same volume then you're going to have to adjust the majority downward. I've tried it and found it's pretty hard to go for more than about 91 or 92 dB if you've got a fairly diverse music collection (and even then only if you're prepared to manually adjust some of the quieter tracks to a slightly lower target).

MP3Gain and Clipping

Reply #6
Yeah, the majority of the tracks are already around 94db or so for starters.

Anyway, a quick question - If I adjust a track once, and then adjust it again, what is the end result if I select "Undo Gain Changes?" Will it revert the mp3 back to the last change only, or back to its' original pre-tagged mp3gain setting? Thanks.

MP3Gain and Clipping

Reply #7
Quote
Anyway, a quick question - If I adjust a track once, and then adjust it again, what is the end result if I select "Undo Gain Changes?" Will it revert the mp3 back to the last change only, or back to its' original pre-tagged mp3gain setting?


It will be back to its original form. Just NEVER mess with the tags, specially in foobar2000 and you won't ever lose that undo information. If you use APEv2 tags only, it's ok, but if your songs have got like 3 tag types such as IDv1 IDv2 and APE and stuff, then any field you edit in foobar2k will erase the MP3Gain specific undo information.

Even if that tragedy occurs, there is still hope. Generally recent LAME encoded files are tagged with CRC, there is a little application called LameTag/LameTagGUI that will display "Music CRC" and "Actual Music CRC" - if they match it means they're at the original encoding. From there one can keep adjusting the levels up or down in 1.5 steps to discover which setting was originally for that MP3.

 

MP3Gain and Clipping

Reply #8
Okay, thanks for the help man!

MP3Gain and Clipping

Reply #9
Should I just select the "Don't Clip When Doing Track Gain" option instead? Is this actually worthwhile doing at all?

MP3Gain and Clipping

Reply #10
Should I just select the "Don't Clip When Doing Track Gain" option instead? Is this actually worthwhile doing at all?


Well setting a very high target gain and then selecting that option is going to give pretty mch the same result as applying maximum "no clip" gain to each track. The problem with this is that it will defeat the original purpose of making the percieved loudness of all tracks the same or similar.

MP3Gain and Clipping

Reply #11

Should I just select the "Don't Clip When Doing Track Gain" option instead? Is this actually worthwhile doing at all?


Well setting a very high target gain and then selecting that option is going to give pretty mch the same result as applying maximum "no clip" gain to each track. The problem with this is that it will defeat the original purpose of making the percieved loudness of all tracks the same or similar.

OK, but what about if I use "Don't Clip When Doing Track Gain" with a target volume of 89 dB?  I just checked my library, and I have 1 track 20.8dB below that target, and a handful 6 to 16 dB below.  I guess my question is, at around what point does clipping start? 

Over 92% of my library is at or above 89 DB, so the vast bulk of my collection would not have any clipping, correct?

Oh, and a question about tags.  I use MediaMonkey as my mp3 player, and I like to add star rankings to songs as I listen to them.  Will this kill the MP3Gain undo entries in the tag if I do a simple star rating change?  (And yes, I do know that MediaMonkey offers a level playback volume function without editing the mp3s [other than adding a leveling field in the tag].  I'm wanting to run MP3Gain on my collection for when I listen on the portal player in my car, which doesn't have the level playback feature.  However, I never edit the tags from my portable player.)

Thanks!

MP3Gain and Clipping

Reply #12
no, don't do that... the problem is that MP3Gain will only adjust in steps of 1.5dB each song - that means if you adjust the songs of an album too high or too low, they might show a big difference in volume. Once I did this with "Depeche Mode Playing the Angel" that is a ultra-compressed record on 99dB all tracks. I did an albumgain close to 89db bringing most songs down in -10dB. For my surprise track 2 was much much lower than the 1st and the 3rd, I assume that amounts of calculation and the limitation of 1.5db steps created an issue where a song can end up actually a bit lower than the "intentional loudness" from the source. For example: Two songs have to be brought exactly down to -9dB, but because of the 1.5 limit, one of them might go "unexact" and be adjusted to -10.5db. You get the idea?! But at the same time, those two songs would adjust fine if an amount of -3.0 was applied to them, because both would drop to -3.0dB. I never used MP3Gain with that adjustment again. Now I only adjust the minimum necessary to not show Y, or not clip.

Clipping start usually at 93-94dB in most albums. Albuns with 94dB will have some clipping tracks but not others. Albuns like the ones released by Oasis are 100dB and thus all songs clipping. 89-90dB is just a safety margin.

I don't use mediamonkey but you can replicate those mp3 and mess with a couple of them to test this in practice. (I only use foobar)

MP3Gain and Clipping

Reply #13
no, don't do that... the problem is that MP3Gain will only adjust in steps of 1.5dB each song - that means if you adjust the songs of an album too high or too low, they might show a big difference in volume. Once I did this with "Depeche Mode Playing the Angel" that is a ultra-compressed record on 99dB all tracks. I did an albumgain close to 89db bringing most songs down in -10dB. For my surprise track 2 was much much lower than the 1st and the 3rd, I assume that amounts of calculation and the limitation of 1.5db steps created an issue where a song can end up actually a bit lower than the "intentional loudness" from the source. For example: Two songs have to be brought exactly down to -9dB, but because of the 1.5 limit, one of them might go "unexact" and be adjusted to -10.5db. You get the idea?! But at the same time, those two songs would adjust fine if an amount of -3.0 was applied to them, because both would drop to -3.0dB. I never used MP3Gain with that adjustment again. Now I only adjust the minimum necessary to not show Y, or not clip.

Clipping start usually at 93-94dB in most albums. Albuns with 94dB will have some clipping tracks but not others. Albuns like the ones released by Oasis are 100dB and thus all songs clipping. 89-90dB is just a safety margin.

I don't use mediamonkey but you can replicate those mp3 and mess with a couple of them to test this in practice. (I only use foobar)

First off, thanks.  Second, what would you recommend I do, if I want steady volume for my portable device?

"Now I only adjust the minimum necessary to not show Y, or not clip."  I don't follow you.

I guess if you can recommend how best to go about what I'm trying to do, and any extra steps I should do as best practices (for example, is saving analysis results worthwhile, or doing analysis at all for that matter?), it would be great.

MP3Gain and Clipping

Reply #14
ehhe.. ok

ok lemme summarize:

if you're into albums - lower them in 1.5dB steps until no "Y" shows in any song. *downside: some albums will be louder, other lower, but none will clip.

if you're into tracks - you can apply 89dB in all of them - except for those less than 89dB... some 87dB track may clip going to 89dB - recommentation don't touch these ones. *downside: you lose the album loudness intentional consistency: eg. some tracks intentionally done to sound quieter than others.

if you want perfect REALLY perfect syncronism and pass beyond the limitation of 1.5dB through the albums, then the best thing to do is to re-rip these albums from lossless source BUT with ReplainGain Album already applied into them (foobar would do), that way you can make all albums perfectly sound around 89dB with their loudness consistency. *downside: you make your tracks lossy for a second time, since you are removing gain from it.

the fourth option is to do the same thing above but with MP3Gain. *downside: because mp3gain adjusts gain in steps of 1.5dB, the more adjustment, many songs that are ought to be quiet will be much more quieter than it was intended.

THE PERFECTION here is a hardware player that could magically play the songs with ReplayGain values stored in these files' tags. No audio altered, and 100% loudness consistency. But we're not that yet.

Quote
"Now I only adjust the minimum necessary to not show Y, or not clip." I don't follow you.

let's suppose you have an album.
you have these tracks at 98.0 dB.
if you set the gain volume to 97.0, it will bring down to 96.5 (that is -1.5 from 98dB)
if you set the gain volume to 95.0, it will bring down to 95.0 (that is -3.0 from 98dB)

attention here - look at the 97 and 95 intentional gain - you got one right (95) but due to the mp3gain 1.5 limitation, the other song will have to go lower - 96.5 (this is where fourth option mentioned lies)

now what... the track was clipping at 98dB.
but the tracks does not clip at 96.5, and also does not clip at 95.0
that means that you found the "minimum necessary adjustment to go" : 96.5 - stick with that.
MANY albums should be OK with no clipping if all tracks are adjusted to -1.5dB each
Veru compressed records might need -3.0dB or -4.5 on every track in order to not to clip.
There are going to be couple of records that will need to have -3.0dB applied in all songs, in order to reach loudness consistency and not clip at the same time. When I say "minimum necessary adjustment" is that if every track is lowered in -1.5dB and does not clip, then that is it!

MP3Gain and Clipping

Reply #15
if you're into albums - lower them in 1.5dB steps until no "Y" shows in any song. *downside: some albums will be louder, other lower, but none will clip.
1.5 dB is hardly enough to make any kind of significant difference.  I have albums (even tracks) that sound different by well more than 1.5dB with both of them set to the exact same reference level.

if you're into tracks - you can apply 89dB in all of them - except for those less than 89dB... some 87dB track may clip going to 89dB - recommentation don't touch these ones. *downside: you lose the album loudness intentional consistency: eg. some tracks intentionally done to sound quieter than others.
Louder than 2 dB also.

if you want perfect REALLY perfect syncronism and pass beyond the limitation of 1.5dB through the albums, then the best thing to do is to re-rip these albums from lossless source BUT with ReplainGain Album already applied into them (foobar would do), that way you can make all albums perfectly sound around 89dB with their loudness consistency. *downside: you make your tracks lossy for a second time, since you are removing gain from it.
The loss is completely negligible, but you're right, the wavegain approach is not a lossless process.

the fourth option is to do the same thing above but with MP3Gain. *downside: because mp3gain adjusts gain in steps of 1.5dB, the more adjustment, many songs that are ought to be quiet will be much more quieter than it was intended.
...same as my 1st and 2nd responses.

One should also ask oneself if the clipping is really audible.

Don't get me wrong, I'm all for the concept of RG and I personally use it and mp3gain, but there's a point where these numbers can't give you the entire story.

MP3Gain and Clipping

Reply #16
OK guys, this is all make sense, and is tremendously helpful.  Thank you.

So what is the best method if I'm into tracks (as opposed to albums), I don't want clipping, and I'm not going to rerip my 1000 CD collection?

If I'm understanding you correctly, I believe the answer is to use MP3Gain set to 89 dB on all of the tracks that are at 87 dB or greater.  In this way, I won't have clipping, and the majority of my collection will play at 89 dB.  Just a small percentage will be quiet, with that being the price I have to pay to not have clipping.

MP3Gain and Clipping

Reply #17
whatever is lower than 89dB is probably NOT clipping, you shouldn't even touch these ones! unless they're part of an album in which other songs are much louder and you want to keep a consistency lowering the whole album at let's say -3.0dB.

greynol is right - it's difficult/impossible to hear the clipping. I stopped dealing with MP3Gain once I knew there's no way to make a destroyed record to sound better.

MP3Gain and Clipping

Reply #18
whatever is lower than 89dB is probably NOT clipping, you shouldn't even touch these ones! unless they're part of an album in which other songs are much louder and you want to keep a consistency lowering the whole album at let's say -3.0dB.

greynol is right - it's difficult/impossible to hear the clipping. I stopped dealing with MP3Gain once I knew there's no way to make a destroyed record to sound better.



Bourne,

This is something I've been wondering about for years. I was originally turned on mp3gain right here at HA, because my reading at the time was that it normalizes volume (sets gain equal) w/o compression or data loss (I assume this is still correct?).  I'm fairly pleased with the results (works as promised), but what has always struck me as strange is that every time I encode a new batch of music, mp3gain claims that about 1/3rd of the tracks are already clipping (same problem as the OP).  I doubt that LAME is the culprit, so that would have to mean that the tracks are essentially clipping "from the factory," as it were.  Do you know:

-How that could be the case? Is this part of the ongoing bad mastering/loudness war debate?
-Are these "factory" clips audible? I've heard test samples that sound awful but I believe they were clipped on purpose.
-Is a clipping file analogous to a clipping (current underdrawn) amplifier?  And if so, how could the former possibly be repaired? After all, an underpowered amp clips because it cannot reproduce the waveform at the requested volume, but it doesn't "damage" the wave per se. We can always lower the gain and things will sound fine.  But if a file itself is "clipping" (the mechanics of which I don't entirely understand), wouldn't that mean that the wave has been permanently altered/damaged by that "flat-topping" effect (hard clipping), and if so, how could mp3gain possibly remedy that situation? Lost data is lost data.  About the only thing you could do (in theory) to help would be to apply some sort of "tube-like" modeling to the damaged portions, ala "soft clipping."

T
I don't want to believe. I want to know. -Carl Sagan

MP3Gain and Clipping

Reply #19
1) Yes, this is part of the loudness race. Today CD's are mastered to reach the full digital scale, in MP3Gain that would be volume 100.0. If you pick up a 80's or early 90's CD you will see that most songs don't clip because the CD's are well mastered, most songs stay in the range of 88-91dB.

2) They can be audible in the MP3 file and in the SOURCE/WAV file. "Californication" from Red Hot Chilli Peppers is an example of that. The record is completely destroyed, when you rip to MP3 you inherit that destruction. But there are loud CD's that are not so bad. I have middle 90's CDs that some songs are clipping but it is no more than 100 samples on the song. In this case, shouldn't be audible. (Even though MP3Gain will detect the faulty peaks). There are cases in which a bad encoder will introduce MORE clipping peaks into the encoded file.

3) As far as have been discussed in HA, no one can save a clippressed record. I've seen techniques to "guess" what wave peaks were, but they are nothing more than normalization. The only way out is the remasterization of every loud CD out there. But lowering the volume with MP3Gain or Wavegain process you just lower the volume - but the clipping will be there.

MP3Gain and Clipping

Reply #20
1) Yes, this is part of the loudness race. Today CD's are mastered to reach the full digital scale, in MP3Gain that would be volume 100.0.
There is no direct relation between RG numbers and peak levels.

2) They can be audible in the MP3 file and in the SOURCE/WAV file. "Californication" from Red Hot Chilli Peppers is an example of that. The record is completely destroyed, when you rip to MP3 you inherit that destruction. But there are loud CD's that are not so bad. I have middle 90's CDs that some songs are clipping but it is no more than 100 samples on the song. In this case, shouldn't be audible.
Compression is not the same things as clipping.  You talk about the loudness race as if it's about clipped samples.  It is not.

(Even though MP3Gain will detect the faulty peaks).
This is not an accurate statement.

There are cases in which a bad encoder will introduce MORE clipping peaks into the encoded file.
This is not an accurate statement either.

3) As far as have been discussed in HA, no one can save a clippressed record. I've seen techniques to "guess" what wave peaks were, but they are nothing more than normalization. The only way out is the remasterization of every loud CD out there. But lowering the volume with MP3Gain or Wavegain process you just lower the volume - but the clipping will be there.
You've completely missed the point about what causes clipping in mp3s.

The fact is that mp3gain can and will prevent samples from clipping as a result of the encoding process which is common with all mp3 codecs (good or bad).


http://www.hydrogenaudio.org/forums/index....st&p=428436