Whether preparing videos for web landing pages, Discord messaging, or email attachments, raw camera footage is far too heavy. Understanding bitrate control gives you predictable, high-quality results.
The 3 Factors That Determine Video File Size
A video file size is simply: `File Size = (Video Bitrate + Audio Bitrate) × Duration`. Frame resolution (such as 1080p or 4K) does not directly determine file size; rather, it determines how many pixels the bitrate is spread across.
How to Calculate the Target Bitrate for Limits
If you need a 60-second video to stay under a 20MB email cap:
- 20MB = 160 Megabits = 160,000 Kilobits.
- Divide 160,000 Kb by 60 seconds = ~2,600 Kbps total bandwidth.
- Allocate 128 Kbps for audio and ~2,400 Kbps for video.
Codecs: H.264 vs H.265 vs VP9
H.264 (AVC) remains the most universally compatible video codec in the world, playing natively on virtually every television, browser, and smartphone. Modern codecs like VP9 and AV1 offer 30% higher compression efficiency at equivalent bitrates.
Compressing Videos Directly in Your Browser
Using WebAssembly video encoders that run inside the browser, PDFixel allows you to compress MP4 and WebM videos without waiting for gigabytes of footage to upload to remote servers. Encoding happens on your own CPU, so a longer clip on a modest machine will take longer than it would on a dedicated server — the trade you get in return is that the footage never leaves your device.
Summary
By matching target bitrate to your video duration, you can reliably fit video clips into any file size constraint while keeping motion smooth and details clear.