CBR vs. VBR: Difference Between Constant Bitrate and Variable Bitrate (Update)

 

One of the most common encoding parameters available for live and on-demand streaming is bitrate control, which dictates how the encoder allocates the encoded audio and video data within the file. There are a variety of methods available for controlling bitrate, two of the most common being constant bitrate (CBR) and variable bitrate (VBR). True to their names, CBR refers to encoding a stream at a single set bitrate, whereas VBR refers to encoding or transcoding stream segments at different bitrates according to their complexity. In this article, we’ll take a closer look at both of these methods and when to use them.

   

Overview: CBR vs. VBR

CBRVBR
Best for live streaming and multimedia encodingBest for video-on-demand encoding and transcoding
Consistent and predictable results Variable and somewhat adaptable results
Quality consistent but not optimizedQuality variable but generally better
Widely compatibleNot widely compatible
Faster encoding Slower encoding
 

CBR vs. VBR: The Historical Picture

Historically, CBR has been the standard for streaming. Most digital broadcast streams are encoded using CBR, because the streams are transmitted through fixed bandwidth connections with a low tolerance for stream variations.  Broadcast professionals migrating to streaming production tend to prefer CBR because they’re used to it. Similarly, CBR was strictly adhered to when, during the early years of streaming, producers attempted to deliver video to 28.8kbps modem connections. 

The average video download speed in the U.S. today is over 90 Mbps, with 4G and 5G dominating mobile connections. As such, the bandwidth variations caused by VBR typically won’t interrupt last-mile playback. As you’ll read, however, there are still very good reasons to use CBR for live productions. 

First, let’s take a closer look at how these technologies work and what distinguishes them.

 

Become a Video Expert

Subscribe to our bi-weekly roundup of industry updates, trends, and more.

Sign Up
 

What Is CBR?

CBR stands for constant bitrate. If bitrate refers to the amount of data transferred over a set time, then a constant bitrate is a consistent stream of data at a set speed. This makes it highly reliable in that you can choose a set bitrate and know what you’re getting. However, it is not responsive to the size or complexity of the data being transmitted. This less nuanced approach could lead to lower overall quality, depending on your target bitrate and streaming goals.

All of that being said, CBR is the more popular of the two methods given how widely supported it is. In particular, it’s helpful in situations that require real-time encoding, like live streaming. It’s also a better option for multimedia encoding, but we’ll get more into these details later. If you choose to encode at a constant bitrate, the rule of thumb is to choose a higher bitrate to ensure a quality stream. Just know that you may need other steps in your workflow, like the help of a streaming solution, to further adapt your stream to end-user devices.

Summary of Pros and Cons 

Pros

  • Consistent — set quality
  • More widely supported (more common)
  • Well suited to multimedia encoding
  • More control over audio quality

Cons

  • Inflexible — could result in buffering 
  • Requires connection to support it
  • Quality, although consistent, generally less high
 

What Is VBR?

VBR stands for variable bitrate. If CBR refers to a stream with a single static bitrate, then VBR refers to a stream that involves multiple bitrates applied to different segments of a single stream. This works by encoding data segments at different bitrates according to their complexity. Of course, the real answer is a bit more complicated, as there are multiple VBR subtypes that work in slightly different ways. 

Single-Pass vs. Multi-Pass 

To understand these differences, you first need to understand single-pass versus multi-pass encoding (sometimes called VBR 1 pass vs. VBR 2 pass when referring exclusively to VBR). Single-pass encoding is exactly as it sounds — the data is encoded on the fly a single time. This is how CBR works for the stream as a whole. VBR can do this as well for various data segments. 

Multi-pass encoding is only used by VBR and involves taking an average bitrate from the various encoded data segments and either using that to encode all of the segments or to determine a range for encoding all of the segments. This creates some consistency in how the segments are encoded but with more nuance than straight CBR. 

Types of VBR

  • Quality VBR uses single-pass encoding to encode the data using a desired quality level for the output as a guiding light.  
  • Unconstrained VBR uses multi-pass encoding to encode the data using a set bitrate of your choosing as a guiding light. It treats this bitrate as the desired average and seeks the highest possible streaming quality across data segments while maintaining that average.
  • Constrained VBR uses multi-pass encoding to encode the data using a set maximum bitrate and maximum buffer window as a guiding light. It uses these values to determine how to encode the data.

Summary of Pros and Cons 

Pros

  • More flexible 
  • Capable of producing higher quality streams
  • Does not negatively impact quality 
  • Smaller file sizes

Cons

  • Not widely supported (less common)
  • Takes longer to process data, leading to higher latency
  • Quality less consistent 
 

CBR vs. VBR in Action

Let’s use the Adobe Media Encoder interface to further illustrate the differences between these two encoding methods.

Defining Our Terms

As shown in the below screenshot, CBR assigns a single data rate to the file and encodes in a single pass. As the name suggests, the encoder maintains a constant bitrate over the duration of the file, which doesn’t vary by the complexity or motion in the video. 

 
adobe media encoder bitrate settings
 

In contrast, with variable bitrate encoding, the encoder varies the bitrate allocation over the file according to encoding complexity, stealing bits from easy-to-encode scenes to apply to hard-to-encode scenes so they look better. In operation, as shown below, you assign both a target bitrate and a maximum bitrate, with some encoders also allowing you to set a minimum bitrate. You’re essentially telling the encoder to average 2 Mbps over the duration of the video file, but in no cases let the video bitrate exceed 4 Mbps. 

This 4 Mbps is the “constraint” in constrained VBR (as discussed above). In practice, almost all VBR is constrained VBR, because you always want to set some bandwidth limits to ensure smooth streaming. You would call the configuration in the below screenshot 200% VBR, because you’re instructing the encoder not to exceed 200% of the target bitrate. 

 
adobe media encoder - VBR
 

Measuring the Results

With these terms defined, let’s see how the Adobe Media Encoder did in meeting our targets, using the files we just encoded as viewed in a free tool named Bitrate Viewer. Note that this test file has seven seconds of easy-to-encode low motion followed by seven seconds of hard-to-encode high motion. The first of the following two screenshots is the CBR stream, the second the VBR stream. Bitrate Viewer is in seconds view and the dark blue blocks show the data rates for each second of video. The faint blue line is the average bitrate over the file. 

 
VBR vs. CBR streaming data
 

On the upper right of each image, you see the average bitrate for each file: 2029 kpbs for the CBR file and 2019 kpbs for the VBR file. So, the Adobe Media Encoder hit the target bitrate for both files. This reinforces the point that the VBR and CBR decision doesn’t impact total bitrate, just how the bits are allocated throughout the file. 

You can also see the peak bitrate is 3,373 for CBR and 5,360 for VBR, indicating that the bitrate wasn’t perfectly constant for the CBR file, and that the encoder missed the maximum constraint for the for the VBR file. This is typical for desktop encoders like Adobe Media Encoder (as opposed to live streaming encoders), where hitting these targets is seldom relevant.  In contrast, most streaming encoders offer closer adherence to the target and maximum bitrates. 

That said, you can see that the average bitrate is much more consistent in the CBR stream than in the VBR stream. The CBR stream allocated most of the bits evenly over the entire file, the VBR stream allocated much more of the bits to the hard-to-encode region at the end of the file.

 

Our Takeaway

With these two patterns in mind, ask yourself two questions:

  • Which encoded file is likely to exhibit higher overall quality: CBR or VBR? If you think VBR, then you’re right, because the data rate varies according to encoding complexity. Of course, while VBR typically produces a higher quality file than CBR, the difference is often lower than you might think.
  • Which file would you rather stream to a viewer watching on a 3G connection? If you think CBR, then you’re right, because there are no data rate spikes that might exceed the connection speed. Because CBR usually produces a more deliverable file, it’s more suited to mobile delivery. 

Finally, while it may not be evident in our experiment, CBR infrequently produces transient drops when the encoder sacrifices short-term quality to meet the target bitrates. This is one reason why some producers may avoid CBR despite its widespread support and popularity.

Keep Up With All the Latest Trends

Subscribe to stay in the know about all things live streaming.

Subscribe Now
 

When to Use CBR vs. VBR

By now the strengths and weaknesses of each of these methods should be fairly clear. CBR is faster, more consistent, and less dynamic. VBR takes longer, but its variable nature makes it more adaptable and better able to produce a high-quality stream. So how do you choose? Let’s break it down by the two most common streaming use cases. 

Use CBR for Live Streaming

Though one-pass VBR encoding is possible, VBR is most effective when the encoder can scan the entire file and identify the hard-to-encode and easy-to-encode regions. Obviously, two-pass encoding isn’t available for live encoding, which usually makes CBR the better option. 

Additionally, when encoding onsite and then streaming to the cloud for transcoding and packaging, producers often work with tight outbound bandwidth constraints. In these instances, you want very tight control over your outbound bitrate, because data rate spikes could exceed available bandwidth and stop the outbound stream. 

Most producers prefer CBR for cloud transcoding of live streams because it keeps outbound bandwidth requirements relatively consistent. Remember that all viewers of a live stream watch the same bits at the same time. If you’re serving thousands of viewers simultaneously, and the bitrate spiked by 200%, then you could temporarily exceed the capabilities of your delivery ecosystem. In contrast, even if thousands of viewers were watching a VOD asset simultaneously, they wouldn’t be watching the same sections, so the effect of the variations would even out. 

Recognize that encoders don’t produce total flatlines when delivering CBR video. Apple’s HLS Authoring Specifications state that for “live/linear content, the measured peak bit rate MUST be less than 125% of the BANDWIDTH attribute.” This is good advice whether you’re distributing via HLS or DASH.

Use Constrained VBR for VOD

Constrained VBR (CVBR) is preferred for video-on-demand (VOD) because it delivers better overall quality than CBR and avoids transient quality issues sometimes experienced with CBR. The constraint applied should vary by geographic region and the connection speed of your target viewer. 

In terms of region, if your viewers are typically in the U.S., Europe, or the Asia Pacific, the speed of desktop, living room, and mobile connections are all very high, and unlikely to be exceeded by data rate swings in a CVBR encoded file delivered via VOD. On the other hand, if your typical viewer is watching over 3G or you’re targeting countries with much slower connection speeds, tightly constrained VBR is appropriate. 

Referring back to the Apple HLS Authoring Specifications, Apple recommends “for VOD content, the peak bitrate SHOULD be no more than 200% of the average bitrate,” or 200% constrained VBR. If you’re distributing VOD to viewers watching on relatively high bitrate connections, then this is good advice for both HLS and DASH encoding. For countries with lower bitrate connections, use 110% constrained VBR, which would limit maximum bandwidth to 110% of the target. 

What About Audio? 

The same general rules apply for audio-only streaming: use CBR for live and consider VBR for audio on demand. That said, although virtually every video encoder enables CBR and VBR configuration options for video, relatively few offer the same option for audio. 

If audio is an important component of the streaming experience, as with concerts, ballets, operas, and similar performances, it’s worth experimenting with VBR audio to optimize the on-demand experience. For most other content, going with CBR for live and on-demand is probably the simplest option. 

 

The following Wowza Video encoder settings are generally recommended. However, note that what works best for your video stream will depend on your use case. Additionally, your camera or source encoder may contain encoding restrictions that could affect these recommendations. 

Frame Rate 

  • Standard definition: 25 fps / 50 fps
  • High definition: 30 fps / 60 fps — Recommended for web-based broadcasts

Keyframe Interval

  • Baseline recommendation: 1 or 2 second intervals
  • Low definition (as for security cameras): up to 4 seconds

Audio Bitrate

  • Voice content: 32 kbps or 64 kbps
  • Music or complex audio: 96 kbps, 128 kbps, or 192 kbps

Video Bitrate

  • Baseline recommendation: 512 kbps
  • Standard definition: 1024–1600 kpbs
  • High definition: 2640–12,000 kbps

Still not sure which bitrate methodology or encoding best practices would best suit your needs? Learn more about Wowza Video and Wowza Streaming Engine or contact one of our experts for guidance.* 

  *This blog was originally written by Jan Ozer and revised by Wowza in 2022 to include the most up-to-date information.  

Search Wowza Resources

Categories

Subscribe

Follow Us

Categories

About Wowza Media Systems