A 30-second video can be 5 MB or 500 MB depending on its bitrate. Bitrate is the amount of data used per second of video, measured in megabits per second (Mbps) or kilobits per second (kbps).
The formula is simple: File Size (MB) = Bitrate (Mbps) x Duration (seconds) / 8.
A video at 10 Mbps for 30 seconds: 10 x 30 / 8 = 37.5 MB. A video at 50 Mbps for 30 seconds: 50 x 30 / 8 = 187.5 MB. A video at 2 Mbps for 30 seconds: 2 x 30 / 8 = 7.5 MB.
The bitrate directly determines the file size. Everything else (resolution, frame rate, codec) influences what bitrate is needed to maintain a given quality level, but the bitrate is what determines the actual bytes on disk.
What determines the bitrate
Recording device settings: Phones and cameras have quality settings that map to bitrate ranges. iPhone in "High Efficiency" mode records 1080p at approximately 24 Mbps. In "Most Compatible" mode, it records at approximately 36 Mbps. Professional cameras can record at 100-400 Mbps.
Resolution: Higher resolution requires more bitrate to maintain the same perceived quality. 4K video needs roughly 4x the bitrate of 1080p video for equivalent quality. This is why 4K files are so much larger.
Frame rate: 60fps video has twice as many frames as 30fps, requiring roughly 50% more bitrate (not double, because temporal compression leverages inter-frame similarity).
Content complexity: A talking head against a plain background compresses well (low bitrate, small files). An action scene with rapid motion, explosions, and complex textures compresses poorly (high bitrate, large files). The encoder needs more bits to represent visual complexity.
Codec efficiency: H.265 achieves the same quality as H.264 at roughly 40-50% lower bitrate. AV1 achieves the same quality at roughly 30% lower bitrate than H.265. Newer codecs produce smaller files at the same quality.
Bitrate recommendations by platform
YouTube recommends: - 1080p 30fps: 8 Mbps - 1080p 60fps: 12 Mbps - 4K 30fps: 35-45 Mbps - 4K 60fps: 53-68 Mbps
Instagram/TikTok: 3.5-5 Mbps for 1080p is sufficient since the platform re-encodes aggressively.
Vimeo recommends: - 1080p: 10-20 Mbps - 4K: 30-60 Mbps
For personal use and sharing: 5-8 Mbps for 1080p is a good balance between quality and file size.
Variable bitrate vs. constant bitrate
Constant Bitrate (CBR): Every second uses the same amount of data. Simple scenes waste bits. Complex scenes may not have enough bits. Used for streaming where consistent bandwidth usage matters.
Variable Bitrate (VBR): The encoder allocates more bits to complex scenes and fewer bits to simple scenes. Better quality per byte. Produces smaller files at the same perceived quality. Used for file-based delivery (downloads, email, local playback).
CRF encoding (used by modern browser tools like MediaBrew) is a form of VBR that targets a constant perceived quality level, letting the bitrate fluctuate naturally so complex scenes get sufficient data while static scenes stay compact. Processing executes on-device via FFmpeg WebAssembly.