How to find out the bit depth of an mp3 file?
The MP3 file header contains only the sample rate and bit rate, so the decoder cannot determine the bit depth in the header. Maybe it can only be guessed from the bitrate? But the bit rate varies from frame to frame.
Here's another way to ask this question: if I encode 24-bit WAV to mp3, then how is the 24-bit information stored in that mp3?
source to share
When the WAV source is compressed, the original bit depth information is "thrown away". This is by design in any compressed audio codec, since it's all about using the smallest bits that can be saved for the "same" sound.
Internally, MP3 uses Huffman symbols to store processed audio data. So there is no real "bit depth" to report.
source to share
During the encoding process, the samples are quantized, so the original bit depth information is lost.
MP3 decoders either choose the bit-bit in which they operate or allow the end user / application to dictate it. The bit bit is determined during "re-quantization".
Read http://blog.bjrn.se/2008/10/lets-build-mp3-decoder.html which is pretty enlightening
source to share