What are CBR and VBR?


Free Download Mp4Gain
picture

What are CBR and VBR?

CBR VBR

As you know, the result of encoding a signal using an algorithm such as MPEG-1 Layer III (MP3) (and many other algorithms) is a bit stream with a frame (block) structure. This is due to the fact that the source stream is not encoded in its entirety, but in parts. That is, in fact, the original stream is divided into blocks of some fixed length, then each block (frame) is encoded individually, and the result (encoded information block) is sent to the resulting stream (either a file or a stream of data).

CBR vs VBR

CBR (constant bit rate) is a way of encoding the original audio stream, in which all its blocks (frames) are encoded with the same parameters (with the same bit rate). In other words, the bitrate over the entire length (all frames) of the resulting stream is constant.

VBR (variable bit rate) is a method of encoding the original audio stream, in which each separate block (frame) is encoded with its own bit rate. The choice of the optimal bit rate to encode a given frame is made by the encoder itself by analyzing the “signal complexity” in each individual frame.

What are the differences between CBR, VBR and ABR for Lame Encoder?

Before starting the conversation, let’s clarify two details:

1. MP3 encoding happens block by block: the encoded file is divided into frames (frames) with the same interval, each frame is encoded and written to the output stream; therefore, the output stream also has a frame structure.

2. Frames cannot be encoded at any bit rate, but only at one of the standard MPEG1 Layer III bit rates listed in the table: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320. The standard does not provide encoding at intermediate bit rates (“free format”).

Introduction

People using VBR in Lame often argue this with the phrase, “I want to get constant quality, not constant bitrate.” In fact, in music there are simple passages, for which 128 Kbps is sufficient (for example, pauses between songs), and there are also complex passages, in which a person with good hearing, a good audio card and other audio equipment. audio will hear compression defects even at 320 Kbps / sec. In fact, such an argument is not entirely valid.

CBR

Even in CBR mode, the mp3 encoder can reallocate bits over time, emphasizing more or fewer bits during complex or simple passages, thus improving the overall sound quality. This redistribution of bits is carried out at the expense of the so-called bit deposit: during the encoding of simple passages, the encoder spends not the entire user-specified bit rate on them, but only about 90%, about 10% is saved in the repository to encode complex locations (initially repository is empty). When encoding complex passages, the encoder will use 100% of the specified bit rate and add additional bits from the bucket (if any, that is, if the bucket is not empty). Unfortunately, according to the standard, the size of the tank is limited. This means that if a single signal lasts long enough, the tank builds its volume up to certain maximum allowed limits and then the encoding is already using 100% of the bit rate. And the opposite situation: if a complex signal lasts long enough, all the saved bits are taken from the repository (gradually) and then encoding is done using now 100% of the bit rate.

ABR: Explanation

You could say that the reservoir does a good job with its main function – accumulating “extra” bits during simple passages and issuing them as additional bits when encoding complex passages, if not for one “but”: it has a finite and additionally very limited size, which means that it can only be stored up to certain limits and consequently also until the tank is empty. It is in order to eliminate this major tank drawback that the ABR was developed.

The main difference between ABR and CBR is that in CBR all frames must be the same size (that is, the bitrate for all frames must be the same), but in ABR this restriction is removed, respectively, there is an opportunity to use an almost infinite tank instead of the standard, very limited in size. “virtual” reservoir. Does it look like this.

ABR: mechanism

Suppose user specified ABR mode and a certain bitrate B (user can specify absolutely any bitrate from 32 to 320, even not from standard bitrate grid, for example you can specify 129 as the rate Average Bit Rate). AND


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Author: R. Arias

R. Arias is the author of this article and has extensive experience for more than 30 years as a recording engineer and audio specialist, as well as more than 20 years of experience creating algorithms related to audio and video. Linkedin