Tool

Video File Size & Bitrate Calculator

Answers the question “What bitrate do I need to fit this video into 10 MB?” Everything is calculated in your browser and nothing is uploaded.

Input

1 MB is counted as 1,000,000 bytes (smaller than 1,048,576, which errs on the side of staying under the limit). Service limits can change, so check the current limit of the service you are uploading to.

Result

1,138 kbps (video)

This is the total 1,267 kbps minus 128 kbps for audio. It accounts for a length of 60 s and a 5% margin.

Bits per pixel (bpp)
0.018
1080p25-equivalent bitrate
948 kbps

bpp = video bitrate ÷ (width × height × fps), with the width assumed from a 16:9 frame. The equivalent value is scaled to 1080p25 by assuming the same bits per pixel. It is an assumption, not a measurement.

Where this bitrate lands in our measurements (1080p25-equivalent 948 kbps)

Loading…

FFmpeg command

ffmpeg -y -i input.mp4 -vf scale=-2:1080 -r 30 -c:v libx264 -preset medium -b:v 1138k -pass 1 -an -f null NUL
ffmpeg -i input.mp4 -vf scale=-2:1080 -r 30 -c:v libx264 -preset medium -b:v 1138k -pass 2 -c:a aac -b:a 128k -movflags +faststart output.mp4

Replace input.mp4 with your actual file name. If the resolution and fps already match the source, you can drop the -vf·-r options. The first pass only analyzes and writes no output file; the second pass produces the result.

How is it calculated?

File size is roughly (video bitrate + audio bitrate) × duration. Solve that backwards and the target file size gives you the bitrate.

  • Video kbps = target size (bytes) × 8 × (1 − margin) ÷ duration (s) ÷ 1000 − audio kbps
  • The margin is a buffer for container overhead and for the encoder not hitting the target bitrate exactly. 5% is a starting point, not a guarantee.
  • Bits per pixel (bpp) lets you compare results at different resolutions and frame rates on the same scale.

How do I read the measured VMAF table?

Using the four 1080p25 clips (six CRF levels each) from our CRF size-vs-quality measurements, the table converts your settings to a 1080p25-equivalent bitrate and reads off the matching VMAF by connecting the measured points. The same bitrate gives very different VMAF on different clips, so pick the clip that looks most like your own video. A nearly static scene and a detail-heavy scene such as rippling water can end up far apart at the same file size.

How to use it

  • Discord or email attachments: enter a target size slightly below the limit and set the margin to 5–10%. Services can change their limits, so check the current limit yourself.
  • Deciding whether to lower the resolution: if the bitrate comes out too low, try one resolution step down and see how bpp changes. At the same bitrate, a lower resolution raises bpp.
  • Choosing an encoder: if compatibility comes first, use x264. If you want smaller files and the recipient can play the format, use x265 or SVT-AV1. You can check whether the receiving device can play it with the Codec Support Checker.
  • Verify the result: when encoding finishes, always check the actual file size. If it is over, lower the bitrate a little and run it again.

Limitations worth knowing

  • Because you specify an average bitrate, the file size can hit the target while quality varies from scene to scene. High-motion sections lose more quality.
  • The measurements come from four 10-second 1080p25 8-bit clips in CRF mode. There is no guarantee they match the average-bitrate (2-pass) results this tool produces, and conversion to other resolutions is an assumption.
  • The SVT-AV1 command is 1-pass average bitrate, so the size error can be larger.
  • Audio is assumed to be AAC, and the size of subtitles and metadata beyond video and audio is not calculated separately.
  • The commands use -preset medium (6 for SVT-AV1). Changing the preset changes both quality and encoding time at the same bitrate.

Learn more

Why bitrate and quality relate this way is covered in the course, and the per-encoder curves are in the lab article.