x265 is an open-source software encoder that produces HEVC (H.265) bitstreams, and it runs on CPUs. The question of HEVC vs x265 is really about a standard versus one implementation of it. In a pipeline, the choice is whether a given encode deserves slow CPU time with x265 or faster encoding on a hardware HEVC block. For live HEVC, hardware encoding wins on density and cost. Popular on-demand titles go to x265 at a slow preset. We would keep GPU capacity for content-analysis inference.
HEVC vs x265: A Standard and One Encoder of It
HEVC is a compression standard developed jointly by ISO/IEC MPEG and ITU-T VCEG, and it is published both as ISO/IEC 23008-2 (MPEG-H Part 2) and as ITU-T H.265. HEVC gives up to twice the compression of H.264/AVC and supports pictures up to 8192x4320. Other sources put the saving lower: a 2017 EUSIPCO study cites a 40% bitrate reduction at similar objective quality, while Intel’s x265 paper describes a design target of 50% bandwidth savings. Treat the gain as dependent on content and encoder rather than as one fixed number.
x265 is one encoder for that standard. MulticoreWare launched the x265 project in 2013. It is licensed under GPL v2 and is built into FFmpeg, HandBrake and VLC.
The standard only defines what a valid bitstream looks like and how to decode it. It does not define how an encoder should find a good one. NVIDIA NVENC, Intel Quick Sync and Qualcomm’s SoC encoders are all HEVC encoders but differ in quality per bit. An academic evaluation from 2025 found that some hardware implementations leave out or modify B-frames, reference-frame limits or rate-distortion optimisation to fit inside silicon. “Is HEVC good?” and “is x265 good?” are separate questions, and only the second one is about compute.
How Does x265 Actually Spend Its Compute?
For each coding tree unit (CTU), the encoder tries different ways to split blocks, predict them and transform the residual, then keeps the option with the best trade-off between bitrate and distortion. That process is rate-distortion optimisation (RDO). At high resolution it means many block-splitting decisions, so the number of RDO calculations grows quickly. The --rd option sets the level of RDO in mode decision. Higher values give smaller bitstreams but slower encodes. Motion search adds more cost: the “full” search mode is an order of magnitude slower than the others and only slightly better than the umh or star searches.
Intel’s x265 paper says HEVC encoders are expected to be 2–5 times more complex than AVC encoders because of HEVC’s larger set of tools. x265 makes that cost manageable on CPUs in two ways.
SIMD kernels. By default, x265 uses every CPU SIMD instruction set it detects. Intel reports that AVX and AVX2 give about a 5x average speedup over plain C code. The encoder also has assembly optimisations for ARM and PowerPC.
Threading. x265 runs frames in parallel using software threads, and it encodes CTU rows inside a frame in parallel using HEVC’s Wavefront Parallel Processing (WPP). According to the CLI documentation, WPP gives a 3–5x gain in parallelism for about 1% compression overhead.
The threading has limits. For 1080p, x265 has only 17 rows of 64x64 CTUs, compared with 68 rows of 16x16 macroblocks in x264. HEVC’s two loop filters (deblocking and SAO) also leave each frame about three CTU rows behind its reference frames. The project’s own threading documentation says that, because of these stalls, 30% to 50% of perfect threading efficiency is typical. Adding frame threads beyond the auto-detected count mostly increases memory use and can reduce performance. In practice, adding frame threads to a single x265 encode gives limited benefit.
Why x265 Stays on the CPU Rather than Going to the GPU
In the EUSIPCO 2017 measurements of x265 running on a CPU, the CPU dominated energy use. The CPU used 95% of the total energy during x265 encoding, DRAM 3% and caches 2%, and that split held across all presets. L1 cache hit rates ran from 91% at ultrafast to 96% at placebo.
x265 is a CPU encoder. x265’s performance work is CPU SIMD and CPU thread pools (one per NUMA node by default). The GPU encoding that teams compare with x265 is a different encoder: a fixed-function hardware block (an ASIC) on the GPU die, built for speed and low power. Running x265 on a GPU instance spends GPU hours on a workload that returns little from them. That kind of capacity loss is explained in our piece on the hidden cost of GPU underutilisation.
Within the CPU tier, the processor choice still matters. Intel measured x265 kernels with AVX-512 and found 33% average cycle savings on the main profile and 40% on main10. Because of the clock-frequency drop on server parts, Intel recommends enabling AVX-512 there only for 4K main10 encodes at slower or veryslow presets. This is our wider principle at small scale: best practice only makes sense in context, and that context comes from profiling.
What x265 Presets and Rate Control Trade Off
x265 has ten presets, from ultrafast to placebo, with medium as the default. Each one sets the balance between encoding speed and compression efficiency. Faster presets take shortcuts, while slower presets try more encoding options to reach better quality at the same bitrate. Under the hood, the presets change the number of B-frames, the transform-unit depth and the motion search, swapping hexagon search for slower star search. Faster presets use a 32x32 maximum CU, which keeps parallelism up.
The 2017 EUSIPCO measurements put numbers on the full range:
| From ultrafast to placebo | Measured change |
|---|---|
| Encoding speed | Fast presets up to 47x faster than slower ones |
| Bitrate | Ultrafast 45% higher than placebo |
| System energy | Rises 45x |
| Marginal cost | About 145% more energy per 1% bitrate reduction |
The same study found that fast, medium and slow gave the best balance of bitrate and energy. Presets beyond slow fall outside that best bitrate/energy range. That is only worth paying when the saved bits are delivered many times.
Rate control decides how those bits are spent, separately from the preset:
- CRF is the default mode. It aims for uniform quality and lets file size follow the complexity of the content, with a default rate factor of 28.0.
- Constant QP fixes the quantiser at a value from 0 to 51. QP 0 disables quantisation but is not lossless.
- ABR with strict CBR puts bitrate adherence ahead of quality and keeps output within 5% of target, which suits short segment encodes.
- Multi-pass encodes the input more than once and uses the stats from each pass to tune per-frame QP.
Two settings bear on whether x265 can run live. The lookahead length is a key factor in encoder latency, and --bframes 0 forces the all-P/I structure used for low-latency encodes. A shorter lookahead makes scenecut decisions and cutree less effective.
Bitrate Ladders Multiply the Compute Bill
On-demand streaming encodes each title at several resolutions and bitrates, a bitrate ladder. A 2023 study of x265 multi-resolution encoding notes that sub-1 fps speeds are common for high-quality offline encodes of a full 10-bit HEVC ladder. The study sped this up by reusing analysis decisions (motion vectors, CU structure) across the encodes in a resolution tier. This gave speed-ups of up to 2.5x over separate single-instance encodes without substantial loss of coding efficiency. Before buying more cores for ladder encoding, check whether the pipeline shares analysis between rungs.
How x265 Encoding Differs from the Content-Analysis Stages
Content analysis can run in the same FFmpeg graph as media decoding, and the two behave differently on hardware. A 2021 paper on extending FFmpeg for media analytics found analytics workloads usually memory-bound and media decoding usually CPU-bound. The same paper says analytics is generally the heavier load “unless media encoding is involved”. That caveat matters for pipelines that run slow-preset x265 ladders. Analysis stages such as detection and tracking are where GPU capacity belongs, and where each one should run is covered in video content analysis in media pipelines and how its stages differ from transcoding.
For placement, this gives a clean split. Inference stages get the GPUs, and x265 encodes stay on the CPU tier. Hardware encoder blocks take the encodes where speed matters more than bits. Pipelines built on one fleet-wide GPU assumption spend GPU hours on CPU-bound encoding. A correctly scoped pipeline separates encode compute cost from analysis compute cost.
When Does Hardware HEVC Encoding Beat Software x265?
Hardware wins when real-time speed or encoding cost dominates. x265 wins when the saved bitrate is multiplied by enough views. The evidence on quality is mixed, and the comparisons test different configurations.
- An independent 2025 evaluation found that GPU hardware encoders cannot match the best-quality software presets, but they do match the medium-quality presets normally used for real-time encoding. Even high-end CPUs often cannot encode HEVC in real time at 4K/8K and high frame rates. In the 4K tests, hardware encoders beat the faster software presets running on a 105 W Ryzen 9 5900X. The same study found almost no RD improvement across the last six years of hardware generations.
- In a cloud benchmark of NVENC and LCEVC, with FFmpeg 6.1 and matched GOP, B-frames and lookahead, GPU HEVC encoding was 2–4x cheaper than CPU x265 for low-latency and ultra-high-quality tunes, with NVENC HEVC beating x265 on coding efficiency in that setup.
- A CDN vendor blog that compiles public VMAF comparisons estimates that NVENC HEVC needs about 15–25% more bits than x265 slow at equal quality.
Our reading is that the independent study is the best guide to quality. Its finding (hardware matches medium presets, not slow ones) also explains the other two results: NVIDIA’s comparison favours hardware at the tunes it tested, and the blog’s gap applies to x265 slow specifically. How such results should be measured is a benchmarking question, and our view is that you should trust measured performance on your own workload rather than marketing figures. How the silicon works is covered in our explainer on how a hardware HEVC encoder works and when it pays off.
| Workload | Better fit | Why |
|---|---|---|
| Live HEVC, many channels | Hardware (NVENC, Quick Sync) | Real-time speed and density. CPUs struggle with live UHD HEVC |
| Live encode next to other CPU work | Hardware | Software encoding at its best feasible preset doubled system power and left little CPU headroom in the 2025 tests |
| VOD title with high view counts | x265 slow | The bitrate saving is recovered on every view |
| VOD long tail, rarely watched | Hardware or fast x265 preset | Below the break-even view count, delivery savings do not repay the extra CPU time |
| Mobile SoC encoder at low bitrate | Software, if available | Qualcomm’s encoder, without B-frames, trailed software by about 10 VMAF points at low bitrate |
Worked Example: The Break-Even Point for x265 Slow
The CDN blog states the rule like this: hardware wins while the compute saving exceeds the bitrate penalty fraction × delivered TB × price per TB. Its own example uses estimates, not measurements: a two-hour 1080p title at 6 Mb/s is 5.4 GB per view. The ladder costs about $1.80 in CPU time with x265 slow and about $0.10 on a GPU. With a 20% NVENC HEVC penalty, each view wastes about 1.08 GB.
Working it through: 1.08 GB at $4 per TB is about $0.0043 per view. The extra cost of software encoding is $1.80 − $0.10 = $1.70. $1.70 ÷ $0.0043 is about 395 views, which matches the blog’s figure of roughly 400 views at $4/TB and 80 views at $20/TB. Every input here should be replaced with your own instance prices, delivery rate and measured bitrate gap, because the result moves directly with each one.
Encoder Placement Is a Tuning Problem Before It Is a Replacement Problem
In production AI, cost and latency pressure rarely needs a new model but profiling and tuning of the deployed serving path, and replacement is the most expensive lever. The same logic applies to encoding. Preset choice, analysis sharing across the ladder, frame-thread sizing, AVX-512 policy and routing each title to hardware or x265 by its view count are all levers. Each can be adjusted before a codec migration such as x266 and VVC is worth its cost.
For broadcasters and streaming platforms, TechnoLynx’s GPU Performance Engineering audit, scoped to video-analytics workloads, profiles the full function mix in the pipeline. It identifies encoding stages such as x265 as CPU-bound, so GPU capacity stays with the analysis functions that need it. The wider scope is described under AI engineering for media, broadcast and telecom. The audit is profiling work.
FAQ
Should I Use 2-Pass Encoding with x265?
Multi-pass encoding stores stats from each pass and uses them to tune per-frame QP, which improves quality. If you are encoding for quality with CRF (the default), there is no bitrate target, and file size follows the content’s complexity.
Is x265 the Best HEVC Encoder?
The project states that its aim is to be the best HEVC encoder available, and Intel calls it the most popular open-source one. Whether it beats a particular hardware encoder depends on the preset and the use case. Independent tests show hardware matching x265’s medium preset but not its slowest ones.