| Icecast Installation and Management: A Guide to Open Source Audio Streaming | ||
|---|---|---|
| <<< Previous | Audio Fundamentals | Next >>> |
While MP3 users cannot control the lossiness of a specific audio file to the extent they might with a JPEG image, they can control the number of bits per second taht are devoted to data storage, which nets a similar result. In the process of coding, the "irrelevant" portions of the signal are mapped against two factors; a mathematical model of human psychoacoustics and the bitrate, which is set at the time of encoding.
The bitrate refers to the number of bits per second devoted to storing the final product; the higher the bitrate, the greater the audio resolution of the final product. Audio bitrate can be likened to older cinematic features. The movements were jerky on account of the fewer frames per second displayed. In the audio realm this means less data is distributed over a given time frame.

More bits per second means more audio resolution.
For example, the current de facto standard of MP3 encoding is 128 kbps, or 128,000 bits per second. This figure varies depending on the quality of audio desired or the amount of compression wanted. Since most commercial audio CDs use 128 kbps, MP3 encoders generally keep to the same standard. The codec considers the bitrate as it writes each frame to the bitstream. If the bitrate is low or below 128 kbps, the irrelevancy and redundancy criteria is measured harshly, and more subtlety is stripped out, resulting in a lower-quality product. If the bitrate is high, the codec is applied with leniency, and the end result sounds better. The file size of the end audio product corresponds directly with the bitrate: If small files are desired, settle for less quality. If larger files are not a consideration, use higher bitrates.
Bitrates refer to the total rate of all encoded channels. In other words, a 128 kbps stereo MP3 is equivalent in size and quality to two individual 64 kbps mono files. However, a 128 kbps stereo file enjoys better quality than two separate 64 kbps mono files, since in a stereo file bits are allocated according to the complexity of the channels. In a given time, one channel may utilize 60% of the bits while the other uses only 40%. The cumulative size in bits, however, remains constant.
In most instances bitstream data is encoded at a constant bitrate (CBR). In other words, if 128 kbps encoding is specified, then that is the end result. There are no variations within the final product. The drawback to CBR is that most music is not structured at a constant rate. Passages with many instruments or voices are followed by passages with few vocal or instrumental selections; simplicity follows complexity, and so on. The response to this has been the development of variable bitrate (VBR) encoders and decoders that vary the bitrate in accordance with the dynamics of the signal flowing through each frame. VBR technology was first implemented by Xing, currently owned by Real Networks, but now supported by dozens, if not hundreds, of third-party products.
Rather than specifying a bitrate before encoding begins, the user specifies a threshold, or tolerance, when encoding with VBR. All notions of bits per second are discarded; instead, one selects VBR quality on a variable scale. This scale is represented differently in different encoders. While MusicMatch Jukebox for example gives you a scale of 1 to 100, the LAME command-line encoder lets you specify a quality of 0 to 9, where the scale represents a distortion ratio.
![]() | You cannot just assume that higher numbers mean higher quality. See your encoder's documentation before proceeding, or run the tests yourself. The scales are essentially arbitrary. Think of them as though you were using a slider to control the overall quality versus file size ratio as you might with a JPEG editor. |
While VBR files may achieve smaller file sizes than those encoded in CBR at a roughly equivalent fidelity, they present a number of drawbacks of their own. First, these files may not be playable in older-generation decoders, which had no notion of VBR concepts, even though the ISO standard specifies that a player must handle VBR files if it's to be considered ISO-compliant. Second, VBR files may present timing difficulties for decoders. You may expect your MP3 player to display inaccurate timing readouts, or no timing information at all, when playing back VBR files. However, VBR techniques conveniently take some of the guess work out of trying to find an optimal bitrate for any given track. Whereas you might have to encode a file several times with CBR to find the perfect balance; you can just set your encoder to use a relatively high quality level and let the computer figure out an optimal bitrate for each frame automatically.
![]() | In general, the header data in most CBR files is same for each frame, while header data is necessarily different for each frame of a VBR file. However, VBR files do not incur more processing power, as all MP3 players read the header data for each frame regardless of whether they're playing a CBR or VBR file. |
Bitrates are not the final determiner of audio quality. The resolution of audio signal is determined in large part by the number of source samples per second stored in a given format. While bitrates are a measure of the amount of data stored for every second of audio, samplerates measure the frequency with which the signal is stored. These are measured in kiloHertz, or thousands of samples per second.
The standard samplerate of commercial CD audio is 44.1kHz or 44,100 samples per second. This is the default samplerate used by most encoders and is the samplerate in most MP3 files, whether downloadable or created by others. Audio professionals often work with 48kHz audio and, more recently, 96kHz. (Generally, stored audio frequencies cannot be higher than half the samplerate, so a 96kHz samplerate allows for storage of frequencies well outside the human 20kHz threshold.)
Digital audio storage of lectures and plain speech is sometimes recorded as low as 8kHz. Talk radio stations often stream at 11kHz or 16kHz. Streamed MP3 audio is often sent out at half, or even a quarter of the CD rate to compensate for slow Internet connection speeds. When needing to minimize storage space, or if planning on running an independent Internet radio station, and are willing to sacrifice quality, experiment with the different samplerates. Depending on the encoder you may only be able to use higher samplerates.
| <<< Previous | Home | Next >>> |
| The Encoding Process | Up | Audio Encoding Implementation |