This was very enlightening. I have done listening tests on AAC with acoustic music sources and never noticed anything this badly distorted by ear. But the waveforms don’t lie, and AAC appears to struggle with synthetic sources. I don’t know if this is a codec design limitation or an FFmpeg implementation issue. I tried 256k and 448k AAC encodings of a 1kHz sine wave, and the increased bitrate did not reduce the distortion at all.
I tried AC3 and its waveform was virtually flawless.
I tried Opus and it looked basically as good as AC3.
I gained a renewed respect for these two formats today.
If an MP4 file is needed, then AC3 at 640k will give the best lossy results. Lossless results would be possible with ALAC in a MOV container.
If Matroska is an option, then libopus at 512k is a solid open-source alternative. Audibly identical, even on synthetic sources. For lossless quality, use FLAC.
If uploading lossy audio to YouTube, it helps to use the highest bitrate possible so that the audio doesn’t get distorted more than necessary when transcoded to other formats. (It will eventually turn an AAC source into Opus anyway.)
- Everything understands it.
- Smaller files for mobile users.
- It is “good enough” for most sources.
- More DRM controls for content streamers.
None of those are compelling reasons for people that are interested in or needing high quality.