Average Bitrate

From Hydrogenaudio Knowledgebase
Jump to: navigation, search

Average Bitrate (ABR) encoding is the LAME developers' name for any method of producing a Variable Bitrate (VBR) MP3 in which the encoder selects the bitrate for each frame based solely on a fixed set of metrics, in an effort to produce a file with an average bitrate that is near a target bitrate chosen by the user. In many encoders, ABR is the normal method of producing VBR MP3s, but it is not the default method in LAME.

Essentially, when using an ABR method, the encoder makes an educated guess at the optimum bitrate for each frame based on an analysis of the original audio and the application of a fixed algorithm. In contrast, more aggressive VBR encoding methods, such as LAME's normal VBR method, will try out different bitrates in an effort to find the lowest one that will produce decoded audio with an acceptable quality as measured by comparing quantization noise and applying additional psychoacoustic models.

The majority of frames in a VBR MP3 produced with an ABR method is normally at or near the target bitrate chosen by the user, but each frame can still potentially vary within the normal range of 8 to 320 kbps. The ABR encoder will typically limit the range of bitrates it can choose from, or will greatly favor certain bitrates, in an effort to ensure that the average comes out near the target.

The aggressive, non-ABR method of producing VBR MP3s (as implemented in LAME, at least) requires the user to choose a minimum and maximum bitrate. Therefore, another method of producing VBR files close to an average bitrate would be to simply select a minimum and maximum within a narrow range; the bounds could even be the same bitrate, which would result in a constant-bitrate VBR file. However, this technique would not constitute "ABR" encoding, by LAME's definition.

Who should use ABR

ABR encoding is desirable for users who want the general benefits of VBR (an optimum bitrate from frame to frame) but with a relatively predictable file size like they would get with constant bitrate (CBR), and a greater preference for bitrates that are near a desired target. Inevitably, some frames will be encoded with more bits than necessary, but the result will always be equal to or better than that of CBR for the target bitrate.

Depending on the complexity of the audio and the algorithms applied, ABR-encoded frames may sometimes exceed the quality that would be produced with a more aggressive VBR encoding method, since the ABR method is less conservative about bit allocation. However, having more bits available in a frame does not necessarily mean they're all used by that frame, so the quality of ABR is not necessarily better than that of regular VBR, and both methods still have a margin of error.

In general, though, it is safe to say that given the same input, a VBR MP3 encoded using ABR will be of equal or higher quality than a CBR MP3 of the same bitrate, and will be of equal or lower quality than a non-ABR VBR MP3 of the same file size.

Therefore, hydrogenaudio forum members recommend that for maximum audio quality at a given average bitrate, a VBR MP3 produced with the ABR method is always more desirable than a CBR MP3 at the same bitrate. That is, unless the encoder has a horrible ABR algorithm, a VBR MP3 produced with the ABR method and an average bitrate near 128 kbps will always sound equal to or better than a 128 kbps CBR MP3.

If average bitrate is not a concern, or if greater efficiency is desired, then even better quality will usually be obtained if a VBR MP3 is produced via a more aggressive, non-ABR method such as that normally used when producing VBR MP3s with LAME—assuming the range of allowable bitrates is high enough and the psychoacoustic model is not error-prone for the audio being encoded. LAME's various VBR presets can be used to ensure such an outcome.

References