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: [TOS #8] Clipping in mp3s encoded by WinLAME frontend (Read 3722 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

I have a Billy Idol FLAC album and I tried encoding it in WinLAME (uses LAME 3.98) and at several tracks, it adds clipping, both on 320 kbps CBR and V2 VBR, both encoded with high quality settings. Audacity clearly shows no clipping on the FLAC tracks and several clipping peaks on the mp3s. Now please don't just tell me "you're not going to hear it anyways", I have nothing against lossy compression but clipping is something I want to definitely avoid. I am an 19 year old guy with quite good hearing, so things like clipping annoy me. Thanks in advance for any good tips.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #1
The lossy encoding process can cause an increase in amplitude.  If the original FLAC was close to the limit (more and more common these days), it very likely will now have some samples that are over peak.  You can prevent this by "de-gaining" the original a bit before converting.  You have Audacity so use its "Amplify" tool to bring the FLAC down by 6dB and give that a try.  If you're using ReplayGain, the playback level will remain the same regardless; otherwise, be sure to attenuate each file on the album by the same amount before MP3 encoding.

This topic has come up before.  If you search the forum you'll probably find other ways to the same end.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #2
I am an 19 year old guy with quite good hearing, so things like clipping annoy me.

With all due respect, you don't get to imply that you can hear this phenomenon without also providing proof in accordance with TOS #8.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #3
I am an 19 year old guy with quite good hearing, so things like clipping annoy me.

With all due respect, you don't get to imply that you can hear this phenomenon without also providing proof in accordance with TOS #8.


Listen to any modern, overcompressed CD and you'll see. Do I also have to ABX to justify my preference of butter over margarine? If I had bad hearing, should I have been forced to listen to 32 kbps mp3s because "You won't hear the difference I swear!". This stinks of "I can't believe its not butter!" style of advertising talk and is just as silly as the opposite end - placebophiles who think WAV files have "more soul" than FLACs or that buying 40000 dollar cables somehow make a difference.

But yes, I will provide ABX data soon, even if I think this stinks of 1984 style "YOU CANT HAVE AN OPINION" methods.

It does not even matter if I can hear the difference, because I am encoding something that will be listened to all people in my family. I want good quality by principle.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #4
You can hold any belief you like, you just don't get to present them freely on this forum.  You agreed to follow the rules when you registered and your participation here is voluntary.

FWIW, I am not opposed to the principle of avoiding clipping whenever practical and am not arguing that this situation isn't practical. If you had kept the implication about what you think you can hear to yourself, I would have left this alone.

Also, let's be clear, we are talking about whether clipping resulting from the decoding of lossy compression to fixed-point PCM is audible. We are not talking about the audibility of clipping on source material.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #5
You either support your claims, or don't make them. That's not 1984, there's no stink, it's just objectivity.

Quote
Do I also have to ABX to justify my preference of butter over margarine?


If there's a strong body of evidence that people cannot distinguish the two, then yes, of course.
In the case of butter, I don't think there's such a body so you don't have to ABX your butter.

But you would do well to ABX your mp3s from the lossless copies (even if just to satisfy your curiosity), and you are required to do so if you are here on these forums and make any claims to an audible difference.

Now, in order to avoid the clipping, follow Apesbrain's advice.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #6
The problem with ABX-ing lossy to lossless is that a successful result does not isolate clipping on decoding as the cause.  Instead you ABX the lossy file with the gain reduced prior to delivery to fixed-point PCM against the same file with the gain reduced by the same amount, but this time after delivery to fixed-point PCM.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #7
Sorry for being abrasive, but I won't put margarine on my bread even if it tasted the same because it is an entirely different thing. Sorry to be a bit agressive again, but would you eat chocolate flavoured rat crap if some company found a process to match the taste 100 percent to real chocolate? I guess not.

As I promised, I am posting my ABX results here. I think I distinguished the 2 files quite well considering I played them on small computer speakers and recently recovered from a severe ear infection. Here it is:

Quote
foo_abx 1.3.4 report
foobar2000 v1.1.16
2012/12/20 16:23:16

File A: D:\Greatest Hits\01 Idol, Billy - Dancing With Myself.flac
File B: C:\Documents and Settings\Administrator.MISO-33497FE14F.000\My Documents\Billy Idol\01 Idol, Billy - Dancing With Myself.mp3

16:23:16 : Test started.
16:23:59 : 01/01  50.0%
16:24:49 : 02/02  25.0%
16:25:35 : 03/03  12.5%
16:25:43 : 04/04  6.3%
16:26:23 : 05/05  3.1%
16:27:01 : 06/06  1.6%
16:27:21 : 06/07  6.3%
16:29:00 : 07/08  3.5%
16:29:30 : 07/09  9.0%
16:30:13 : 07/10  17.2%
16:30:51 : 07/11  27.4%
16:31:33 : 08/12  19.4%
16:31:44 : 09/13  13.3%
16:32:55 : 09/14  21.2%
16:33:09 : 09/15  30.4%
16:34:00 : 10/16  22.7%
16:34:09 : 10/17  31.5%
16:34:58 : 11/18  24.0%
16:35:20 : 12/19  18.0%
16:36:19 : 12/20  25.2%
16:36:55 : 13/21  19.2%
16:37:01 : Test finished.

----------
Total: 13/21 (19.2%)


Here are the LAME tags pulled from it by Audio Identifier:

Quote
C:\Documents and Settings\Administrator.MISO-33497FE14F.000\My Documents\Billy Idol\01 Idol, Billy - Dancing With Myself.mp3
------------------------------------------------------------
Tag revision:        0
Version string:      3.98r
Quality:            80 (V2 and q0)
Encoding method:    vbr new / vbr mtrh
Lowpass:            18 500Hz
RG track peak:      <not stored>
RG track gain:      -7.7dB (determined automatically)
RG album gain:      <not stored>
nspsytune:          yes
nssafejoint:        yes
nogap continued:    no
nogap continuation:  no
ATH type:            4
Bitrate:            minimal (-b) bitrate 32
Encoder delay:      576 samples
Padded at end:      2 304 samples
Noise shaping:      1
Stereo mode:        joint
Unwise settings:    no
Source sample freq:  44.1kHz
MP3Gain change:      <none>
Preset:              V2: preset standard (fast mode)
Surround info:      none
Music length:        7 705 112 bytes
Music CRC:          99A0
Actual Music CRC:    99A0
Info tag CRC:        BF45
Actual Info Tag CRC: BF45


(Yes this was encoded by standard settings as opposed to the high quality mode I encoded it the first time, but clipping is present here as well).

The ABXed song was Billy Idol - Dancing with Myself.

EDIT - To clarify, I am not calling mp3s or LAME rat crap, I am calling clipped files that. I am not too sensitive to mp3 artefacts, but I simply absolutely hate clipping. And I can see the original FLAC audio had no clipping (through it was recorded very loud), but lossy compression is driving it over the edge and creating clipping. I know this wouldn't have happened with a quieter file, I just want to find a better way than manually degaining every file one by one (besides I am not sure how much should I degain it anyways).

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #8
The lossy encoding process can cause an increase in amplitude.  If the original FLAC was close to the limit (more and more common these days), it very likely will now have some samples that are over peak.  You can prevent this by "de-gaining" the original a bit before converting.  You have Audacity so use its "Amplify" tool to bring the FLAC down by 6dB and give that a try.  If you're using ReplayGain, the playback level will remain the same regardless; otherwise, be sure to attenuate each file on the album by the same amount before MP3 encoding.

This topic has come up before.  If you search the forum you'll probably find other ways to the same end.


Thanks for an useful reply. How do I save properly in Audacity through, what settings of dither and sample rate conversion should I set? I ask because I've read posts in this forum saying saving in Audacity makes an entirely bit-different file if you dither, but I don't know if I should dither when de-gaining or not.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #9
Quote
I think I distinguished the 2 files quite well considering I played them on small computer speakers and recently recovered from a severe ear infection.


Thanks for the ABX! Unfortunately, the numbers for these files show the opposite. You might want to wait until you've truly fully recovered from the infection and have decent equipment to test on. If you consistently get numbers around 5% or lower, then you'll very likely hear a difference. Anything else is noise.

Try a control experiment with two entirely different songs, and see what the results look like for a known difference. This is like first getting to know what your food tastes like without any spices, before trying to find out the ideal spice/herb mixture.

Quote
but I won't put margarine on my bread even if it tasted the same because it is an entirely different thing.

If margarine is cheaper and I can't tell the difference for ye average lunch, then obviously yes I would use margarine instead of butter. It's only when differences become apparent (such as when baking a nice tender piece of meat) that I will choose one over the other.

Quote
would you eat chocolate flavoured rat crap if some company found a process to match the taste 100 percent to real chocolate?

Poorly fitting metaphors are like opening an oiled umbrella before the coyote makes off with the bricks. They don't help anyone and only serve to confuse. Stick with the actual situation, which is clipping in music.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #10
Total: 13/21 (19.2%)

You do understand that this suggests you failed the test, right?  Guessing correctly on 13 out of 21 coin flips is hardly unreasonable.

Furthermore (and once again!), a passed test comparing lossy to lossless does not prove your hypothesis, namely that clipping while decoding lossy to fixed-point PCM is audible.  There are people who can routinely differentiate mp3 at even the highest settings from lossless and you might be one of them (despite your poor showing above ), but detecting the difference will be due to artifacts like temporal smearing rather than clipping during decoding, I assure you.

[TOS #8] Clipping in mp3s encoded by WinLAME frontend

Reply #11
but I simply absolutely hate clipping. And I can see the original FLAC audio had no clipping
Seeing is not hearing. But seeing acts as a placebo support for hearing something which is not really there (or which you can't hear without seeing it first).