---
title: "Video Bitrate: What It Is and How to Choose One - CE.SDK Glossary"
description: "Bitrate is how many bits a video uses each second. See how kbps and Mbps relate to file size, when to use CBR or VBR, and how CE.SDK sets the bitrate."
url: "https://img.ly/glossary/bitrate/"
type: "page"
---

> This is the markdown version of [Video Bitrate: What It Is and How to Choose One - CE.SDK Glossary](https://img.ly/glossary/bitrate/). For all pages in one file, see [llms-full.txt](https://img.ly/llms-full.txt). For an index of all available pages, see [llms.txt](https://img.ly/llms.txt).

---

# Bitrate

## What Is Bitrate?

Bitrate is the amount of data a video uses for each second of playback, counted in bits per second. Video rates are usually given in kilobits per second (kbps, thousands of bits) or megabits per second (Mbps, millions of bits).

Bits are not bytes. A byte holds eight bits, so a video at 8 Mbps fills 1 MB for every second it plays, and a file's average bitrate is its size in bits divided by its length in seconds. The [video compression](https://img.ly/glossary/video-compression.md) page uses that to estimate a file's size before export.

For a [lossy encoder](https://img.ly/glossary/lossy-vs-lossless.md), the bitrate is a target. More bits per second let it keep more detail, while too few show up as blurred texture and visible block edges. How many a video needs depends on its resolution, [frame rate](https://img.ly/glossary/24fps-vs-30fps.md), amount of motion and [codec](https://img.ly/glossary/video-codec.md).

## What Is the Difference Between CBR and VBR?

They are two ways for an encoder to spend a bitrate. A third way skips the bitrate and holds a quality level instead.

### Constant bitrate holds the rate steady

With CBR the encoder keeps close to the same number of bits every second, whatever the picture does. A calm shot gets more data than it needs and a busy one less, but the steady rate is what live streaming platforms ask for.

### Variable bitrate follows the picture

With VBR the encoder spends more bits on detailed, fast scenes and fewer on simple ones, while the whole file averages out at the target. It is the default mode of the browser's video encoder, and the file size still follows from the average.

### Constant quality ignores the bitrate

In a quality mode the encoder holds a level of detail and lets the bitrate rise and fall with the content. The picture stays even from scene to scene, and the file size is known only once the encode finishes.

### Follow a video's bitrate second by second

Play the clip, or pick a second on the trace, to see how many bits its video track used there.

The clip is a 7-second screen recording with no sound, encoded with x264 in its constant quality mode (CRF 26). Its video track used this many bits in each second:

- 0 to 1 s: 459 kbps (57,400 bytes from 0 to 1 s)

- 1 to 2 s: 203 kbps (25,333 bytes from 1 to 2 s)

- 2 to 3 s: 122 kbps (15,309 bytes from 2 to 3 s)

- 3 to 4 s: 627 kbps (78,366 bytes from 3 to 4 s)

- 4 to 5 s: 607 kbps (75,845 bytes from 4 to 5 s)

- 5 to 6 s: 275 kbps (34,394 bytes from 5 to 6 s)

- 6 to 7 s: 151 kbps (18,847 bytes from 6 to 7 s)

- 7 to 7.27 s: 108 kbps (3,615 bytes from 7 to 7.27 s)

The video track averages 340 kbps (309,109 bytes over 7.27 s). The first second is high partly because it opens with the clip's only key frame, and the last item covers less than a second.

## Why Does One Video Have Several Right Bitrates?

The job sets the number as much as the resolution does. Here is the same 1080p video at 30 fps in three published recommendations, one for uploading, one for streaming live and one for delivery to viewers.

**8 Mbps** YouTube upload — encoded at a variable bitrate | **14 Mbps** YouTube live stream in H.264 — sent at a constant bitrate | **6 to 7.8 Mbps** Apple's HLS streaming ladder — its two 1080p H.264 versions

## Which Bitrate Mode Should You Use?

The right mode depends on what happens to the file after export. A conference app, for example, can stream its talks live at a constant bitrate and export the recordings attendees download at a variable one.

- **Videos people download or keep**: Use: Variable bitrate around a target, Why: Bits go where the picture needs them, and YouTube asks for VBR on uploads

- **Live streams to a platform**: Use: Constant bitrate at the platform's number, Why: YouTube's live settings ask for CBR at a set figure per resolution

- **Master copies for later editing**: Use: Constant quality, Why: Every scene keeps the same detail, and MDN's archiving example uses a quality setting

- **Video for many devices and networks**: Use: Several bitrates of the same video, Why: The player switches between them as the connection changes, and Apple requires several for HLS

## How Bitrate Works in CE.SDK

When your users export from [CE.SDK's video editor](https://img.ly/products/video-sdk.md), your app sets the bitrate through `videoBitrate`, which takes an exact figure or one of two named modes. The same option applies to [MP4 and WebM](https://img.ly/glossary/webm-vs-mp4.md) exports. To meet an upload limit, read the video's length, take off the audio and divide, as in the code below, or try figures first in the [video compression calculator](https://img.ly/glossary/video-compression.md).

### Auto picks a rate from size and frame rate

At 30 fps, `'Auto'` gives 5 Mbps for 720p, 8 Mbps for 1080p and 40 Mbps for 4K, the same on every platform. CE.SDK's docs recommend it for exports in the browser. It reads the size and frame rate of the export itself, so a 1080p page exported with `targetWidth: 1280` and `targetHeight: 720` gets 5 Mbps at 30 fps. Without a `framerate` option, the export uses the scene's frame rate, which is 30 fps in a new scene.

### The default, System, depends on the platform

In the browser, `'System'` lets the browser's encoder choose, and CE.SDK's docs warn that some browsers pick a rate so high that a long export runs out of memory. On iOS, Apple's VideoToolbox decides, and on Android it uses the same formula as Auto.

### A number sets an exact target

Pass bits per second, such as `8_000_000` for 8 Mbps, when the file has to meet a platform's figure or fit a size limit. CE.SDK's compress guide suggests 2 Mbps for video on the web and 8 Mbps for HD downloads. A negative number is rejected, and `0` means the default.

### Audio has a bitrate of its own

Leave `audioBitrate` at `0` and CE.SDK picks 128 kbps for stereo. Chrome and Edge on Windows encode [AAC](https://img.ly/glossary/aac-vs-mp3.md) only at 96, 128, 160 or 192 kbps, and any other value fails the export there. In our test exports, that track always ran at a [sample rate](https://img.ly/glossary/sample-rate.md) of 48 kHz.

**Fit an export under a size limit**

```typescript
const limitBytes = 25_000_000; // a 25 MB upload limit
const seconds = engine.block.getDuration(page);
const audioBitrate = 128_000;
// Keep 5% back for the MP4's container data and its cover image.
const videoBitrate = Math.floor(
  (limitBytes * 8 * 0.95) / seconds - audioBitrate
);
const blob = await engine.block.exportVideo(page, {
  mimeType: 'video/mp4',
  videoBitrate,
  audioBitrate
});
if (blob.size > limitBytes) {
  // Lower the bitrate or the output size, then export again.
}
```

[Export to MP4 guide](https://img.ly/docs/cesdk/js/export-save-publish/export/to-mp4-c998a8.md)

## FAQs

### Bitrate

**Q: Does 60 fps video need twice the bitrate of 30 fps?**

A: No. For 1080p uploads, YouTube suggests 8 Mbps up to 30 fps, rising to 12 Mbps from 48 fps up, so twice the frames get about one and a half times the data. CE.SDK's Auto mode uses the same two figures.

**Q: What is the difference between average and peak bitrate?**

A: A file encoded at a variable bitrate has one average over its whole length and short stretches that run well above it, the peaks. Streaming specs limit both: Apple's HLS authoring spec asks that the peak of an on-demand video stay within twice its average.

**Q: What audio bitrate should a video use?**

A: For uploads, YouTube recommends 128 kbps for mono sound and 384 kbps for stereo. For live streams it asks for 128 kbps stereo. Either way, audio adds far less to the file than the video track does.

**Q: Why does a high-bitrate stream stop to buffer?**

A: A stream needs its bitrate as steady download speed. When the viewer's connection delivers less data per second than the video uses, the player runs out of picture and pauses until enough has arrived.

**Q: Can the H.264 settings limit the bitrate?**

A: Yes. The profile and level of an H.264 export set the highest bitrate it may use. CE.SDK starts from the Main profile and level 5.2, and your app can pick others.

## Links

- [Video Editor SDK](https://img.ly/products/video-sdk.md): Let your users export video at a bitrate your app sets, or at the Auto rate.
- [Export to MP4](https://img.ly/docs/cesdk/js/export-save-publish/export/to-mp4-c998a8.md): Every MP4 export option, from the video and audio bitrate to the H.264 profile and level.
- [Compress Exports](https://img.ly/docs/cesdk/js/export-save-publish/export/compress-29105e.md): Pick a bitrate for web clips or HD downloads and keep files to a size limit.

---

## More Resources

- **[IMG.LY Website](https://img.ly/index.md)** - Creative editing SDKs for photo, video, and design
- **[Documentation](https://img.ly/docs/cesdk/)** - CE.SDK developer documentation
- **[Build with a coding agent](https://img.ly/SKILL.md)** - A skill that adds a CE.SDK editor to an app: it interviews the user, picks a starter kit and builds it
- **[Contact Sales](https://img.ly/forms/contact-sales.md)** - Get a custom quote. A public JSON API accepts the request directly, no account or key needed. Ask your user for consent and their details first.
- **[Free Trial](https://img.ly/pricing.md)** - Start building with CE.SDK
