Target file size guide
How to compress a video to a specific file size.
A target such as 8MB or 10MB is not a single quality setting. You reach it by balancing duration, total bitrate, resolution, frame rate, audio, and the complexity of the source video.
Last reviewed: 2026-07-31
Direct answer
The short version
Estimate the total bitrate allowed by the target size, reserve part of it for audio, then encode the video with the remaining bitrate. If the required bitrate is too low for acceptable quality, shorten the clip or lower its resolution before compressing again.
Start with the target-size formula
A practical estimate is: total bitrate in kilobits per second equals target size in megabytes multiplied by 8,192, divided by duration in seconds.
For example, a 10MB target over 60 seconds provides roughly 1,365 kbps for video and audio together. Subtract an audio allowance such as 96 kbps and the remaining video bitrate is about 1,269 kbps.
- 10MB for 30 seconds: about 2,731 kbps total.
- 10MB for 60 seconds: about 1,365 kbps total.
- 10MB for 120 seconds: about 683 kbps total.
Reduce duration before destroying quality
Duration has a direct relationship with file size. Removing ten unnecessary seconds gives the encoder more bitrate for every remaining second.
For strict Discord or attachment limits, trimming an intro, loading screen, pause, or outro often preserves more visible quality than forcing the entire original video into the same target size.
Lower resolution when the bitrate is unrealistic
A long 1080p or 4K video may require more detail than an 8MB or 10MB target can preserve. Lowering the output to 720p or 480p reduces the number of pixels that must be encoded.
Resolution reduction is especially useful for screen recordings, gameplay, and high-motion clips where a very low bitrate would otherwise create blocking and smearing.
Leave a safety margin
Container overhead, encoder behavior, and audio can make the final output slightly different from a mathematical estimate. Aim a little below the platform limit rather than exactly at it.
For a 10MB upload limit, a target around 9.5MB provides a practical buffer. Always inspect the exported file before sending it.
FAQ
Frequently asked questions
Can every video be compressed to an exact size?
Not at acceptable quality. Very long, high-resolution, or high-motion videos may need trimming or lower resolution before they can fit a strict target.
Why is the final file larger than the estimate?
Audio bitrate, container overhead, variable bitrate behavior, and encoder implementation can move the final size above or below the estimate.
Should I lower bitrate or resolution first?
Start with a reasonable bitrate. If the required bitrate is too low to preserve detail, reduce resolution or duration rather than continuing to lower bitrate alone.
Is two-pass encoding more accurate?
Two-pass encoding can allocate bitrate more efficiently and approach a size target more consistently, but it takes longer and is not available in every browser workflow.
Next step