Importing loud MP3 files causes clipping

When I import loud mp3 files into Audacity, they glitch out and loud “pop” clipping sounds appear. If I convert the mp3 file to another extension such as wav or flac (by another program) and import it into Audacity, the problem disappears. Exporting the corrupt mp3 file with clipping as any extension preserves the clipping.

Why does this happen and how can I fix it? How do I make importing loud mp3 files into Audacity not cause glitchy clipping?

Video demonstration: Audacity mp3 clipping glitch.mp4 - Google Drive

Somebody did “something bad” to that file! :frowning:

Those loud pops/glitches that are “exposed” when you reduce the volume are NOT simple clipping. It’s something worse.

If this a song you can find somewhere else, I’d try to find a better copy.

Several things -

Normally, digital audio is hard-limited to 0dB. 0dBFS (digital) is represented as the highest you can “count to” with a given number of bits. (Everything is automatically scaled to match your DAC during playback so a 24-bit file isn’t louder than an 8-bit file.) If you try to go higher you get clipping.

ADCs (recording), DACs (playback), regular (integer) WAV files and CDs are all limited to 0dB.

MP3s and floating-point WAV files can go over 0dB without clipping.
Audacity uses floating-point internally so Audacity itself won’t clip. But, if the audio goes over 0dB and you play it at “full digital volume” you’ll clip (distort) your DAC.

As you may know, MP3 is lossy compression. The wave shape changes and some peaks will be higher (typically about 1dB) and some lower. If you make an MP3 from a CD it will often peak over 0dB. Audacity will “show red” and although the audio isn’t really clipped, your DAC will clip if you play it a full digital volume.

As far as I know, this slight clipping caused by MP3 compression is not audible. If you hear a compression artifact it’s probably something else.

Audacity shows potential clipping. It’s not looking at the wave shape. You can have audio that goes over 0dB and Audacity will “show red” even if it’s not clipped (yet). In this case, running the Amplify effect (and accepting the default to attenuate instead of amplify) will bring the volume down to a “safe” level and everything will be fine (but not as “loud”).

…In your case, lowering the volume means those loud defects are no-longer clipped at 0dB (by the DAC) so lowering the volume makes them (relatively) worse!

Or, if the wave is really clipped, lowering the volume will bring down the volume and Audacity won’t show red but the wave is still clipped/distorted.

Since those formats are limited to 0dB, it will limit (clip) the super-loud peaks/defects and it MAY sound better. The Limiter effect (set to 0dB) should give similar results.

Or you can open the WAV or FLAC and export again as MP3 and those loud pops should remain (mostly) suppressed.

+++++++++
NOTE - As you may know, MP3 is lossy compression (data is thrown-away to make a smaller file). When you open an MP3 with Audacity (or any normal audio editor) it gets decompressed. If you re-export as MP3 you are going through another generation of lossy compression and some “damage” accumulates.

Ideally, if you want MP3 you should compress ONCE as the last step. Sometimes you don’t have a choice and you may not hear any loss of quality, and in your case you can actually make it better.

This topic was automatically closed after 30 days. New replies are no longer allowed.