IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
A question from Italy
pecosbill76
post Dec 4 2004, 00:07
Post #1





Group: Members
Posts: 45
Joined: 19-November 01
From: Italy
Member No.: 498



Ciao from Italy.

My english is not so good. I hope You'll understand what i mean !!

I know that when i encode from wave to MP3, the maximum level of any sample can exceed the value 2exp16 (32768).

To avoid this i should low the volume of the master wave.

The question is this.

Is this audible ?

Is this always audible or is it audible only when i re-convert from mp3 to wave ?

If i play my over-32768 mp3 on my car mp3compatible cdplayer, can the hardware decoder go over the 32768 level ?
For example, can the hardware decoder play a sample placed at level 32800 ?

I hope you can understand my question.

Thank you !
Go to the top of the page
+Quote Post
indybrett
post Dec 4 2004, 00:11
Post #2





Group: Members (Donating)
Posts: 1350
Joined: 4-March 02
From: Indianapolis, IN
Member No.: 1440



You probably want to use MP3gain. It will prevent your mp3's from clipping when decoded.

This post has been edited by indybrett: Dec 4 2004, 00:11


--------------------
flac>fb2k>kernel streaming>audiophile 2496>magni>dt990 pro
Go to the top of the page
+Quote Post
pecosbill76
post Dec 4 2004, 00:16
Post #3





Group: Members
Posts: 45
Joined: 19-November 01
From: Italy
Member No.: 498



QUOTE (indybrett @ Dec 3 2004, 11:11 PM)
You probably want to use MP3gain. It will prevent your mp3's from clipping when decoded.
*


Thaks !

But...i want to know if the clipping is caused by the encoder or by the decoder.

The over-32768 data is lost when the decoder meet a 32768level or is the decodere that "can't understand" a over-32768 value ?

Thanks
Go to the top of the page
+Quote Post
indybrett
post Dec 4 2004, 00:44
Post #4





Group: Members (Donating)
Posts: 1350
Joined: 4-March 02
From: Indianapolis, IN
Member No.: 1440



I am pretty sure it is the decoder.


--------------------
flac>fb2k>kernel streaming>audiophile 2496>magni>dt990 pro
Go to the top of the page
+Quote Post
kwanbis
post Dec 4 2004, 02:51
Post #5





Group: Developer (Donating)
Posts: 2362
Joined: 28-June 02
From: Argentina
Member No.: 2425



afaik, the clipping is caused because of the limits on the way the music is defined


--------------------
MAREO: http://www.webearce.com.ar
Go to the top of the page
+Quote Post
oudalrich
post Dec 4 2004, 10:24
Post #6





Group: Members
Posts: 64
Joined: 14-October 03
Member No.: 9299



Have a look at this perfect little post (I think this should be put in the FAQ somewhere) for a very concise description of how MP3 works.
When the data is converted back to the temporal domain (decoded), the result is an approximation of the original PCM values (ranging from -32768 to 32767 in the case of 16 bits precision). But since it is only an approximation, some sample values may exceed the scale: a sample that should decode to 32800 will be represented as 32767 (a deviation of this magnitude will not be audible, though). One way to avoid this is to allow for some headroom while decoding. The MAD software decoder does this, AFAIK, but I have never heard of hardware decoders with this capability. Foobar2000 takes another approach: it decodes to a 32 bit floating point format where the scale has no (practical) limitation. The "normal" scale goes from -1 to 1, but samples can exceed the scale without a problem. Clipping will occur only at the end of the processing pipeline, when the data is converted to the fixed-point format the soundcard requires (like the usual 16 bits) - unless you've been clever enough to use something like foobar's soft clipping or advanced limiter DSPs. They will scale parts of the signal in a sensible way so that it stays within the limits of the scale and doesn't clip.
Another possibility to avoid clipping MP3s is to use MP3gain, as indybrett has already pointed out. MP3gain decodes your MP3s and if it detects clipping, it can (losslessly) reduce the volume of the file to the point where no clipping occurs.
Now for audibility: I think the clipping introduced by an MP3 decoder should not be audible for most people (and certainly not when driving a car!). As has been pointed out many times before, many of the (pop/rock) CDs you can buy today have been clipped to death anyway due to bad mastering/production. The clipping may get worse (and audible), however, if the decoded signal is run through a DSP (like an equalizer).
If you want to know what clipping sounds like, get foobar2000 with the VU meter visualization component: whenever the top bar (labeled "Peak") turns red, foobar has detected clipping. You can cause more clipping by dragging the preamp sliders in Preferences/Playback to the right (note that for the changes to become effective playback has to be restarted).
Go to the top of the page
+Quote Post
k.eight.a
post Dec 4 2004, 12:33
Post #7





Group: Members
Posts: 434
Joined: 31-October 03
From: Europe, CZ
Member No.: 9571



Some useful links for you pecosbill76:

Wavegain vs. MP3Gain
Clipping!
mp3gain


--------------------
Sorry for my poor English, I'm trying to get better... ;)
"The greatest trick the Devil ever pulled, was convincing the world he didn't exist."
Go to the top of the page
+Quote Post
NeoRenegade
post Dec 22 2004, 09:23
Post #8





Group: Members
Posts: 723
Joined: 29-November 01
Member No.: 563



Long story short, it's indeed the *decoder* that causes clipping.

When you encode sound to MP3, the process will cause some peaks to be higher than they were before, which means that some may surpass 2^15. This is no problem for MP3 because MP3 isn't limited by the 16-bit scale like WAV's are.
But when you listen to an MP3, it is decoded to WAV which is piped through your soundcard, and the WAV will clip if there are peaks that surpass 2^15.
The solution is to use MP3Gain to lower the volume of the MP3 so that there are no longer any peaks above 2^15.

[Edit]Thanks, Precisionist[/Edit]

This post has been edited by NeoRenegade: Dec 28 2004, 16:10
Go to the top of the page
+Quote Post
precisionist
post Dec 23 2004, 17:09
Post #9





Group: Members
Posts: 739
Joined: 16-January 04
From: Germany
Member No.: 11279



Some wrong math in this thread... wink.gif
2*e^16=2*exp(16) = ~1,777*10^7
Please write 32 768 = 2^15


--------------------
I know that I know nothing. But how can I then know that ?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th September 2014 - 22:31