Variable bit rate


Free Download Mp4Gain
picture

Variable bit rate

VBR

Variable Bit Rate (VBR) is a term used in telecommunications and computing that refers to the bit rate used in encoding audio or video.

VBR

Unlike constant bit rate (CBR), VBR files change the amount of output per time slice. VBR allows you to allocate a higher bit rate (and therefore requires more storage space) to more complex segments of media files, while less space is allocated to less complex segments. The average of these rates can be calculated to generate the average bit rate for the file.

Opus, Vorbis, MP3, WMA and AAC audio files can optionally be encoded in VBR. Variable bit rate encoding is also commonly used in MPEG-2 video, MPEG-4 Part 2 video (Xvid, DivX, etc.), MPEG-4 Part 10 / H.264 video, Theora, Dirac, and other video formats. video compression. Additionally, floating rate encoding is inherent in lossless compression schemes like Apple’s FLAC and Lossless.

Advantages and disadvantages of VBR
The advantages of VBR are that it produces a better quality-to-space ratio than a CBR file of the same data. The available bits are used more flexibly to encode audio or video data with greater precision, with fewer bits used in less demanding passes and more bits used in difficult-to-encode passes.

The downsides are that encoding can take longer as the process is more complicated and some hardware may not be compatible with VBR files. VBR can also pose problems during transmission when the instantaneous bit rate exceeds the data rate of the communication path. These problems can be avoided by limiting the instantaneous bit rate during encoding or (at the expense of higher latency) by increasing the playback buffer.

Additionally, encryption of VBR encoded voice (or other signals, including video) provides only limited privacy, as bit rate patterns can show which language is spoken.

In the past, many hardware and software players could not correctly decode variable bit rate files, in part because the various VBR encoders used were not well developed. This led to the widespread use of CBR over VBR for the sake of compatibility. As of December 2006, devices that only support CBR encoded files are mostly obsolete as the vast majority of portable music devices and software today support encoded VBR files.

VBR support for AAC and MP3 files is found in most modern digital audio players, including those released by Apple, Microsoft, Creative Technology, and SanDisk. Early VBR algorithms sometimes introduced audible artifacts by encoding monotony or minimal tones (such as audiobooks and acoustic music). These displays often mimic the “digital chirp” during the quiet parts of a song, or when only speaking. As VBR improved the encoding algorithms, these problems were addressed in later generations of the VBR standard.

VBR encoding methods
Note that choosing the Variable Bit Rate (VBR) method only affects the encoding process. Decryption of the VBR stream is performed identically in all cases, regardless of how the encoder decides to allocate the bits.

Multi-pass encoding and single-pass encoding
VBR is created using so-called single-pass encoding or multi-pass encoding. Single pass encoding analyzes and encodes data on the fly and this is also used in constant bit rate encoding. Single pass encoding is used when encoding speed is more important, for example for real-time encoding. Single-pass VBR encoding generally controls a fixed quality setting or bitrate range (minimum and maximum allowable bitrate), or an average bitrate settling. Multi-pass encoding is used when encoding quality is most important. Multi-pass encoding cannot be used when real-time encoding, live coverage, or live streaming … Encoding a multi-pass takes much more time than encoding a single pass because each pass means one pass through the input data (usually the entire input file). Multi-pass encoding is only used for VBR encoding because CBR encoding does not offer the flexibility to change the bit rate. The most common multi-pass encoding is two-pass encoding. The first step of two-step coding analyzes the input data and stores the result.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Constant bit rate (CBR) vs variable bit rate (VBR), which one should you choose?

Constant bit rate (CBR) vs variable bit rate (VBR), which one should you choose?

CBR vs VBR

How do you save memory when encoding in VBR?

CBR & VBR

What type of encoding to choose: variable or constant?
If you want to rip music from CDs or other media where it is stored uncompressed in lossy formats like MP3, WMA, AAC, and others, you have to choose what bit rate you will do it with. Constant (CBR) or variable (VBR).

Constant Bit Rate (CBR) encoding method

CBR (Constant Bit Rate) – When encoding in CBR throughout the music file, the bit rate will remain unchanged and equal to the value you selected.
The most common values ​​are: 128, 192, 256, 320 kbps.

The advantage of CBR encoding is that the file will be processed faster, both when encoding and decoding. Also, absolutely any program or hardware that is capable of playing music from MP3, WMA, AAC formats can do it if it is encoded in CBR, which cannot be said for the variable bit rate. Older hardware or software is not always compatible with CBR music playback.

However, it should be noted that CBR encoded music eventually takes up more memory than the same VBR encoded music.

Very often, CBR encoding is used for those cases where it will be transmitted over the network or when it is known in advance that it will be played on older equipment.

A constant bit rate is important for the music that will be streamed over the network, as the data flow will be stable and if it is within the bandwidth of the network channel, the playback will be smooth, without jerks or interruptions. . But if you stream music compressed with a variable bit rate, difficulties can arise when a part of a song that is encoded with the maximum bit rate does not pass the channel bandwidth, causing gags during playback.
Back to content

Variable Bit Rate (VBR) encoding
VBR (Variable Bit Rate) – When encoded in VBR, it is not constant but constantly changes as it is played.

This encoding method allows you to increase the bit rate in difficult musical sections and decrease it in simpler musical sections, allowing the quality to remain roughly the same level, but at the same time saving memory space.

VBR is used successfully and is compatible with most formats and software.

VBR Supported Formats: MP3, WMA, OGG, AAC and others.

The main advantage of variable over constant bitrate is to save memory space for storing music.

When encoding in VBR, more complex and resource-intensive algorithms are used, so playback requires more computing power from the device. For this reason, some older computers may not play music from VBR.
Back to content

How do you save memory when encoding in VBR?
Compression algorithms analyze not only the sound itself, but also its complexity, breaking it down into elementary components. Therefore, complex areas of music, where many instruments play at the same time, or the sound of an instrument often changes its pitch and volume, are encoded with the highest quality. But if simple seconds appear in the music, or if there is silence at all, these pieces are encoded at a much lower bitrate.

Due to this approach, memory savings are achieved.

But you should always remember that the main disadvantage of VBR is the inability to play music on old hardware or old software.
Back to content

What type of encoding to choose: variable or constant?
If you are absolutely sure that your encoded music will play on modern hardware, I recommend using a variable bit rate.

If your music will be played on a wide range of computers, it is best to play it safely and encode it at a constant bit rate.

All phones, players and computers that have been released in the last 10 years should support VBR playback without any problem, so in the vast majority of cases I recommend using VBR.

In this way, the music will take up less memory, but at the same time it will retain high quality.

It is especially important to use VBR if the music will be stored on portable devices such as mp3 players or phones. Although a large amount of memory has been incorporated lately, it is desirable to use it sparingly.

What are CBR and VBR?

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