Tool

Will Re-encoding Shrink My Video? Codec Switch File Size Predictor

Whether you are converting an x265 video to x264 for compatibility or shrinking an H.264 video to AV1, get a feel for the resulting file size before you start. Enter the source codec, the target codec and the file size, and the tool reads the bitrate multiplier needed for the same quality (VMAF) from our measurements. All calculation happens inside this browser.

1. The file you have

2. Quality target for the re-encode

Reads the ratio of the bitrates the two codecs need to reach the same VMAF. VMAF is a 0–100 score of how similar a video looks to the original.

3. Predicted result (from our measurements)

Loading…

Note: these values are the ratios for “encoding from a clean source with each codec for the first time.” We did not measure re-compressing an already-compressed file (generation loss), and we don't know what VMAF level your source file actually has. Compressing it once more leaves quality the same as or worse than the source.

Ratios come from our CRF measurements (1080p25, four 10-second clips, x264 and x265 at preset medium, SVT-AV1 preset 6), read between the measured points on a log scale. All calculation happens inside this browser and nothing is sent anywhere.

How is it calculated?

In our CRF size-vs-quality measurements, four clips were encoded with x264, x265 and SVT-AV1 at six CRF levels each, and VMAF was measured. For the VMAF you pick, this tool reads the bitrate each codec needs on each clip and uses (target codec bitrate) ÷ (source codec bitrate) as the multiplier. Multiplying that by the source file size you entered gives the “predicted size.” The multiplier differs from clip to clip, so it is not lumped into one number: you get it per clip, and as a min–max range.

How to read the result

  • A multiplier below 1 means a smaller file at the same quality, and above 1 means a bigger one. Swapping the direction (x265→x264 and x264→x265) gives nearly reciprocal values. Be aware that converting HEVC to H.264 for compatibility is the direction where the file gets bigger.
  • The quality target is how similar the result has to be to the (clean) source. Changing the target changes the multiplier, so click through 90, 93 and 95 to see how much it moves.
  • Clips marked as outside the measured range were left out because one of the two codecs has no measured point at that VMAF. The tool does not estimate to fill the gap.

How to use it

  • Check before converting for compatibility: before converting HEVC or AV1 to H.264 for a device that can’t play it, see how many times bigger the file gets and make sure you have enough storage. To see which codecs a device plays, use the Codec Support Checker.
  • Judge before shrinking a file: if the multiplier for H.264 → HEVC or AV1 doesn’t drop by much, consider whether the encoding time and the quality loss are worth it. You can read a file’s codec and bitrate in the Video File Info Viewer.
  • Next step: once you have decided to convert, get a CRF for your target quality from the CRF Recommender and build the command with the FFmpeg Command Builder. To start from your camera bitrate and plan storage, continue with the 4K Video Storage Planner.

Limitations worth knowing

  • The multiplier compares the first encode from a clean (near-uncompressed) source with each codec. We did not measure “re-encoding” itself, that is, compressing an already-compressed file again. Quality that has already been lost does not come back, so a re-encoded result is the same as or worse than the source file. To make it look the same you would have to set a higher target, and the file can then be bigger than this tool’s value.
  • The measurements are results for 1080p25, four 10-second clips, 8-bit, on a single PC, with x264 and x265 at preset medium and SVT-AV1 at preset 6. With other presets, other resolutions, 10-bit, HDR or 60 fps, the multiplier can differ.
  • The file size is multiplied as is, on the assumption that the video bitrate makes up most of it. Audio, subtitles and metadata are not calculated separately.
  • A source made by a camera or smartphone hardware encoder may have different efficiency from x264 and x265, so the real multiplier against your source can differ from the table.