Variable bitrate
Encyclopedia
Variable bitrate is a term used in telecommunications and computing
that relates to the bitrate
used in sound or video encoding. As opposed to constant bitrate
(CBR), VBR files vary the amount of output data
per time segment. VBR allows a higher bitrate (and therefore more storage space) to be allocated to the more complex segments of media files while less space is allocated to less complex segments. The average of these rates can be calculated to produce an average bitrate
for the file.
MP3
, WMA
, Vorbis
, and AAC
audio files can optionally be encoded in VBR. Variable bit rate encoding is also commonly used on MPEG-2
video, MPEG-4 Part 2
video (Xvid
, DivX
, etc.), MPEG-4 Part 10/H.264 video, Theora
, Dirac
and other video compression formats.
The disadvantages are that it may take more time to encode, as the process is more complex, and that some hardware might not be compatible with VBR files. VBR may also pose problems when streaming over a dial-up or broadband Internet connection, because the instantaneous bitrate, if unconstrained, may rise above the maximum data transfer speed of the web connection. These problems can be avoided by specifying a maximum instantaneous bitrate during the encoding process.
Also, encryption of VBR-encoded speech (or other signals including video) gives only limited privacy, as the patterns of variation of the bit rate may reveal what language is being spoken.
In the past, many hardware
and software players could not decode variable bitrate files properly, partly because the various VBR encoders used were not well developed. This resulted in common use of CBR over VBR for the sake of compatibility. As of December 2006, devices that support only CBR encoded files are largely obsolete, as the vast majority of modern portable music devices and software support VBR encoded files.
Support for VBR in AAC and MP3 files is found in most modern digital audio players, including those released by Microsoft
, Apple Inc., Creative Technology
, and SanDisk
. Early VBR algorithms occasionally introduced audible artifacts when encoding monotone or minimal tones (for example audiobooks and acoustic music). These artifacts often mimicked a "digital chirp" during the quiet portions of the song or when there was only speaking. As VBR encoding algorithms have improved, these problems have been resolved in subsequent generations of the VBR standard.
" and it is also used in the constant bitrate encoding. Single-pass encoding is used when the encoding speed is most important - e.g. for real-time encoding. Single-pass VBR encoding is usually controlled by the fixed quality setting or by the bitrate range (minimum and maximum allowed bitrate) or by the average bitrate setting. Multi-pass encoding is used when the encoding quality is most important. Multi-pass encoding cannot be used in real-time encoding, live broadcast or live streaming
. Multi-pass encoding takes much longer than single-pass encoding, because every pass means one pass through the input data (usually through the whole input file). Multi-pass encoding is used only for VBR encoding, because CBR encoding doesn't offer any flexibility to change the bitrate. The most common multi-pass encoding is two-pass encoding. In the first pass of two-pass encoding, the input data are being analyzed and the result is stored in a log file. In the second pass, the collected data from the first pass are used to achieve the best encoding quality. In a video encoding, two-pass encoding is usually controlled by the average bitrate setting or by the bitrate range setting (minimal and maximal allowed bitrate) or by the target video file size setting.
. This is typically more of a concern for video than for audio, since file sizes are much larger and encoding can take much longer.
(ABR) encoding may be used to ensure the output stream achieves a predictable long-term average bitrate. This is typically implemented using multi-pass encoding, where one or more initial passes are used to collect data on the stream, and a final pass uses that data to achieve uniform quality at the specified average bitrate.
Alternatively, periodic averaging may be used, either by performing ABR on smaller chunks of the output, or by reacting to fluctuations in the ABR by increasing or reducing the overall quality. These can achieve ABR in a single pass, but do not produce the same degree of uniformity as multi-pass ABR. Some encoders use "ABR encoding" and "multi-pass encoding" to refer to single- and multi-pass ABR encoding respectively.
Some encoders also allow the user to specify a maximum allowed bitrate or maximum quality value. This is sometimes called Constrained Variable Bitrate (CVBR), and is typically applied to ABR algorithms.
The disadvantage of single pass ABR encoding (with or without CVBR) is the opposite of fixed quantizer VBR — the size of the output is known ahead of time, but the resulting quality is unknown, although still better than CBR. Specifying a higher average or maximum may simply make the file bigger with no discernible quality effect, and an increased maximum bitrate may introduce stutter when streaming the file. However, reducing these criteria too low will eventually lead to quite drastic losses in quality. The effect on video is typically an increased blockiness, because the frames are no longer being fully detailed in their rendering.
The multi-pass ABR encoding is more similar to fixed quantizer VBR, because a higher average will really increase the quality.
There are no ideal "one-size-fits-all" settings for ABR in video encoding. For low resolution (320 or 640 lines) video encoded with MPEG-1 or MPEG-2, the average bit rate can be as low as 1000 kbit/s and still achieve acceptable results. For a high resolution video such as 1080, this average may need to be 6000 kbit/s or higher. The main factor in determining a minimum video bitrate is how efficiently the video can be encoded. Using more efficient video encodings such as MPEG-4
will help promote a lower bit rate, while significant amounts of motion or white noise
will require a higher bit rate to encode without visible artifacts
. In the end, the user may have to use trial and error to achieve a minimum file size for a given video stream, by encoding at a given bitrate and then viewing the results.
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...
that relates to the bitrate
Bitrate
In telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time....
used in sound or video encoding. As opposed to constant bitrate
Constant bitrate
Constant bitrate is a term used in telecommunications, relating to the quality of service. Compare with variable bitrate.When referring to codecs, constant bit rate encoding means that the rate at which a codec's output data should be consumed is constant...
(CBR), VBR files vary the amount of output data
Data
The term data refers to qualitative or quantitative attributes of a variable or set of variables. Data are typically the results of measurements and can be the basis of graphs, images, or observations of a set of variables. Data are often viewed as the lowest level of abstraction from which...
per time segment. VBR allows a higher bitrate (and therefore more storage space) to be allocated to the more complex segments of media files while less space is allocated to less complex segments. The average of these rates can be calculated to produce an average bitrate
Average bitrate
Average bitrate refers to the average amount of data transferredper unit of time, usually measured per second. This is commonly referred to for digital music or video. An MP3 file, for example, that has an average bit rate of 128 kbit/s transfers, on average, 128,000 bits every second...
for the file.
MP3
MP3
MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is a patented digital audio encoding format using a form of lossy data compression...
, WMA
Windows Media Audio
Windows Media Audio is an audio data compression technology developed by Microsoft. The name can be used to refer to its audio file format or its audio codecs. It is a proprietary technology that forms part of the Windows Media framework. WMA consists of four distinct codecs...
, Vorbis
Vorbis
Vorbis is a free software / open source project headed by the Xiph.Org Foundation . The project produces an audio format specification and software implementation for lossy audio compression...
, and AAC
Advanced Audio Coding
Advanced Audio Coding is a standardized, lossy compression and encoding scheme for digital audio. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at similar bit rates....
audio files can optionally be encoded in VBR. Variable bit rate encoding is also commonly used on MPEG-2
MPEG-2
MPEG-2 is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of lossy video compression and lossy audio data compression methods which permit storage and transmission of movies using currently available storage media and transmission...
video, MPEG-4 Part 2
MPEG-4 Part 2
MPEG-4 Part 2, MPEG-4 Visual is a video compression technology developed by MPEG. It belongs to the MPEG-4 ISO/IEC standards. It is a discrete cosine transform compression standard, similar to previous standards such as MPEG-1 and MPEG-2...
video (Xvid
XviD
Xvid is a video codec library following the MPEG-4 standard, specifically MPEG-4 Part 2 Advanced Simple Profile . It uses ASP features such as b-frames, global and quarter pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG and custom quantization matrices.Xvid is a...
, DivX
DivX
DivX is a brand name of products created by DivX, Inc. , including the DivX Codec which has become popular due to its ability to compress lengthy video segments into small sizes while maintaining relatively high visual quality.There are two DivX codecs; the regular MPEG-4 Part 2 DivX codec and the...
, etc.), MPEG-4 Part 10/H.264 video, Theora
Theora
Theora is a free lossy video compression format. It is developed by the Xiph.Org Foundation and distributed without licensing fees alongside their other free and open media projects, including the Vorbis audio format and the Ogg container....
, Dirac
Dirac (codec)
Dirac is an open and royalty-free video compression format, specification and system developed by BBC Research at the BBC. Schrödinger and dirac-research are open and royalty-free software implementations of Dirac...
and other video compression formats.
Advantages and disadvantages of VBR
The advantages of VBR are that it produces a better quality-to-space ratio compared to a CBR file of the same data. The bits available are used more flexibly to encode the sound or video data more accurately, with fewer bits used in less demanding passages and more bits used in difficult-to-encode passages.The disadvantages are that it may take more time to encode, as the process is more complex, and that some hardware might not be compatible with VBR files. VBR may also pose problems when streaming over a dial-up or broadband Internet connection, because the instantaneous bitrate, if unconstrained, may rise above the maximum data transfer speed of the web connection. These problems can be avoided by specifying a maximum instantaneous bitrate during the encoding process.
Also, encryption of VBR-encoded speech (or other signals including video) gives only limited privacy, as the patterns of variation of the bit rate may reveal what language is being spoken.
In the past, many hardware
Hardware
Hardware is a general term for equipment such as keys, locks, hinges, latches, handles, wire, chains, plumbing supplies, tools, utensils, cutlery and machine parts. Household hardware is typically sold in hardware stores....
and software players could not decode variable bitrate files properly, partly because the various VBR encoders used were not well developed. This resulted in common use of CBR over VBR for the sake of compatibility. As of December 2006, devices that support only CBR encoded files are largely obsolete, as the vast majority of modern portable music devices and software support VBR encoded files.
Support for VBR in AAC and MP3 files is found in most modern digital audio players, including those released by Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
, Apple Inc., Creative Technology
Creative Technology
Creative Technology Ltd. is a Singapore-based global company headquartered in Jurong East, Singapore. The principal activities of the company and its subsidiaries consist of the design, manufacture and distribution of digitized sound and video boards, computers and related multimedia, and personal...
, and SanDisk
SanDisk
SanDisk Corporation is an American multinational corporation that designs, develops and manufactures data storage solutions in a range of form factors using the flash memory, controller and firmware technologies. It was founded in 1988 by Dr. Eli Harari and Sanjay Mehrotra, non-volatile memory...
. Early VBR algorithms occasionally introduced audible artifacts when encoding monotone or minimal tones (for example audiobooks and acoustic music). These artifacts often mimicked a "digital chirp" during the quiet portions of the song or when there was only speaking. As VBR encoding algorithms have improved, these problems have been resolved in subsequent generations of the VBR standard.
Methods of VBR encoding
Note that the choice of a variable bitrate (VBR) method only affects the encoding process. Decoding a VBR stream is performed identically in all cases, regardless of how the encoder chooses to allocate bits.Multi-pass encoding and single-pass encoding
VBR is created using the so-called single-pass encoding or multi-pass encoding. Single-pass encoding analyzes and encodes the data "on the flyOn the fly
-Colloquial usage:In colloquial use, on the fly means something created when needed. The phrase is used to mean:# something that was not planned ahead# changes that are made during the execution of same activity: ex tempore, impromptu.-Automotive usage:...
" and it is also used in the constant bitrate encoding. Single-pass encoding is used when the encoding speed is most important - e.g. for real-time encoding. Single-pass VBR encoding is usually controlled by the fixed quality setting or by the bitrate range (minimum and maximum allowed bitrate) or by the average bitrate setting. Multi-pass encoding is used when the encoding quality is most important. Multi-pass encoding cannot be used in real-time encoding, live broadcast or live streaming
Streaming media
Streaming media is multimedia that is constantly received by and presented to an end-user while being delivered by a streaming provider.The term "presented" is used in this article in a general sense that includes audio or video playback. The name refers to the delivery method of the medium rather...
. Multi-pass encoding takes much longer than single-pass encoding, because every pass means one pass through the input data (usually through the whole input file). Multi-pass encoding is used only for VBR encoding, because CBR encoding doesn't offer any flexibility to change the bitrate. The most common multi-pass encoding is two-pass encoding. In the first pass of two-pass encoding, the input data are being analyzed and the result is stored in a log file. In the second pass, the collected data from the first pass are used to achieve the best encoding quality. In a video encoding, two-pass encoding is usually controlled by the average bitrate setting or by the bitrate range setting (minimal and maximal allowed bitrate) or by the target video file size setting.
Fixed quality
One means of VBR encoding is fixed quantizer or fixed quality encoding. It is usually single-pass encoding. The user specifies a given subjective quality value, and the encoder allocates bits as needed to achieve the given level of quality. This ensures the output stream will have consistent quality throughout. A quality level usually has an associated bitrate range. The disadvantage of this encoding method is that the average bitrate (and hence file size) will not be known ahead of time, and achieving a certain average bitrate requires trial and errorTrial and error
Trial and error, or trial by error, is a general method of problem solving, fixing things, or for obtaining knowledge."Learning doesn't happen from failure itself but rather from analyzing the failure, making a change, and then trying again."...
. This is typically more of a concern for video than for audio, since file sizes are much larger and encoding can take much longer.
Bitrate range
This VBR encoding method allows the user to specify a bitrate range - a minimum and/or maximum allowed bitrate. Some encoders extend this method with an average bitrate. The minimum and maximum allowed bitrate set bounds in which the bitrate may vary. The disadvantage of this method is that the average bitrate (and hence file size) will not be known ahead of time. The bitrate range is also used in some fixed quality encoding methods, but usually without permission to change a particular bitrate.Average bitrate
Average bitrateAverage bitrate
Average bitrate refers to the average amount of data transferredper unit of time, usually measured per second. This is commonly referred to for digital music or video. An MP3 file, for example, that has an average bit rate of 128 kbit/s transfers, on average, 128,000 bits every second...
(ABR) encoding may be used to ensure the output stream achieves a predictable long-term average bitrate. This is typically implemented using multi-pass encoding, where one or more initial passes are used to collect data on the stream, and a final pass uses that data to achieve uniform quality at the specified average bitrate.
Alternatively, periodic averaging may be used, either by performing ABR on smaller chunks of the output, or by reacting to fluctuations in the ABR by increasing or reducing the overall quality. These can achieve ABR in a single pass, but do not produce the same degree of uniformity as multi-pass ABR. Some encoders use "ABR encoding" and "multi-pass encoding" to refer to single- and multi-pass ABR encoding respectively.
Some encoders also allow the user to specify a maximum allowed bitrate or maximum quality value. This is sometimes called Constrained Variable Bitrate (CVBR), and is typically applied to ABR algorithms.
The disadvantage of single pass ABR encoding (with or without CVBR) is the opposite of fixed quantizer VBR — the size of the output is known ahead of time, but the resulting quality is unknown, although still better than CBR. Specifying a higher average or maximum may simply make the file bigger with no discernible quality effect, and an increased maximum bitrate may introduce stutter when streaming the file. However, reducing these criteria too low will eventually lead to quite drastic losses in quality. The effect on video is typically an increased blockiness, because the frames are no longer being fully detailed in their rendering.
The multi-pass ABR encoding is more similar to fixed quantizer VBR, because a higher average will really increase the quality.
There are no ideal "one-size-fits-all" settings for ABR in video encoding. For low resolution (320 or 640 lines) video encoded with MPEG-1 or MPEG-2, the average bit rate can be as low as 1000 kbit/s and still achieve acceptable results. For a high resolution video such as 1080, this average may need to be 6000 kbit/s or higher. The main factor in determining a minimum video bitrate is how efficiently the video can be encoded. Using more efficient video encodings such as MPEG-4
MPEG-4
MPEG-4 is a method of defining compression of audio and visual digital data. It was introduced in late 1998 and designated a standard for a group of audio and video coding formats and related technology agreed upon by the ISO/IEC Moving Picture Experts Group under the formal standard ISO/IEC...
will help promote a lower bit rate, while significant amounts of motion or white noise
White noise
White noise is a random signal with a flat power spectral density. In other words, the signal contains equal power within a fixed bandwidth at any center frequency...
will require a higher bit rate to encode without visible artifacts
Compression artifact
A compression artifact is a noticeable distortion of media caused by the application of lossy data compression....
. In the end, the user may have to use trial and error to achieve a minimum file size for a given video stream, by encoding at a given bitrate and then viewing the results.