x265 frame-threads and WPP Benchmarked: How Much Do Parallelism Settings Change Speed at 4 Threads, and Do They Cost File Size or Quality?
We encoded four 10-second 1080p25 clips with x265 medium at CRF 22, 28, 34, and 40, and measured how much frame-threads 1, 2, and 4, WPP off, and minimum parallelism (frame-threads=1 + WPP off) change time, CPU utilization, file size, and VMAF compared with the default (automatic frame-threads, WPP on). frame-threads 2 and 4 gave exactly the same file size and VMAF as the default, and frame-threads=1 was nearly the same, with size changes of −0.24% to +0.15%. Turning WPP off made files smaller at the same CRF in 15 cells (−0.07% to −3.40%) with VMAF the same or higher in 15 cells, but wall-clock time went up to 1.82×, and with minimum parallelism it took 1.96–4.42× as long.
The test PC, FFmpeg and VMAF settings shared by every lab article are collected on the methodology page. Methodology (common to all tests)
With x265 medium at 4 threads, reducing parallelism actually gave a small gain in file size and quality; the price was time. frame-threads 2 and 4 matched the default in file size and VMAF in all 16 cells, and frame-threads=1 changed size by −0.24% to +0.15% and mean VMAF by −0.091 to +0.050, which is directionless wobble (wall-clock time was longer in all 16 cells: 1.03–1.43×). Turning WPP off, on the other hand, saved more size the higher the CRF (−0.90% to −3.40% at CRF 40). In the same-VMAF comparison (interpolated), CRF 40 came out at −1.5% to −6.9%. Time was 0.99–1.82× with WPP off and 1.96–4.42× with minimum parallelism, and CPU utilization (utime ÷ rtime) fell from 3.8–3.9 for the default (at CRF 28) to 1.1–1.4. However, the size gain is at most about 3.4%, so on this PC with these settings the cost in slowdown is larger.
Why this matters
To use many cores, x265 combines two techniques: encoding several frames at once (frame-threads) and splitting a single frame into rows that are processed in a staggered pattern (WPP, Wavefront Parallel Processing). Community lore says things like "frame-threads=1 compresses slightly better but is slow" and "WPP gives up a little compression efficiency in exchange for parallelism." This article checks whether that holds in this PC's data and, if so, how much slower it gets and how much size and quality you gain, using two methods: same CRF and same VMAF. How fully different codecs and presets fill the CPU is covered in the thread utilization measurements; this article stays inside x265 and changes only its parallelism options.
Every encode command has pools=4 (4 threads per job) fixed, so changes in thread pool size are not covered here. Raising the pool to 8 or 12 could change the results. Also, the processes ran at IDLE priority, so wall-clock time (rtime) swings a lot depending on other workloads. That is why time should only be compared within the same clip, and section 2 below first shows how much time varied even between settings that produced identical output.
Test method
VMAF is a quality metric from Netflix that compares the original and the encoded video frame by frame and scores it from 0 to 100. The "mean VMAF" in this article is vmaf_mean in the CSV, and "bottom 5%" is vmaf_p5. For how to interpret the scores, see the VMAF bottom 5% measurements.
The six settings and their commands
The baseline is the default with no parallelism options (the medium entry in the CSV preset column). The other five change only the parallelism option relative to the baseline. The meanings of frame-threads and WPP follow what is known from the x265 documentation; we did not check in this experiment how many frame threads the default actually picks.
Input and output paths are omitted. 22, 28, 34, and 40 were each substituted for Q.
Whether each option actually took effect was checked from the results. frame-threads=1 and WPP off produced file sizes different from the baseline (item 1 below), and turning WPP off or using minimum parallelism clearly lowered CPU utilization (item 3 below). frame-threads=2 and 4, on the other hand, matched the baseline in file size and VMAF in all 16 cells, so all we can say is that these values behaved the same as the default; this data cannot tell us how many threads actually ran internally.
Test clip sources and licenses
All four clips are 1080p25 video made by TUM / Taurus Media Technik (2001), downloaded from the Xiph.org derf collection (media.xiph.org/video/derf/y4m/). The accompanying ReadMe_1080p.txt states "Restrictions of use: No restrictions" and "Copyright: No Copyright" (checked 2026-11-08).
Per-clip results (raw data)
In the curves, the x-axis is bitrate and the y-axis is VMAF. All six settings are on one graph, but their size and VMAF nearly coincide, so the lines look stacked on top of each other. Check the differences in the tables under "How to read it and what we observed" below. The tables include size, VMAF, and time for every CRF. For blue_sky at CRF 22, VMAF saturates above 99.9, so the scores are the same.
blue_sky — blue sky and tree branches
| Encoder | Quality | Bitrate | VMAF mean | VMAF 5th pct | PSNR-Y | Encode fps | CPU time (s) |
|---|---|---|---|---|---|---|---|
| x265 (HEVC) · preset medium | 22 | 6,348.2 kbps | 99.98 | 100.00 | 41.14 | 14.82 | 64.9 |
| x265 (HEVC) · preset medium+ft1 | 22 | 6,347.2 kbps | 99.98 | 100.00 | 41.14 | 13.47 | 62.8 |
| x265 (HEVC) · preset medium+ft2 | 22 | 6,348.2 kbps | 99.98 | 100.00 | 41.14 | 15.89 | 61.2 |
| x265 (HEVC) · preset medium+ft4 | 22 | 6,348.2 kbps | 99.98 | 100.00 | 41.14 | 14.47 | 66.1 |
| x265 (HEVC) · preset medium+nowpp | 22 | 6,354.6 kbps | 99.98 | 100.00 | 41.15 | 8.15 | 64.7 |
| x265 (HEVC) · preset medium+ft1nowpp | 22 | 6,346.2 kbps | 99.98 | 100.00 | 41.15 | 5.46 | 57.0 |
| x265 (HEVC) · preset medium | 28 | 2,481.5 kbps | 99.43 | 96.32 | 38.45 | 22.76 | 42.0 |
| x265 (HEVC) · preset medium+ft1 | 28 | 2,480.1 kbps | 99.42 | 96.16 | 38.45 | 20.42 | 41.8 |
| x265 (HEVC) · preset medium+ft2 | 28 | 2,481.5 kbps | 99.43 | 96.32 | 38.45 | 22.86 | 41.5 |
| x265 (HEVC) · preset medium+ft4 | 28 | 2,481.5 kbps | 99.43 | 96.32 | 38.45 | 20.45 | 44.1 |
| x265 (HEVC) · preset medium+nowpp | 28 | 2,474.6 kbps | 99.45 | 96.44 | 38.46 | 12.6 | 43.3 |
| x265 (HEVC) · preset medium+ft1nowpp | 28 | 2,475.3 kbps | 99.45 | 96.40 | 38.46 | 8.96 | 39.2 |
| x265 (HEVC) · preset medium | 34 | 1,077.3 kbps | 92.23 | 83.51 | 35.25 | 27.71 | 33.1 |
| x265 (HEVC) · preset medium+ft1 | 34 | 1,077.1 kbps | 92.15 | 83.71 | 35.24 | 26.28 | 33.1 |
| x265 (HEVC) · preset medium+ft2 | 34 | 1,077.3 kbps | 92.23 | 83.51 | 35.25 | 28.34 | 32.3 |
| x265 (HEVC) · preset medium+ft4 | 34 | 1,077.3 kbps | 92.23 | 83.51 | 35.25 | 25.84 | 34.5 |
| x265 (HEVC) · preset medium+nowpp | 34 | 1,068.6 kbps | 92.23 | 83.74 | 35.26 | 18.57 | 34.5 |
| x265 (HEVC) · preset medium+ft1nowpp | 34 | 1,069.8 kbps | 92.26 | 84.06 | 35.26 | 13.01 | 31.6 |
| x265 (HEVC) · preset medium | 40 | 489.1 kbps | 75.05 | 66.21 | 31.74 | 32.95 | 28.0 |
| x265 (HEVC) · preset medium+ft1 | 40 | 489.4 kbps | 75.10 | 66.21 | 31.74 | 23.07 | 31.8 |
| x265 (HEVC) · preset medium+ft2 | 40 | 489.1 kbps | 75.05 | 66.21 | 31.74 | 31.41 | 29.1 |
| x265 (HEVC) · preset medium+ft4 | 40 | 489.1 kbps | 75.05 | 66.21 | 31.74 | 30.94 | 29.1 |
| x265 (HEVC) · preset medium+nowpp | 40 | 480.5 kbps | 75.23 | 66.59 | 31.77 | 25.54 | 29.7 |
| x265 (HEVC) · preset medium+ft1nowpp | 40 | 481.8 kbps | 75.23 | 66.82 | 31.77 | 16.81 | 26.5 |
pedestrian_area — pedestrian street
| Encoder | Quality | Bitrate | VMAF mean | VMAF 5th pct | PSNR-Y | Encode fps | CPU time (s) |
|---|---|---|---|---|---|---|---|
| x265 (HEVC) · preset medium | 22 | 4,357.1 kbps | 97.84 | 95.06 | 41.48 | 10.68 | 88.8 |
| x265 (HEVC) · preset medium+ft1 | 22 | 4,358.9 kbps | 97.83 | 95.02 | 41.48 | 9.95 | 88.3 |
| x265 (HEVC) · preset medium+ft2 | 22 | 4,357.1 kbps | 97.84 | 95.06 | 41.48 | 11.26 | 84.7 |
| x265 (HEVC) · preset medium+ft4 | 22 | 4,357.1 kbps | 97.84 | 95.06 | 41.48 | 10.37 | 92.8 |
| x265 (HEVC) · preset medium+nowpp | 22 | 4,347.7 kbps | 97.86 | 95.04 | 41.48 | 7.62 | 90.9 |
| x265 (HEVC) · preset medium+ft1nowpp | 22 | 4,346.4 kbps | 97.87 | 95.05 | 41.48 | 4.33 | 70.9 |
| x265 (HEVC) · preset medium | 28 | 1,873.7 kbps | 90.83 | 88.09 | 39.37 | 14.23 | 66.4 |
| x265 (HEVC) · preset medium+ft1 | 28 | 1,871.3 kbps | 90.86 | 88.07 | 39.37 | 13.38 | 67.1 |
| x265 (HEVC) · preset medium+ft2 | 28 | 1,873.7 kbps | 90.83 | 88.09 | 39.37 | 13.68 | 68.9 |
| x265 (HEVC) · preset medium+ft4 | 28 | 1,873.7 kbps | 90.83 | 88.09 | 39.37 | 13.62 | 70.0 |
| x265 (HEVC) · preset medium+nowpp | 28 | 1,859.7 kbps | 90.84 | 88.01 | 39.37 | 10.66 | 71.4 |
| x265 (HEVC) · preset medium+ft1nowpp | 28 | 1,858.7 kbps | 90.86 | 88.10 | 39.37 | 6.1 | 54.3 |
| x265 (HEVC) · preset medium | 34 | 924.9 kbps | 76.50 | 73.51 | 36.69 | 17.63 | 53.5 |
| x265 (HEVC) · preset medium+ft1 | 34 | 922.7 kbps | 76.48 | 73.64 | 36.70 | 16.79 | 53.2 |
| x265 (HEVC) · preset medium+ft2 | 34 | 924.9 kbps | 76.50 | 73.51 | 36.69 | 16.87 | 56.2 |
| x265 (HEVC) · preset medium+ft4 | 34 | 924.9 kbps | 76.50 | 73.51 | 36.69 | 16.7 | 55.0 |
| x265 (HEVC) · preset medium+nowpp | 34 | 908.3 kbps | 76.54 | 73.66 | 36.70 | 15.37 | 54.1 |
| x265 (HEVC) · preset medium+ft1nowpp | 34 | 909.3 kbps | 76.56 | 73.58 | 36.71 | 8.08 | 43.9 |
| x265 (HEVC) · preset medium | 40 | 443.3 kbps | 53.88 | 49.99 | 33.60 | 21.82 | 42.9 |
| x265 (HEVC) · preset medium+ft1 | 40 | 443.3 kbps | 53.78 | 49.90 | 33.60 | 21.25 | 41.5 |
| x265 (HEVC) · preset medium+ft2 | 40 | 443.3 kbps | 53.88 | 49.99 | 33.60 | 20.96 | 44.0 |
| x265 (HEVC) · preset medium+ft4 | 40 | 443.3 kbps | 53.88 | 49.99 | 33.60 | 19.81 | 45.6 |
| x265 (HEVC) · preset medium+nowpp | 40 | 430.7 kbps | 54.19 | 50.55 | 33.67 | 20.97 | 41.2 |
| x265 (HEVC) · preset medium+ft1nowpp | 40 | 430.2 kbps | 54.49 | 51.06 | 33.66 | 10.88 | 36.1 |
riverbed — riverbed (fine ripples)
| Encoder | Quality | Bitrate | VMAF mean | VMAF 5th pct | PSNR-Y | Encode fps | CPU time (s) |
|---|---|---|---|---|---|---|---|
| x265 (HEVC) · preset medium | 22 | 19,060.6 kbps | 99.59 | 98.11 | 38.69 | 4.03 | 242.8 |
| x265 (HEVC) · preset medium+ft1 | 22 | 19,058.7 kbps | 99.60 | 98.08 | 38.69 | 3.6 | 246.0 |
| x265 (HEVC) · preset medium+ft2 | 22 | 19,060.6 kbps | 99.59 | 98.11 | 38.69 | 4.1 | 238.4 |
| x265 (HEVC) · preset medium+ft4 | 22 | 19,060.6 kbps | 99.59 | 98.11 | 38.69 | 4.12 | 239.6 |
| x265 (HEVC) · preset medium+nowpp | 22 | 19,046.6 kbps | 99.60 | 98.00 | 38.69 | 3.91 | 244.8 |
| x265 (HEVC) · preset medium+ft1nowpp | 22 | 19,044.2 kbps | 99.60 | 98.00 | 38.69 | 1.26 | 211.1 |
| x265 (HEVC) · preset medium | 28 | 9,535.6 kbps | 86.40 | 81.94 | 35.59 | 5.22 | 187.6 |
| x265 (HEVC) · preset medium+ft1 | 28 | 9,534.9 kbps | 86.39 | 82.09 | 35.59 | 4.36 | 205.2 |
| x265 (HEVC) · preset medium+ft2 | 28 | 9,535.6 kbps | 86.40 | 81.94 | 35.59 | 5.31 | 184.2 |
| x265 (HEVC) · preset medium+ft4 | 28 | 9,535.6 kbps | 86.40 | 81.94 | 35.59 | 5.38 | 184.0 |
| x265 (HEVC) · preset medium+nowpp | 28 | 9,518.1 kbps | 86.41 | 82.10 | 35.59 | 5.05 | 190.0 |
| x265 (HEVC) · preset medium+ft1nowpp | 28 | 9,516 kbps | 86.38 | 81.95 | 35.59 | 1.68 | 161.7 |
| x265 (HEVC) · preset medium | 34 | 4,533.4 kbps | 63.21 | 57.79 | 32.36 | 6.66 | 146.6 |
| x265 (HEVC) · preset medium+ft1 | 34 | 4,532.7 kbps | 63.19 | 57.59 | 32.36 | 6.45 | 138.9 |
| x265 (HEVC) · preset medium+ft2 | 34 | 4,533.4 kbps | 63.21 | 57.79 | 32.36 | 7.2 | 135.4 |
| x265 (HEVC) · preset medium+ft4 | 34 | 4,533.4 kbps | 63.21 | 57.79 | 32.36 | 7.35 | 135.5 |
| x265 (HEVC) · preset medium+nowpp | 34 | 4,515.7 kbps | 63.25 | 57.64 | 32.36 | 6.74 | 144.4 |
| x265 (HEVC) · preset medium+ft1nowpp | 34 | 4,514.7 kbps | 63.26 | 57.80 | 32.36 | 2.31 | 121.6 |
| x265 (HEVC) · preset medium | 40 | 1,799.1 kbps | 38.37 | 33.28 | 29.16 | 10.45 | 93.9 |
| x265 (HEVC) · preset medium+ft1 | 40 | 1,800.5 kbps | 38.38 | 33.16 | 29.15 | 9.06 | 100.3 |
| x265 (HEVC) · preset medium+ft2 | 40 | 1,799.1 kbps | 38.37 | 33.28 | 29.16 | 10.49 | 93.6 |
| x265 (HEVC) · preset medium+ft4 | 40 | 1,799.1 kbps | 38.37 | 33.28 | 29.16 | 10.71 | 93.3 |
| x265 (HEVC) · preset medium+nowpp | 40 | 1,782.8 kbps | 38.55 | 33.44 | 29.17 | 9.45 | 102.7 |
| x265 (HEVC) · preset medium+ft1nowpp | 40 | 1,784.5 kbps | 38.59 | 33.42 | 29.17 | 3.48 | 86.0 |
rush_hour — evening rush-hour traffic
| Encoder | Quality | Bitrate | VMAF mean | VMAF 5th pct | PSNR-Y | Encode fps | CPU time (s) |
|---|---|---|---|---|---|---|---|
| x265 (HEVC) · preset medium | 22 | 4,009.4 kbps | 93.76 | 92.06 | 41.77 | 11.59 | 85.0 |
| x265 (HEVC) · preset medium+ft1 | 22 | 4,009.5 kbps | 93.76 | 92.08 | 41.77 | 10.55 | 86.1 |
| x265 (HEVC) · preset medium+ft2 | 22 | 4,009.4 kbps | 93.76 | 92.06 | 41.77 | 9.75 | 95.9 |
| x265 (HEVC) · preset medium+ft4 | 22 | 4,009.4 kbps | 93.76 | 92.06 | 41.77 | 7.91 | 107.8 |
| x265 (HEVC) · preset medium+nowpp | 22 | 3,988.6 kbps | 93.78 | 92.10 | 41.77 | 7.67 | 105.3 |
| x265 (HEVC) · preset medium+ft1nowpp | 22 | 3,988.4 kbps | 93.78 | 92.13 | 41.77 | 2.78 | 101.0 |
| x265 (HEVC) · preset medium | 28 | 1,644.7 kbps | 85.76 | 83.28 | 40.08 | 17.01 | 57.9 |
| x265 (HEVC) · preset medium+ft1 | 28 | 1,647.1 kbps | 85.73 | 83.21 | 40.08 | 15.32 | 59.3 |
| x265 (HEVC) · preset medium+ft2 | 28 | 1,644.7 kbps | 85.76 | 83.28 | 40.08 | 13.26 | 69.9 |
| x265 (HEVC) · preset medium+ft4 | 28 | 1,644.7 kbps | 85.76 | 83.28 | 40.08 | 12.51 | 71.8 |
| x265 (HEVC) · preset medium+nowpp | 28 | 1,631 kbps | 85.79 | 83.25 | 40.08 | 11.04 | 71.8 |
| x265 (HEVC) · preset medium+ft1nowpp | 28 | 1,630.2 kbps | 85.77 | 83.26 | 40.08 | 4.25 | 68.8 |
| x265 (HEVC) · preset medium | 34 | 684.4 kbps | 71.43 | 67.91 | 37.68 | 23.94 | 40.4 |
| x265 (HEVC) · preset medium+ft1 | 34 | 683.6 kbps | 71.44 | 67.95 | 37.68 | 22.67 | 40.7 |
| x265 (HEVC) · preset medium+ft2 | 34 | 684.4 kbps | 71.43 | 67.91 | 37.68 | 18.25 | 49.4 |
| x265 (HEVC) · preset medium+ft4 | 34 | 684.4 kbps | 71.43 | 67.91 | 37.68 | 17.04 | 50.5 |
| x265 (HEVC) · preset medium+nowpp | 34 | 670.9 kbps | 71.71 | 68.36 | 37.71 | 14.44 | 52.1 |
| x265 (HEVC) · preset medium+ft1nowpp | 34 | 672.1 kbps | 71.80 | 68.30 | 37.72 | 5.89 | 51.5 |
| x265 (HEVC) · preset medium | 40 | 270.9 kbps | 51.04 | 46.88 | 34.60 | 30.36 | 29.1 |
| x265 (HEVC) · preset medium+ft1 | 40 | 271.2 kbps | 50.99 | 46.70 | 34.58 | 23.43 | 34.9 |
| x265 (HEVC) · preset medium+ft2 | 40 | 270.9 kbps | 51.04 | 46.88 | 34.60 | 16.84 | 43.4 |
| x265 (HEVC) · preset medium+ft4 | 40 | 270.9 kbps | 51.04 | 46.88 | 34.60 | 22.21 | 37.4 |
| x265 (HEVC) · preset medium+nowpp | 40 | 261.8 kbps | 51.87 | 47.65 | 34.70 | 21.73 | 38.1 |
| x265 (HEVC) · preset medium+ft1nowpp | 40 | 261.6 kbps | 51.96 | 47.69 | 34.72 | 6.88 | 41.0 |
How to read it and what we observed
1. At the same CRF: how much did size and VMAF change?
Each cell in the tables below is the "variant − baseline (default)" difference for the same clip and the same CRF. The format is mean VMAF change / size change. frame-threads=2 and 4 matched the baseline in size and in mean, bottom-5%, and minimum VMAF in all 16 cells (the size_bytes and vmaf columns in the CSV are identical), so they are not included in the tables.
Differences of CSV values. Baseline is x265 medium default. Mean VMAF change / size change.
Differences of CSV values. Baseline is x265 medium default. Mean VMAF change / size change.
Differences of CSV values. Baseline is x265 medium default. Mean VMAF change / size change.
- frame-threads 2 and 4 gave the same results as the default. In all 32 cells (2 settings × 16), the file size in bytes and all three VMAF values matched the baseline. On this PC with pools=4, specifying frame-threads as 2 or 4 changed nothing in quality or size.
- frame-threads=1 wobbled without a direction. Size changed by −0.24% to +0.15%, with 9 of 16 cells smaller and 7 larger. Mean VMAF change ranged from −0.091 to +0.050, and the bottom 5% from −0.203 to +0.200. The claim that "frame-threads=1 compresses slightly better" is a known one, but this data showed no consistent gain (the differences are at the noise level of a single CRF step).
- Turning WPP off made the file smaller in 15 of 16 cells. The only cell where size grew was blue_sky CRF 22 (+0.10%), and that cell is in the range where VMAF saturates at 99.977. The size reduction grew with CRF in all four clips (CRF 28 → 40: blue_sky −0.28% → −1.74%, pedestrian_area −0.75% → −2.84%, riverbed −0.18% → −0.90%, rush_hour −0.83% → −3.40%).
- Scores did not drop with WPP off, either. Mean VMAF was the same or higher in 15 of 16 cells (+0.006 to +0.832); the one exception was −0.007 at blue_sky CRF 34. The bottom 5% went both ways depending on the cell, from −0.158 to +0.766. So the file got smaller while the score stayed the same or went up, which is a gain, not a loss.
- With minimum parallelism, size dropped in all 16 cells (−0.03% to −3.45%), about the same range as WPP off alone (−0.81% to −3.45% versus −0.90% to −3.40% at CRF 40). Mean VMAF rose in 14 cells, was equal in 1, and fell in 1 (riverbed CRF 28, −0.017). So on this PC the size and quality gain came almost entirely from turning WPP off, and adding frame-threads=1 showed no additional gain.
- It did not split along "static clip vs. high-motion clip." The size reduction from WPP off at CRF 40 was rush_hour −3.40%, pedestrian_area −2.84%, blue_sky −1.74%, riverbed −0.90%. The most static clip, blue_sky, landed in the middle, and the most complex one, riverbed, was the smallest. This experiment cannot tell us why. There is a tendency for clips with lower bitrate (smaller size) to see a larger reduction (CRF 40 bitrate: rush_hour 270.9 kbps, pedestrian_area 443.3, blue_sky 489.1, riverbed 1,799.1).
At the same VMAF: size gain from turning WPP off (interpolated)
At CRF 40 and 34, the WPP-off encode was smaller and also had higher VMAF, so we found the bitrate on the baseline curve that gives the same VMAF and compared against it. Between the two adjacent baseline CRF points, bitrate (kbps) was interpolated linearly against VMAF on a log scale, with no extrapolation. For CRF 22 and 28, the VMAF difference was only 0.00–0.03, no different from the same-CRF comparison, so we did not calculate it.
Same VMAF = comparison against the bitrate at which the interpolated baseline curve reaches the WPP-off mean VMAF. Example: for rush_hour at CRF 40, WPP off is 261.8 kbps versus about 281.3 kbps for the baseline at the same VMAF (51.873). Because the clips are 10 seconds, the kbps ratio is the file size ratio.
Matched at the same VMAF, the gain from turning WPP off was 1.5%–6.9% at CRF 40 and 0.5%–3.6% at CRF 34. The largest cell was rush_hour at CRF 40, double the same-CRF comparison (−3.4%). Still, converted to file size it is 1–7%, which corresponds to roughly one CRF step, so the perceptible gain is not large. How much one CRF step changes size is covered in the CRF step size rule.
2. Time: how different was it for identical output (the size of the noise)?
frame-threads=2 and 4 produced output identical to the default. Even so, rtime differed by setting. Below are the multiples of the baseline rtime for the same clip and same CRF. Since settings that produce the same result differ by this much, it is safer to treat this amount as measurement noise (IDLE priority, other workloads) rather than an effect of the parallelism setting.
ft2 and ft4 are settings whose output matches the baseline. Values are CSV rtime_s divided by baseline rtime_s.
blue_sky, pedestrian_area, and riverbed ranged from 0.91 to 1.11×, but rush_hour was consistently longer at 1.19–1.80×. The baseline rush_hour CPU time (utime) is 85.0 seconds, while ft2 was 95.9 seconds and ft4 was 107.8 seconds (CRF 22), which suggests the baseline may have run in an unusually idle state on this clip, but this data alone cannot pin down the cause. Conclusion: time comparisons for rush_hour should be read allowing for noise of around ±80%. The ft1 numbers below sit on top of the same noise.
Multiple of the baseline rtime_s for the same clip and same CRF. Baseline rtime examples: blue_sky CRF 22 16.9 s, riverbed CRF 22 62.1 s.
- frame-threads=1 took longer than the baseline in all 16 cells (1.03–1.43×). The most common value was 1.05–1.20×, and the largest, 1.43× (blue_sky CRF 40), and 1.30× (rush_hour CRF 40) are within the noise range above. Combined with the earlier result that it gave no compression gain, on this PC frame-threads=1 buys nothing and is only a little slower.
- WPP off varied by clip. riverbed barely slowed down at 0.99–1.11× (riverbed is a long clip, with baseline rtime of 23.9–62.1 seconds), while blue_sky was 1.82× at CRF 22 and rush_hour was 1.40–1.66×. This experiment cannot tell us why the same setting behaves differently by clip and CRF.
- With minimum parallelism, it was always much slower (1.96–4.42×, at least 1.9× in all 16 cells). The longest cell was riverbed CRF 22, from 62.1 seconds to 198.9 seconds (3.20×), and rush_hour CRF 40 went from 8.2 seconds to 36.4 seconds (4.42×). In terms of encoding speed on 25 fps video (fps_rt), riverbed CRF 22 went from 4.03 to 1.26, and rush_hour CRF 28 from 17.01 to 4.25.
3. CPU utilization (utime ÷ rtime)
Dividing utime by rtime gives the average number of cores' worth of CPU used during encoding. Since pools=4, 4 is close to the theoretical limit. Below are the values at CRF 28.
CSV utime_s ÷ rtime_s: how many cores' worth were used. With pools=4, 4 is close to the upper limit.
- Default, ft2, and ft4 were at 3.6–4.0, nearly filling 4 cores (at CRF 28). This matches how x265 nearly filled 4 cores' worth in the earlier thread utilization measurements. With frame-threads=1 alone, it only dropped a little, to 3.41–3.63.
- With WPP off, utilization split by clip. riverbed stayed nearly the same at 3.84, followed by rush_hour 3.17, pedestrian_area 3.04, and blue_sky 2.18. One reading is that when a frame can't be split into rows, the work has to be filled by frame-threads alone, and how much that fills depends on the clip, but we did not verify the reason.
- Minimum parallelism was 1.08–1.41, effectively one core's worth. Encoder CPU time (utime) was actually lower, at 0.80–0.96× the baseline, in 12 cells of blue_sky, pedestrian_area, and riverbed (for example, pedestrian_area CRF 22 went from 88.8 seconds to 70.9 seconds). That may be because the parallelization overhead shrank, but this experiment did not check it separately. rush_hour was the opposite in all 4 cells at 1.19–1.41×, which may be an effect of the baseline noise seen earlier.
- A practical reading: in an environment where several jobs run at once rather than one job monopolizing the cores, a setting with less parallelism would use less CPU but make each individual job slower. This article ran only one job at a time and did not run several at once, so we did not measure how total throughput changes.
Limitations
- Time is for reference only. Because runs were at IDLE priority, even ft2 and ft4, which produce identical output, varied from 0.91 to 1.80× the baseline in rtime. Within the same clip, don't read anything into differences within ±10%, and be especially careful with rush_hour.
- We did not change the pool size (pools=4). In environments where the thread count is not 4, the automatic frame-threads value and the effect of WPP could be different.
- We only confirmed that frame-threads=2 and 4 gave the same results as the default. We did not check in the log how many threads the default uses internally or how many threads each value actually led to (log-level=error).
- The values are interpolated. Same-VMAF size is a value obtained by joining CRF points with a log-scale straight line, and it was calculated only for WPP off at CRF 34 and 40. For differences within 1–2%, look only at the direction.
- Four 10-second clips, 8-bit yuv420p, one PC, one measurement run. We used only the medium preset, and there is no guarantee the same results hold for presets like slow or veryslow that search more deeply within a frame. VMAF was a computed score only, with no side-by-side visual comparison by eye.
Practical recommendations
- Normally, just keep the default. frame-threads 2 and 4 give the same result, and 1 is slower with no gain. The only size and quality gain confirmed in this data was from turning WPP off.
- When turning WPP off is worth trying: high-CRF video (low-quality range) where you are willing to spend more time to cut size by 1–3%. The gain grew at high CRF such as 40 (−0.90% to −3.40%) and was almost nil at CRF 22. But time can increase by 1.0–1.8× depending on the clip. How much size the same time would save if spent on a slower preset can be seen in the x265 preset measurements. The WPP-off result here is a comparison within the same preset, not an efficiency comparison at equal time.
- Before trying to cut size with parallelism options, look at CRF first. The gain is at most 3.4% (6.9% at the same VMAF), whereas in the baseline alone, blue_sky dropped from 1,077.3 to 489.1 kbps going from CRF 34 to 40 (the CRF step size rule).
- If your goal is real-time or fast encoding, don't reduce parallelism. With minimum parallelism, riverbed CRF 22 dropped from 4.03 fps to 1.26 fps. For whether real time is feasible, see also the fast preset fps measurements.
- To check for yourself, measure VMAF the same way with the VMAF FFmpeg command builder, then run
-x265-params frame-threads=1:wpp=0and the default alternately at the same time of day on your own PC and compare. How much encoding time differs by type of video can be seen in encoding time by content complexity.
The full raw data can be downloaded from the CSV at the very bottom of the page. The same-CRF differences and time multiples can be recomputed directly from the CSV columns size_bytes, vmaf_mean, vmaf_p5, rtime_s, and utime_s.
Raw data: x265-frame-threads-wpp-speed-size-v1.csv