-2

So from what I know bitrate is the product of samplerate * bitdepth.

But I cant understand this:

here for example we try to create an MP3 file selecting bitrate to 320 and sample rate to 44.1khz

enter image description here

How can that be? I mean if the formula bitrate = samplerate * bitdepth stands true then it must be that bitdepth = bitrate/samplerate and in our case bitdepth = (320*1024)/44100 = ~7

Will it really have such a low bitdepth? if not then why not?

Also if the above is true would it be not wiser to sacrifice some samplerate in order to gain some bitdepth?

Last but not least lets assume a 128kbps MP3 track with 8bit as bitdepth the sample rate (according to the above equation) sould be 16384.

But the sound band of the music played will vary from 20 to ~20000hz how is this possible? I would assume that since 16384 samples per second are "spited" out from a soundcard playing that 128kbps file then the frequencies involved can not be higher than 16384hz

EDIT: In case my post is confusing: how the sampling rate of a file is factored into the output MP3 bitrate ?

  • 1
    I'm not great at the math, so I can't provide a detailed answer, but essentially your formula is only valid for uncompressed audio. Throw it out of the window for mp3. – Tetsujin May 16 '17 at 8:47
  • @Tetsujin Thanks thats not enough I need to know why that is or at least get an equation for mp3 bitrate if you would like to upvote this post it would help greatly so that maybe a more advanced member will notice it. – papajo May 16 '17 at 11:42
  • Papajo - there is no equation for this for MP3, for the reason Tetsujin mentioned. – Rory Alsop May 18 '17 at 9:48
1

Your assumption that bitrate = bitdepth * channels * samplerate is true for raw PCM encoded audio. It is not true for bitrate reduction encodings, be it lossless (as flac) or lossy (as mp3).

The samplerate and bitdepth given to an mp3 encoder are used to set up appropriately the encoder, and will be used at decoding stage to output a decoded audio with the same samplerate and bitdepth than the input audio.

The ratio between the raw PCM bitrate and the actual encoded bitrate of a lossy codec gives you a clue on how much information has been lost in the process.

  • This is an opportunity to celebrate the end of patents on mp3 ! iis.fraunhofer.de/en/ff/amm/prod/audiocodec/audiocodecs/… – audionuma May 16 '17 at 17:03
  • so there is no way to know the sample rate of MP3 file? Nor its bitdepth? (without having the source file at hand) – papajo May 16 '17 at 18:00
  • 1
    MP3 can be a bit confusing, but as audionuma said, compressed formats are very different to lossless formats. With MP3 encoding, there is no bit depth. MP3 encoding splits an audio signal into frequency-domain samples, instead of the time-domain samples of PCM. You can work out bits per sample if that helps. Take a look at the last paragraph of the introduction here: en.wikipedia.org/wiki/Audio_bit_depth – Marc W May 18 '17 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.