Bitrate calculator for audio and video
Plan an encode by working backwards from a target file size. Enter the size you want, the clip duration and the audio bitrate, and the tool returns the total bitrate plus the video bitrate to set — ideal for two-pass encoding to a disc, an upload limit or a streaming budget.
How it works
The target size is converted to bytes (MB and GB are treated as binary units — 1 MB = 1,048,576 bytes), then to bits by multiplying by 8. Dividing by the total duration in seconds and by 1000 gives the total bitrate in kilobits per second (kbps):
total kbps = (size in bytes × 8) ÷ 1000 ÷ duration in seconds
The video bitrate is then the total minus the audio bitrate you entered, since the container holds both streams and their combined data must fit within the budget.
Worked example
Fit 700 MB into a 90-minute clip with 128 kbps audio:
- Size = 700 × 1024 × 1024 = 734,003,200 bytes → 5,872,025,600 bits
- Duration = 90 × 60 = 5,400 seconds
- Total = 5,872,025,600 ÷ 1000 ÷ 5,400 ≈ 1,087 kbps
- Video = 1,087 − 128 ≈ 959 kbps
| Target | Duration | Audio bitrate | Total bitrate | Video bitrate |
|---|---|---|---|---|
| 700 MB | 90 min | 128 kbps | ≈1,087 kbps | ≈959 kbps |
| 1 GB | 60 min | 192 kbps | ≈2,340 kbps | ≈2,148 kbps |
| 4 GB | 120 min | 320 kbps | ≈4,681 kbps | ≈4,361 kbps |
Choosing an audio bitrate
The audio bitrate you enter subtracts directly from the video budget, so set it realistically before reading the video figure:
- 64–96 kbps AAC or Opus — acceptable for speech and podcasts.
- 128 kbps AAC or MP3 — the standard for general music and dialogue.
- 192–256 kbps AAC / MP3 / Opus — near-transparent for most listeners.
- 320 kbps MP3 / 256 kbps AAC — the practical ceiling for lossy audio.
For Dolby 5.1 or 7.1 mixes, use the sum of all channels (for example, 6 × 64 = 384 kbps for AC-3 at 64 kbps per channel).
Two-pass versus constant quality
This calculator gives you an average bitrate target, which is exactly what
two-pass (VBR target-bitrate) encoding uses to hit a precise file size. Encoders
like FFmpeg accept this with -b:v 959k -pass 1 and -b:v 959k -pass 2.
If you encode with constant quality (CRF in x264/x265/libvpx), the file size is not directly predictable and this calculator does not apply — CRF encoding varies bitrate dynamically based on scene complexity rather than targeting a fixed size. Use CRF when quality matters more than hitting an exact file size; use two-pass target-bitrate when you need to fit a container, a download limit, or a streaming budget exactly.
If the calculated video bitrate comes out negative or near zero, your target file size is too small for the duration at the audio bitrate you chose. Raise the target size, lower the audio bitrate, or shorten the clip.
Everything runs locally in your browser — no files or data are uploaded.