Audacity's "default" mp3 decoder produces noise

I noticed something interesting: when I use audacity built from git (using the instructions from the INSTALL file), there’s some extra noise when reading mp3 files. On the other hand, when I use audacity built on the same machine but with the audacity-freeworld patches (that make audacity link against various audio libraries), there’s no noise. Both versions are built from the Audacity-2.2.2 git tag.

I’m attaching four files: the original mp3, decodings done with both versions of Audacity, and the (amplified) difference between them.

I’m also attaching the difference between the libraries that the two versions of audacity are linked against (“+” are present only in the “good” version", “-” are present only in the “bad” version).

My hypothesis is that in the two cases audacity uses different mp3 decoders, and the default/fallback one is buggy. Unfortunately, I don’t know how to figure out which decoder audacity uses in each case.

Is this a known issue?



Attaching the libraries diff.
audacity-ldd-diff.txt (2.67 KB)

By default, Audacity uses libmad to decode MP3s. It is also possible to use FFmpeg or avconv if Audacity has been built appropriately, and a compatible version of FFmpeg / avconv is installed. To tell Audacity to use FFmpeg (or avconv) to import a file, select “FFmpeg-compatible files” as the file type filter in the audio import dialog.

It is “normal” for different decoders to produce slightly different results, though I’m not able to reproduce the kind of noise that you demonstrate in “diff.wav”. From my own tests, Audacity with libmad is on par with lame 3.99.5 command line encoder, and slightly better than FFmpeg (subjective test - not ABX)

What are you comparing with what? I don’t see how you are deciding which version is “good” and which is “bad”.

Thanks for the reply, steve.

The noise in bad.wav is very audible if you listen to it in headphones and turn the volume up a bit.

Are you testing it with my test.mp3? Shouldn’t the results produced by the same version of libmad on different machines be identical? Could you post the decoded audio that you get with libmad?

When I listen to the imported test.mp3 file, I can hear a very slight hiss, but not that awful noise that you demonstrate in diff.wav.


Yes.

Yes.


Here it is in 32-bit WAV format:

As I said above, diff.wav is amplified just to demonstrate how the noise sounds — but if you listen to bad.wav (or manually diff it with good.wav), you can hear the way it sounds originally. I think you’ll be able to hear it in bad.wav easily.

Your decoding indeed doesn’t have that kind of noise. Are you using the system version of libmad or the one bundled with audacity’s source? (I’m using the latter.)

I’m using the one in the Audacity source code.