Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Help me to understand BPS. (Read 4372 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help me to understand BPS.

I suppose, the easiest way for me ask this, is to contrast it with what I understand about PCM/.wav files. (I know . . . wav is a "container" for PCM.)

44,100/16-bit is pretty easy to understand. Every 44.1 thousandth of a second, a sample is taken of an analog value, and written using 16 bits of resolution, which corresponds to a number between 0 and 65535.

While I understand that a 320 bps mp3 has better resolution than a 128 bps mp3, and I've seen this discussed before, I'm not really sure how the number "320", or "128" relates to whatever aspect of the analog value. Is it more analogous to the sampling rate, (44.1Khz), or the dynamic resolution, (16-bit), or both?

Anything from a simple link, to a short comment, to writing a book will be read and appreciated. I just need to "get" this once and for all.

Thanks; Artie

Help me to understand BPS.

Reply #1
Both i'd say (or maybe neither    )

bps means Bits Per Second. Its how many bits the encoder has to play with, to let the decoder try and output as much of the original perceptable sound possible.

you can encode a 22khz wav file at 128bps
or encode a 44khz wav file at 128bps

the 22khz mp3 will decode closer to the original because it has less frequency range to deal with.

There's probably a better way to explain it.

Help me to understand BPS.

Reply #2
Quote
While I understand that a 320 bps mp3 has better resolution than a 128 bps mp3, and I've seen this discussed before, I'm not really sure how the number "320", or "128" relates to whatever aspect of the analog value. Is it more analogous to the sampling rate, (44.1Khz), or the dynamic resolution, (16-bit), or both?
[a href="index.php?act=findpost&pid=257679"][{POST_SNAPBACK}][/a]

Here is a gross explanation from someone who has never worked on a codec.

The bitrate is not an audio characteristic, although it could be compared to the sample resolution, which is an arbitrary number of bits used to describe the amplitude of a sound. A bitrate (i.e. a data rate) is also an arbitrary number of bits, used to encode one second of a sound as a whole. Think of it as an indicator of data compression. It has no relation with the audio characteristics of the original sound file, while the compressed file does keep characteristics such as sample rate and resolution (but only when decoded).

As ThrashJazzAssassin said, you can have several files encoded at exactly the same sample rate and resolution (44.1 kHz @ 16 bits, for instance) but at various bitrates (64, 128, 192 kbps...). Those files won't actually use 44100 bits for the sample rate and 16 bits for the sample resolution, but much less, just enough to be able to reproduce the original with the same characteristics as closely as possible.

For instance, if a sound doesn't change at all for 3,000 times in a second, the codec won't have to actually write 3,000 zeros or ones to describe that small chunk of audio, but only the fact that a 0 or a 1 is repeated 3,000 times, gaining a little bit less than 3,000 bits.

Some frequencies are also often discarded by the codec because they can't be heard anyway by most people, thus leaving more bits for more important frequencies (the ones we can hear).

The bitrate is only the number of bits you want to use for compressing all of the information. The codec will try to be smart when deciding how many of those 128,000 bits it will use for every second of audio, between sample rate, sample resolution, which frequencies it will keep, etc...

In the case of an audio CD, the bitrate of a song is equal to the sample rate * the sample resolution * the number of channels. Since it is uncompressed audio, its bitrate is 1,411,200 bits per second (bps).

Help me to understand BPS.

Reply #3
The biggest thing that a codec like MP3 does is convert the audio from the temporal domain (i.e. a sample every 44100th of a second) to the frequency domain. Basically, an MP3 is just a big list of all the frequencies present in the file at different times, which is reconstructed back to the temporal domain when you play it. The advantage of frequency representation is that you don't need a sample every 44100th of a second, you just need a snapshot of all the frequencies present in a much longer "block" of audio. Now, this tends to smear short, sudden sounds, because the frequency of that short sound instead carries over to the entire block. A good MP3 encoder will dynamically change the length of the blocks so that these sudden sounds, called "transients," get put in a shorter block so the smeared sound isn't as audible.

Back to frequencies. The bitrate restricts how accurately the frequencies can be represented. At a higher bitrate, the frequencies can be represented more accurately, so less noise (noise is defined as the difference between the original and encoded version) is introduced. At a lower bitrate, the frequency representation has to be rounded down, or "quantized," to fit into less space. This introduces "quantization noise" into the audio, which comes across as ringing or any of the other artifacts you hear in low quality MP3s. The job of the encoder is to quantize all of the frequencies enough to fit the audio into the alotted bitrate, while producing the smallest amount of audible quantization noise as possible. It figures out what's acceptable using a psychoacoustic model that simulates the way humans perceive sound.

So that's MP3 in a nutshell. Yeah. Note that I'm not an audio programmer, or even a programmer at all, this is all stuff I've just picked up from hanging around at HA. God, I'm a geek.

 

Help me to understand BPS.

Reply #4
Thanks all. Thats helpful. I don't necessarily understand it . . . but, at least I know its not what I thought it was.   

I'll just have to do more reading.