Ch. 18 · Encoding Recipes and How to Decide

한국어日本語
7 min

Choosing a Preset: The Value That Trades Time for Size

In the x265 measurement at the same VMAF 90, slow was 73–87% of medium's size at 2.2–2.6× the CPU time. A preset buys 'smaller by taking longer', and the gain differs by video.

What a preset changes was explained as the RDO search range in the ffmpeg hands-on lesson. This time we look at the exchange rate of that trade using this site's measurements. All the numbers below come from the x265 preset measurement and are software x265 (libx265) results. They do not apply to hardware encoders.

Don't compare presets at the same CRF

Changing the preset changes the quality even at the same CRF. In the measurement, riverbed at CRF 28 was 11,919,505 B (VMAF 86.40) with medium and 12,704,159 B (VMAF 95.58) with slow. Slow is larger, but the quality is also much higher. That's why presets must be compared by size at the same VMAF.

Relative size at the same VMAF 90, with medium as 100%

Clipultrafastveryfastfastmediumslow
blue_sky124%122%97%100%81%
pedestrian_area129%113%105%100%87%
riverbed107%106%106%100%73%
rush_hour97%106%104%100%82%

Source: preset-speed-x265-v1. Estimates from log interpolation between the two measured points on either side of VMAF 90. The original notes that the 97% for rush_hour's ultrafast has low reliability.

CPU time multiple relative to medium at the same VMAF 90

Clipultrafastveryfastfastmediumslow
blue_sky0.42×0.69×0.97×1×2.58×
pedestrian_area0.31×0.59×0.74×1×2.48×
riverbed0.21×0.50×0.53×1×2.22×
rush_hour0.29×0.65×0.75×1×2.36×

Source: preset-speed-x265-v1. Based on CPU time used (utime). Absolute times are from one PC (6 cores, 4 threads, IDLE priority), so use only the multiples as a reference.

  • Slow was smaller than medium on all four clips. The savings were 13–27%, and it took 2.2–2.6× the CPU time.
  • Presets faster than medium generally produced larger files. Time went down (ultrafast at 0.21–0.42×), but in most cases the size went up.
  • Fast was closer to 'a slightly bigger file, much faster'. On three clips it was 4–6% bigger than medium at 0.53–0.75× the CPU time. The original notes, however, that this difference may be within the interpolation error.
  • The gain per unit of time differed by clip. Going from medium to slow, for each extra minute of CPU time the size dropped by about 24 percentage points on blue_sky and about 6.8 points on riverbed. The easier the video, the more quickly the same savings came (the original's conversion, based on 10 s clips, so it can't be carried over directly to long videos).

So how do you choose a preset?

  1. 1For a video you encode once and send many times (videos on your own site, archives), time is cheap, so slow is a candidate. Transfer and storage size keep shrinking.
  2. 2For a video you make once and are done with (a one-time share), saving time with medium or fast can be reasonable.
  3. 3If you don't know how long it will take, first calculate the expected time by duration, resolution, and preset with the encode time estimator. It is based on the measured speed of this site's PC, so you can enter your own PC's speed to adjust it.
A preset is not a quality setting

A slower preset does not give 'better quality'; it raises the chance of getting the same quality at a smaller size (in this measurement). The target quality is set by CRF or bitrate, and the preset decides how efficiently that target is reached. This measurement covers only x265; this site has no per-preset exchange rates for x264 or SVT-AV1.

utimeCPU time used

The time the process actually spent on the CPU. In this site's measurements, it is used for preset comparisons instead of elapsed time, which fluctuates under IDLE priority.

Same-VMAF comparisonSame-quality comparison

A way of comparing size or time at the point where each setting reaches the same VMAF, rather than at the same setting value such as CRF.

Check yourself

Which statement about slow versus medium at the same VMAF 90 in the x265 measurement is correct?

Check yourself

Why shouldn't you compare presets at the 'same CRF' when judging efficiency?