The No.1 Website for Pro Audio
 Search This Thread  Search This Forum  Search Reviews  Search Gear Database  Search Gear for sale  Search Gearslutz Go Advanced
Mp3 conversion causes clipping? Metering & Analysis Plugins
Old 27th October 2011
  #1
Gear Head
 

Thread Starter
Mp3 conversion causes clipping?

Is this generally true? I've got a hot rock/hip-hop song that peaks out at -0.05 as a wav file, but goes over 0 frequently as a 320kbps mp3. Is it generally expected that mp3s run hotter than wavs?

Also, is there a noticeable difference in mp3 converters? I use audacity (only for mp3 conversion) cause I've found it to be rather convenient, but I'd love to hear if there's a better choice for mp3 conversion out there.
Old 27th October 2011
  #2
Gear nut
 

Search for the word "inter-sampling peaks" on this forum.
Old 27th October 2011
  #3
Lives for gear
 
huejahfink's Avatar
 

Verified Member
Not an technical expert on this matter, but these are my findings from making mp3s over the years.

It's not true that mp3 conversion causes clipping per-se.....
I think it just happens to be the nature of the process that the sum of the audio when decoded can have a greater (or lower) peak value than what goes in at any given moment on the audio file. The process is an approximation of the original and therefore there will be some deviation.
You can certainly still input a file that has no intersample peaks either that will unfold to an mp3 that exceeds 0dBFS. Having said that, guarding against ISPs will certainly help.

AFAIK there are no hard and fast rules about what maximum level can be input to ensure the resultant mp3 will not clip when decoded. I think it is dependent very much on the choice of the algorithm and the nature of the audio. However, I've found that peaks naturally approaching the ceiling are less likely to go over on conversion than material that has been hard-clipped and then dropped in level slightly for instance. I guess this is where something like the Sonnox Pro-Codec plugin will be very useful.

I'm not sure what codec is used in Audacity... but I've generally found LAME to be a stable performer at its best quality settings.
Old 27th October 2011
  #4
Lives for gear
 
sat159p1's Avatar
AFAIK Audacity uses external codecs.. (Lame framework?)
Old 27th October 2011
  #5
Lives for gear
 
Alexey Lukin's Avatar
 

Verified Member
Quote:
Originally Posted by big crouton View Post
Is this generally true?
Yes. If your waveform frequently hits 0 dB (or close to that), the distortion (a.k.a. quantization noise) introduced by mp3 will make it randomly go up and down, which may easily clip it during decoding/playback. It is not the same as intersample clipping; it is rather more related to increase of peak levels during EQ'ing the file.
Old 28th October 2011
  #6
Lives for gear
 
Chris Bauer's Avatar
You may want to limit your tracks at around -0.5dB, which makes clipping less likely.
Old 28th October 2011
  #7
restpause
Guest
I was reading a technical article last year about MP3 encoding and codecs and some specialists have actually confirmed that the MP3 encoding itself can cause clipping at times!!! Unfortunately I can't find the article to share with you guys, but it was interesting. It also noted that some bass filtering alorgithms in the MP3 codecs can cause distortion as well. But on the other hand these issues were rather old so I don't know if recent codec updates have fixed this. Probably LAME codec usage is safer since it's been successfully improving upon the codec for years.

I really wish MP3 was obsolete though. I like lossless formats better.
Old 28th October 2011
  #8
Gear nut
 

Quote:
Originally Posted by Alexey Lukin View Post
Yes. If your waveform frequently hits 0 dB (or close to that), the distortion (a.k.a. quantization noise) introduced by mp3 will make it randomly go up and down, which may easily clip it during decoding/playback. It is not the same as intersample clipping; it is rather more related to increase of peak levels during EQ'ing the file.
I recognize your name from reading on our site Alexey, can you please tell me what's the difference between inter-sample peaks and inter-sample clipping? What I understood was that IS peaks is the result of A/D conversion which means you should try to shoot for levels at about -0.5dB and -0.3dB. I asked a few friends around and they agreed. But, then I read this on another site:
Optimizing Audio for The Internet (MP3/AAC/iTunes) | Modern Sound Mastering

Quote:
Even if your peaks reach no more than -0.1 or -0.3 dbFS (as is common practice), the resulting compressed file may still clip! How is that possible? It’s due to a phenomenon known as “inter-sample peaks.”
So, what is the definition of inter-sampling peaks? Is it the result of AD conversion or is the result of mp3 conversion [meaning all that filtering stuff that goes on with every encoder]?

I thank you Alexey.
Old 28th October 2011
  #9
Gear Nut
 
12th & Vine's Avatar
 

An oft overlooked resource that ... amongst other things ... can assist one subsequently discerning the likelihood of correctness or otherwise of stuff on the internet:

Principles Of Digital Audio by Ken C Pohlmann

It's an unexpectedly entertaining read.

Best regards,

Paul Blakey
12th & Vine Post
Old 28th October 2011
  #10
Lives for gear
 
acmusic's Avatar
 

there are some good meters out there that will show "ISP".
Audio Pluggers' K-Meter (not free but one of the only free standing 'perceived loudness' meters around)
SPL's X-ism (free)
Brainworx's TT Meter (used to be free but hard to find)
Old 28th October 2011
  #11
Lives for gear
 
Alexey Lukin's Avatar
 

Verified Member
Quote:
Originally Posted by MMOL View Post
can you please tell me what's the difference between inter-sample peaks and inter-sample clipping?
These terms are a subject of some debate on this forum, but my definitions are following: intersample peaks are peaks of the reconstructed (interpolated) signal that exceed the amplitude of digital samples of the signal. Intersample clipping is when intersample peaks cannot be handled by your hardware (like D/A) or software (like SRC) and get clipped.


Quote:
Originally Posted by MMOL View Post
So, what is the definition of inter-sampling peaks? Is it the result of AD conversion or is the result of mp3 conversion
Intersample peaks have very little relation to mp3 encoding. Clipping after mp3 encoding/decoding happens for a different reason: because of filtering and quantization noise of mp3 being added to your waveform. So, mp3 changes and clips digital sample levels (and possibly creates some intersample clipping too).
Old 28th October 2011
  #12
Gear nut
 

Quote:
Originally Posted by Alexey Lukin View Post
These terms are a subject of some debate on this forum, but my definitions are following: intersample peaks are peaks of the reconstructed (interpolated) signal that exceed the amplitude of digital samples of the signal. Intersample clipping is when intersample peaks cannot be handled by your hardware (like D/A) or software (like SRC) and get clipped.



Intersample peaks have very little relation to mp3 encoding. Clipping after mp3 encoding/decoding happens for a different reason: because of filtering and quantization noise of mp3 being added to your waveform. So, mp3 changes and clips digital sample levels (and possibly creates some intersample clipping too).
Thanks for clearing all that, Alexey.

Quote:
These terms are a subject of some debate on this forum, but my definitions...
Sure< And we wouldn't want to arouse the lynch mob on this forum.

I thank you again.
Old 28th October 2011
  #13
Quote:
Originally Posted by MMOL View Post
Search for the word "inter-sampling peaks" on this forum.
Nope. It's usually caused by quantization errors or the Gibbs phenomenon from the limited bandwidth.
Old 28th October 2011
  #14
Gear Guru
 
DanDan's Avatar
-2!

A friend and I collaborated on Mastering a Download Only release recently.
I prepared the tracks, he assembled and MP3'd. He used the Sonnox Codec which shows these 'overs' caused by the coding.
He found track levels increased by up to 1.7 or 1.8 dB from coding.
As it happens I had supplied them at a guesstimate of -2dBFS.
DD
Old 28th October 2011
  #15
Motown legend
 
Bob Olhsson's Avatar
 

Verified Member
The first thing any encoder does is pass the audio through a 1/3 octave filter bank which will almost always increase the level. Different encoders accommodate this increase in different ways.
Old 28th October 2011
  #16
Lives for gear
 
Alexey Lukin's Avatar
 

Verified Member
The filter bank by itself does not change the signal, or the change is quite minimal and cannot be responsible for clipping. What changes the signal is the quantization of subband signals. If your bitrate is maximal, the decoded signal matches the original signal very closely — the peaks rarely change by more than 0.1 dB and the waveform difference is around -30 dB.
Old 29th October 2011
  #17
Gear nut
 

It's not just MP3 either. Any lossy format is subject to it. However, the amount is pretty small, like over 1.0 (max) 0.2 or less.
Old 29th October 2011
  #18
Lives for gear
 
Alexey Lukin's Avatar
 

Verified Member
This only true for highest bitrates. At the most common 128 kbps bitrate overshoots as high as +1.5 dB are not uncommon, and you can certainly expect many overshoots over +0.5 dB on your average rock song.
Old 29th October 2011
  #19
Deleted User #43636
Guest
Quote:
Originally Posted by Peaks View Post
It's not just MP3 either. Any lossy format is subject to it. However, the amount is pretty small, like over 1.0 (max) 0.2 or less.
Not all lossy formats are equal : vorbis ogg raises the peak level a lot less than mp3. Doing a test with the same file at a similar bitrate, ogg was 0.3 dB higher than the original .wav when mp3 was 1.2 dB...
Old 29th October 2011
  #20
Lives for gear
 
Alexey Lukin's Avatar
 

Verified Member
Sounds too good to be true in general. I'd expect ogg to be 1.2 times better than mp3, not 4 times.

Yeah, on my song OGG overshoots by +2.1 dB, while mp3 only by +1.6 dB (both at 128 kbps). This is largely a matter of chance.
Old 30th October 2011
  #21
Gear nut
 

Quote:
Originally Posted by Alexey Lukin View Post
This only true for highest bitrates. At the most common 128 kbps bitrate overshoots as high as +1.5 dB are not uncommon, and you can certainly expect many overshoots over +0.5 dB on your average rock song.
128kbps is not part of my vocabulary.
Old 30th October 2011
  #22
Gear Guru
 
DanDan's Avatar
Lofi

Quote:
128kbps is not part of my vocabulary
Yes, with Broadband and cheap memory, lets lose that.
The Sonnox reveals all. Lets try to grab back some Hi Fi.
DD
Old 30th October 2011
  #23
j_j
Lives for gear
 

Verified Member
It's really very simple.

MP3 codecs are lossy. They remove information, and add noise. By definition, this changes the waveform. A waveform that is engineered to be within || of max/min before coding will probably exceed coding by some substantial amount.

Also, if you're that close in level measurement, you really are very likely to have intersample overs, too.
Post Reply

Welcome to the Gearslutz Pro Audio Community!

Registration benefits include:
  • The ability to reply to and create new discussions
  • Access to members-only giveaways & competitions
  • Interact with VIP industry experts in our guest Q&As
  • Access to members-only sub forum discussions
  • Access to members-only Chat Room
  • Get INSTANT ACCESS to the world's best private pro audio Classifieds for only USD $20/year
  • Promote your eBay auctions and Reverb.com listings for free
  • Remove this message!
You need an account to post a reply. Create a username and password below and an account will be created and your post entered.


 
 
Slide to join now Processing…
Thread Tools
Search this Thread
Search this Thread:

Advanced Search
Forum Jump
Forum Jump