Help - Search - Members - Calendar
Full Version: How to convert WAV to MP3 with no clipping?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Bourne
-
buktore
You can try using Advance Limiter (it's a official DSP) when converting.
Bourne
how do i configure it...
i enable it in the conversion but it does not have any configuration?
mundschuss
nope, the mp3 codec doesnt allow +db (i think so, im not sure). he always normalize the file to 0db =)

hope, this is an answer to your problem
PoisonDan
QUOTE(Bourne @ May 29 2007, 05:37) *

how do i configure it...
i enable it in the conversion but it does not have any configuration?

It does not have any configuration. It's a lookahead limiter that is transparent until it clips. No configuration needed.

But it will not help you... read on...

My first thought would be to use this (use clipping prevention without applying the gain):

IPB Image

But this won't help you either.

Since you encode from WAV files, and do not alter the source volume, neither the replaygain processing nor the advanced limiter will detect any clipping. Therefor, they won't do anything.

The only way to detect if the MP3 encode has introduced clipping is after the conversion process. So if you want to prevent this, you still have the modify the MP3 files afterwards, either via MP3Gain or via foobar2000 (write gain to MP3 data - which is similar to using MP3Gain).


And I have no idea what mundschuss is talking about...
Bourne
poisondan, your anwser seems pretty accurate...
i'm stuck with lossless LOL
thanks.
odyssey
Did you guys actually HEAR clipping introduced by mp3 encoding, or are you basing this on the fact that mp3's often peak and mp3gain therefore reports it as clipping? I never did...
Bourne
QUOTE(odyssey @ May 29 2007, 14:08) *

Did you guys actually HEAR clipping introduced by mp3 encoding, or are you basing this on the fact that mp3's often peak and mp3gain therefore reports it as clipping? I never did...


You mean, the "Y" clip indication that is displayed in MP3Gain IS NOT real clipping?
You can't hear distortion from clipping peaks in MP3?

What about this article:
http://ff123.net/norm.html
2Bdecided
It's quite easy to have clipping which is measurably present, but inaudible to most (sometimes all) people.

Of course, it's safer to avoid clipping at all - but if the original is basically clipped (as in much modern pop music) a little additional clipping is going to be very hard to detect.

Some people are much more sensitive to it than others.

Cheers,
David.
Lyx
QUOTE(2Bdecided @ May 30 2007, 10:29) *

Of course, it's safer to avoid clipping at all - but if the original is basically clipped (as in much modern pop music) a little additional clipping is going to be very hard to detect.

Very good point. Off course preventing clipping is desirable, but if one listens to overcompressed music which has lots of clipping in the source already, and one accepts it, then will one really notice the short peaks introduced by lossy encoding? I see potential for an unusual ABX test here :-P
Bourne
I read somewhere that the source WAV technically has got no clipping, even though you might have a source with a lot of compression... that is, the decoder/player can see the peak's end in the WAV, whereas decoders cannot predict what is that beyond a certain peak in the MP3 decoding world... well something like that... anyone who knows more is invited to tell us
2Bdecided
By "already clipped" I mean that the tops of the waveform have been flattened at some point before it reached me. There are consecutive samples that are maxed out (at digital full scale), and clearly should have gone higher, but weren't allowed to. If there is just one sample at digital full scale, you can't be sure.

(A single digital full scale sample might be clipped, or might not - that's the ambiguity. If it's one single full scale sample on the whole CD, I'd bet it's been peak normalised properly, and there's no clipping since that value isn't a corruption of something that should be higher.)


If audio has been clipped, then...

In the CD you get at home, the clipped tops of the waveform could still be pushed hard against digital full scale. Multiple values of +32767 or -32768 will light the "clip" indicator on most things, and most people accept n[/n] consecutive full scale samples mean clipping. There is debate about the value of [i]n, but not much. It's 1-5.

The flat top of the clipped waveform could be reduced in amplitude so that the flat tops sit below digital full scale.

The flat top of the clipped waveform could have been subjected to further processing after the clipping, which means the flat tops are now skewed or not even flat at all.

Whichever - if the source has been clipped at some stage, then it's "already clipped".


Sometimes it might be invisible and inaudible, in which case no one is going to know. Usually there are audible and/or visual indications.

Cheers,
David.
odyssey
QUOTE(Bourne @ May 30 2007, 05:24) *

QUOTE(odyssey @ May 29 2007, 14:08) *

Did you guys actually HEAR clipping introduced by mp3 encoding, or are you basing this on the fact that mp3's often peak and mp3gain therefore reports it as clipping? I never did...


You mean, the "Y" clip indication that is displayed in MP3Gain IS NOT real clipping?
You can't hear distortion from clipping peaks in MP3?

What about this article:
http://ff123.net/norm.html

If you use foobar2000 when you ReplayGain mp3's, you'll notice that the peak value often exceed 1.0, whereas the source are always 1.0 or lower. When you play it back, you can limit foobar to apply gain without clipping.

My point is, no mp3's do not clip unless you use a stupid decoder. But still I'd like to see an ABX test on this because... Until recently I MP3Gained all my mp3's to 94dB, causing *all* of them to (theoretically) clip - But I've never noticed any clipping.
Bourne
QUOTE
If you use foobar2000 when you ReplayGain mp3's, you'll notice that the peak value often exceed 1.0, whereas the source are always 1.0 or lower. When you play it back, you can limit foobar to apply gain without clipping.


I just did a test here with Depeche Mode Playing the Angel... ultra-clippressed album.... the Album Peak from FLAC files are 0.999969... whereas the MP3-encoded generated from them, the Album Peak is 1.377642.

Is there any way to make the MP3's be adjusted to have the same albumpeak as the source files!?!
2Bdecided
I've just re-read your original question.

You can't have an mp3 encoding of a "clipressed" track, at the same volume as the original, playable on any player, without clipping. It's just impossible.

As you linked yourself, this page is good (even if you only read the first part)
http://ff123.net/norm.html

You either
a) accept the clipping
b) reduce the volume (e.g. ReplayGain, pre-amp, maxnoclipgain when clipped, or similar)
c) use lossless

To some extent, better quality mp3 encoding will introduce less additional clipping, but it's not straight forward, and even 320kbps often isn't enough to prevent additional on highly clipressed tracks.

So, pick your compromise - you can't have it all!

Cheers,
David.
odyssey
The clipping is due to dithering and psychoacoustic models. A lossy representation will never be equal to the source, and thus if you reduce the volume to match the peak of the clipressed source, the volume will be a lot lower. Obviously mp3 make up a little for the insane Hard Limiting of music (although it makes no miracles) smile.gif

Still I'd like someone to perform an ABX test if they find this reduction nessesary.
Bourne
QUOTE
Still I'd like someone to perform an ABX test if they find this reduction nessesary.


You mean, if "Y" files in MP3Gain need to be corrected ?

That ABX is also desirable...
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.