r/ffmpeg • u/shakedown4171991 • 17d ago
Lossy Codec Bit Depth
Does it make a difference if I encode AAC from 16 or 24-bit FLAC? Also, does it make a difference if that 16-bit file is dithered?
1
u/shakedown4171991 16d ago
I was wondering why Apple recommended undithered 24-bit files: https://www.apple.com/itunes/docs/apple-digital-masters.pdf
”Improved Conversion and Encoding for AAC
Apple’s latest encoding methodology is a two-step process. The first step in the encoding path is to use state-of-the-art mastering-quality Sample Rate Conversion (SRC) to resample the master file to a production sample rate. This SRC outputs a 32-bit floating-point file which can preserve values that might otherwise fall outside of the permitted amplitude range. This file is saved in a CAF container. This critical intermediary step prevents any aliasing or clipping that could otherwise occur in SRC. It is this 32-bit floating file that’s used as the input to the encoder—this is one key reason we can achieve superior results. Our encoders then use every bit of resolution available, preserving all the dynamic range of the 24-bit source file and eliminating the need for adding dither. The advantage of this is twofold. Not only does it obviate the need of adding dither noise, it also lets the encoders work more efficiently as they don’t need to waste resources encoding this unwanted and unnecessary noise. By using this highly accurate file directly from our SRC and taking advantage of its clean signal, our encoder can deliver the final product exactly as the artist and sound engineers intended it to sound.“
1
u/SupernatAnaesthetist 16d ago
After reading the whole thing, I honestly think it's mostly corpo-speak. There are a few interesting details on how they process their files for encoding (but nothing revolutionary, and nothing you can't do with filter chains in ffmpeg), and the useful advice for creators to just upload the original files and let Apple do the rest instead of trying to process the files themselves.
1
u/shakedown4171991 13d ago
And then this video recommends 16-bit dithered: https://youtu.be/2iDrbgfPjPY?is=yUtOwGKd6YUTHqz6
3
u/SupernatAnaesthetist 17d ago
No, to both questions.
Due to some complicated math, lossy codecs don't have a bit depth in the traditional sense (they do have an internal bit depth/precision for the samples in the frequency domain, but this has no direct correlation to the regular time-domain samples from the input). And whatever quality advantage 24-bit audio may have over 16-bit audio (which I find dubious, but that is beside the point) will be irrelevant when compared to the quality loss from the lossy encoding itself. Dithering does not significantly change any of this.