Distortion due to excessive recording level when opening pre-recorded files in mp3/mp4 format

When I open an .mp3 audio or .mp4 video recorded by a different app, Audacity 3.4 will often (but not on some files) show a clipped waveform, with almost the entire song reaching the top of the display lanes.

The audio sounds distorted, much more so than if I play the prerecorded file directly., suggesting that Audacity is producing the distortion when translating the .mp3 codec into Audacity-format.

An example: record a music video using Xbox game-bar, then import the .mp4 video into Audacity. It now fills the entire display tracks and sounds like a small radio turned up too loud.

Is there any way to prevent this? I cannot “adjust the recording volume level” - the music is being translated by FFmpeg or whatever, before it reaches the screen and the volume sliders. The problem occurs whether I set to MME or WindowsDirectSound or WASAPI, and was present in previous versions of Audacity.

Suggestions for further experiment are welcome! carrt7

Decoding/decompressing shouldn’t cause distortion.

But if it goes over 0dB you can clip your DAC if you play it at “full digital volume”.

MP3 and MP4 can go over 0dB without clipping and Audacity shows potential clipping and it’s probably not really clipped.

Try running the Amplify effect and it should default to a negative value. Accept the default, run the effect, and check if that brings the levels down to something more reasonable.

Thanks, DVDdoug. I tried your suggestion. When I use amplify to reduce the amplitude, the waveform shrinks but remains with uniform peak height, unlike a normal trace. And the music is quieter but still just as distorted.

I think .mp3 and Audacity .aup are BOTH digital, right? So why is it distorting?

Do they still sound distorted?

I don’t know why they are clipped, or severely limited. But most digital files will distort if you try to go over 0dB. MP3 and MP4 are lossy compression so they can have “distortions” but the compression doesn’t cause clipping.

All of the other decoders/converters I know of can’t convert to floating-point WAV so the clipping is likely to be worse…

Maybe the problem is the “different app”.

Yes, both sound equally distorted. The second one is just quieter.

It might indeed be the “other app”, which laid down the digital recording. Interesting! Let’s take Xbox GameBar as example, because it’s built into Windows, so in common use (although not for music).

GameBar can replay its mp4 fine, so clearly there’s no distortion in the original mp4 video recording. Therefore either

  • GameBar mp4s have some curious design that tricks Audacity into opening it at an excessive volume level, causing clipping, OR
  • Audacity’s converter has a defect when opening mp4 files.

Has anyone noticed this? carrt7

You can try converting the file with Kabuu Audio Converter.

Or can you play the file “cleanly” without getting unwanted game sounds, etc.?

If so, you can use WASAPI loopback to record whatever is playing on your computer.

It seems like you’re encountering issues with distorted audio and a clipped waveform when importing .mp3 or .mp4 files into Audacity. Here are a few suggestions to address the problem:

  1. Check Audacity Settings:
  • Ensure that your Audacity settings are configured correctly. Verify the sample rate and other audio project settings to match the source file.
  1. Update Audacity:
  • Make sure you are using the latest version of Audacity. Updates may include bug fixes that could resolve the distortion issue.
  1. Adjust FFmpeg Import Settings:
  • When importing files, Audacity uses FFmpeg. Check if there are specific settings related to FFmpeg import in Audacity preferences. Experiment with different import settings.
  1. Check Original File:
  • Confirm that the original .mp3 or .mp4 file plays correctly in other media players. If not, the issue might be with the recording settings of the Xbox game-bar.
  1. Convert File Before Import:
  • Use a separate tool to convert the .mp4 video to a different audio format (e.g., WAV) before importing it into Audacity. See if the issue persists with the converted file.
  1. Experiment with Different Codecs:
  • In Audacity, try experimenting with different audio codecs during export to see if there’s an improvement. Adjusting the quality settings might also help.

Remember to back up your projects before making significant changes, and feel free to explore these suggestions to find a solution to the distortion issue you’re facing.

Thanks for good suggestions, guys.
DVDdoug, that’s an excellent idea: I can try converting the GameBar mp4 to .WAV with a separate converter, and see if the distortion disappears. If it does. there is a fault in Audacity.

(Sure, I can record directly into Audacity with WASAPI. But if there is a fault in Audacity, let’s track it down.)

Ashley, thanks for so many ideas. In turn:
#1 - I don’t know how to do this
#2 - done, problem still occures.
#3 - FFmpeg has a module with custom export options. I can’t find any adjustments for importing into Audacity.
#4 - will do.
#5 - this is DVDdoug’s suggestion - will certainly try.
#6 - I have no problems with Audacity exporting.

Once again, thanks for all the good ideas.

1 Like

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