Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know the bit depth of a mp3 file?

Tags:

audio

mp3

codec

A MP3 file header only contain the sample rate and bit rate, so the decoder can't figure out the bit depth from the header. Maybe it can only guess from the bit rate? But the bit rate is varying from frame to frame.

Here is another way to ask this question: If I encoder an 24 bit WAV to mp3, so how does the 24-bit info stored in this mp3?

like image 809
user991800 Avatar asked Dec 26 '14 01:12

user991800


1 Answers

When the source WAV is compressed, the original bit depth information is "thrown away". This is by design in any compressed audio codec since the whole point is to use the least bits possible to store the "same" audio.

Internally, MP3 uses Huffman symbols to store the processed audio data. As such, there's no real "bit depth" to report.

like image 117
ioctlLR Avatar answered Oct 29 '22 16:10

ioctlLR