Guide

How to Reduce Video File Size: Lossless Shrinking Isn't Possible, So Here's What Works and in What Order

Re-encoding is lossy compression, so shrinking a video with no quality loss doesn't hold up. Instead, this guide lays out where the savings come from (audio, CRF, codec, resolution, frame rate) using this site's measurements and calculations, and leads into the size prediction tools.

The short answer

  • Re-encoding a video to shrink it always costs at least a little quality. Re-encoding is lossy compression, so “smaller with no quality loss” doesn’t hold up. The realistic goal is to cut only as much as won’t be noticeable.
  • The only way to leave quality untouched is to copy the video as is and trim other tracks such as audio and subtitles, and the savings from that are small.
  • For shrinking the video itself, the biggest effects we confirmed came from raising CRF and switching codecs. In this site’s measurements, raising x264 CRF by 4 cut the bitrate to about 58–63%, but the quality drop varied widely by clip, from 1.7 to 13.9 points.
  • The numbers below come from four 10-second 1080p clips, 8-bit, on one PC. They are not results for your video, just an example of how far things can spread.

Where the savings come from, at a glance

A video file’s size is roughly (video bitrate + audio bitrate) × duration. So the only ways to shrink it are to lower the bitrate or shorten the duration, and every method below is a way of lowering the bitrate.

MethodEffect on qualityHow much it savesBasis
Trim audioVideo quality unchanged (audio may be lossy)As much as the audio bitrate. Small compared with the video bitrateCalculation (below)
Raise CRFGoes down. The amount varies a lot by videoBitrate 58–63% at x264 CRF +4Measured: crf-by-content-v1
Switch codec (x264 → SVT-AV1)Similar at the same VMAF41–63% of x264's size at the same VMAFMeasured: crf-sweep-v1
Lower resolutionSharpness goes downPixel count drops proportionally, but file size has to be measured separatelyCalculation only, not measured
Lower frame rateMotion looks less smoothFrame count drops proportionally, but file size has to be measured separatelyCalculation only, not measured

1. Audio: the only way to shrink without touching quality

If you copy the video stream as is (-c:v copy), video quality doesn’t change. You shrink the file by re-encoding the audio or by dropping audio and subtitle tracks you don’t need. The effect is limited, though, because video usually takes up far more of the file. For example, the blue_sky x264 CRF 26 video bitrate in this site’s measurements is 3,322.0 kbps, so if the audio is 128 kbps (an example value), it is about 3.7% of the total. Even removing the audio entirely saves only about that much.

ffmpeg -i input.mp4 -c:v copy -c:a aac -b:a 96k output.mp4

If the source audio is already at a low bitrate, re-encoding it gains nothing. For the command options, see the FFmpeg cheat sheet.

2. Raising CRF: big savings, but the quality drop differs by video

Raising CRF lowers the encoder’s quality target, which lowers the bitrate. Here are the x264 medium results going from CRF 26 to 30 in this site’s measurements (file size and quality by content type). The bitrate ratios are calculated from the kbps in the table.

Clipkbps (CRF 26 → 30)Bitrate ratioMean VMAF (26 → 30)
blue_sky3,322.0 → 1,916.7about 58%99.94 → 98.22
pedestrian_area3,142.9 → 1,981.2about 63%92.48 → 84.21
riverbed14,654.1 → 9,188.1about 63%95.24 → 81.34
rush_hour2,954.7 → 1,778.7about 60%88.42 → 80.57

The size reduction was similar across the four clips, but quality dropped by 1.7 points for blue_sky and 13.9 points for riverbed. So how far you can raise CRF is something to check with your own video. Starting points and the order of adjustment are covered in How to Pick a CRF Value. Also, re-encoding a video that has already been compressed once cuts quality one more time relative to the original.

The rule of thumb “raise CRF by 6 and the file halves” was roughly right for x264 and x265, leaving about 40–47% on average across the whole range, but individual steps ranged from 26% to 58%. For SVT-AV1 and VP9, the same +6 cut the size only to about 57–67% (size and VMAF change per CRF step). Also, a faster x264 preset needed more bytes for the same VMAF 90 (veryfast was 106–155% of medium), while slow only got down to 95–98% of medium (x264 preset measurement).

3. Switching codecs: smaller at the same quality

In the crf-sweep measurements, SVT-AV1 (preset 6) came in at 41–63% of x264’s file size at the same VMAF as x264 medium (comparing the nearest measured points, four clips). Conversely, switching to a less efficient codec, such as HEVC to H.264, can make the file bigger at the same VMAF. For how many times larger or smaller your file gets with your own codec combination, the re-encode size predictor reads it from the public measurements. On the other hand, some devices can’t play AV1, so check the recipient’s setup first with codec support check. The selection criteria are in the codec choice guide.

4. Resolution and frame rate: easy to calculate, but not something this site measured

Lowering 1080p (1920×1080) to 720p (1280×720) takes the pixel count from 2,073,600 to 921,600, about 44%. Lowering 30 fps to 24 fps brings the frames per second to 80%. But that doesn’t mean the file size becomes 44% or 80%. Encoders work toward a bitrate target, so file size depends on your settings and the content, and this site did not measure how file size changes with resolution or frame rate. Both methods directly cost you sharpness or smoothness, so it’s safer to use them last, when the CRF and codec methods above aren’t enough.

ffmpeg -i input.mp4 -vf scale=-2:720 -c:v libx264 -preset medium -crf 24 -c:a copy output.mp4

The CRF 24 in the example is only a starting point, so check the result by eye. If your video has a variable frame rate (VFR), it’s best to check it first with the VFR detector.

5. If you have a target file size

When there’s a size limit such as “under 10 MB”, it makes more sense to calculate a target bitrate than to use CRF. Enter the duration and target size in the video file size and bitrate calculator and it generates the bitrate you need and an FFmpeg command, and it also shows the VMAF at that bitrate from the measured data. If the bitrate comes out too low, consider trimming the duration or lowering the resolution as well.

Checking that the shrunk result is good enough

  • Zoom in on high-motion scenes and dark areas and look with your own eyes. Even with a high average score, some frames can be bad (bottom-5% and minimum VMAF measurements).
  • If you measured VMAF, enter the mean, bottom 5% and minimum into the VMAF score interpreter to see what they mean. It also shows measured x264, x265 and SVT-AV1 samples in the same score range.
  • Don’t delete the original until you’ve checked the result. Re-encoding can’t be undone.

Limits of this guide

  • The clips are four 10-second clips, 8-bit. Animation, screen recordings, dark footage, 10-bit, HDR and 4K were not measured.
  • File size changes from resolution, frame rate and audio changes were not measured, so only figures that can be calculated are included. The 128 kbps audio is an example value for the calculation.
  • The same mean VMAF doesn’t guarantee the same quality to the human eye. Make the final call by watching your own video.

Frequently asked questions

Can I shrink a video with no quality loss?

Re-encoding is lossy compression, so shrinking a video with no quality loss doesn't hold up. The only way to leave the picture untouched is to copy the video as it is (-c:v copy) and tidy up other tracks such as audio and subtitles, and the savings from that are small.

How much smaller does raising CRF make the file, and how much quality does it cost?

In this site's measurements (four 10-second 1080p clips, 8-bit), raising x264 medium from CRF 26 to 30 cut the bitrate to about 58–63%. The mean VMAF drop, though, varied widely by video, from 1.7 points for blue_sky to 13.9 for riverbed. How far you can raise it has to be checked on your own video.

How much smaller does switching codecs make it?

In the crf-sweep measurement, SVT-AV1 (preset 6) came out at 41–63% of x264's size at the same VMAF as x264 medium (nearest measured points compared, four clips). Some devices can't play AV1, though, so check the receiving side first.

If I lower the resolution or frame rate, does the file shrink by the same ratio?

Going from 1080p to 720p leaves about 44% of the pixels, and going from 30 fps to 24 fps leaves 80% of the frames per second, but that is not the same as the file size ratio. This site did not measure how file size changes with resolution or frame rate.

What if I have a target size, such as "under 10 MB"?

It's better to calculate a target bitrate instead of using CRF. Enter the length and target size into the video size and bitrate calculator and it produces the bitrate you need and an FFmpeg command. If the bitrate comes out too low, also consider trimming the length or lowering the resolution.