DEV Community

Zishan Ghaniwala for Video SDK

Posted on AI-assisted

Video Bitrate Explained: Quality, Bandwidth, and Video Calls

A 720p video and a 540p video of the same face looked equally good, but the 540p version used less than half the data. The number that helps explain why is bitrate.

What is bitrate?

Bitrate is the number of bits of data a stream uses each second. You'll usually see it in kbps or Mbps: 1,500 kbps is 1.5 Mbps, or 1.5 million bits per second.

Bandwidth is different. It describes how much data a connection can carry per second. For video to play smoothly, its bitrate needs to stay below the available bandwidth.

Bitrate vs resolution and frame rate

Resolution tells you how many pixels are in each frame. Frame rate tells you how many frames appear each second. A 720p frame has 1280 by 720 pixels, and a video at 30 fps shows 30 frames each second.

Think of bitrate as a per-second data budget shared by those pixels and frames. At a fixed bitrate, adding more pixels or frames leaves fewer bits for each. When there are too few bits, the picture can look blocky.

That's why resolution alone doesn't tell you how good a video will look. In the comparison above, the 720p video used 1,442 kbps, while the 540p video used 642 kbps and appeared to be the same quality.

Codecs change the bitrate you need

A codec compresses video, storing each frame largely as changes from the one before it. The codec affects how much bitrate you need for a given picture.

VP8 and H264 are light on CPU. VP9 and AV1 offer better compression and can deliver sharper video over the same connection, but need more CPU.

Audio gives you a sense of scale. VideoSDK's standard speech preset uses about 24 kbps, while its balanced 720p video preset uses about 1,500 kbps.

Adaptive bitrate streaming

A streaming player can adjust when the available connection changes. The video is encoded ahead of time into versions called renditions, each with a set bitrate and resolution.

The player downloads short segments and keeps a buffer ahead. It can switch renditions as the connection changes. HLS and DASH are common formats for this kind of adaptive bitrate streaming.

Adaptive bitrate in video calls

A video call can't wait on a buffer, so it needs to adapt live. With simulcast, a sender publishes the same camera video in several layers at once, such as 720p, 360p and 180p.

An SFU, or selective forwarding unit, forwards a layer to each viewer without mixing the video. A viewer with a weak connection can receive a lighter layer without pulling everyone else down. Smaller video tiles can receive smaller layers.

Streaming switches between files made earlier. A call switches live layers for each viewer.

How VideoSDK handles it

VideoSDK's default camera track uses 720p at 30 fps and 1,500 kbps in BALANCED mode. Simulcast is on by default with three layers, and VideoSDK picks a layer for each viewer based on their connection and tile size. The app can also hear when the received layer changes through onVideoQualityChanged.

If a device can't encode the chosen codec or another participant can't decode it, VideoSDK switches that video to VP8.

Go deeper

Sign up for $20 free credit. No credit card required.

Top comments (0)