The x265 Codec Explained: HEVC Encoding and Its Role in Video Provenance

x265 vs H.265: x265 is one software encoder for the HEVC standard. How it works, why files fail to play, and why re-encoding breaks provenance.

The x265 Codec Explained: HEVC Encoding and Its Role in Video Provenance
Written by TechnoLynx Published on 11 Jul 2026

x265 and H.265 are not two competing codecs. H.265 (also called HEVC, or MPEG-H Part 2) is a compression standard, first published jointly by ISO/IEC and ITU-T in 2013. x265 is one software encoder that produces H.265 bitstreams. MulticoreWare launched it in 2013, and it grew out of x264, the open-source encoder for the older H.264/AVC standard. A file described as “x265” contains an HEVC video stream.

The encoder also matters for reasons beyond file size. Every lossy x265 re-encode loses some quality, whatever the target bitrate. Even a single bit change is enough to break a cryptographic provenance binding.

x265 vs H.265: One Standard, Many Encoders

An HEVC profile defines a set of coding tools. An encoder may choose which of those tools to use, as long as its output is a conforming bitstream, but a decoder for that profile has to support every tool the profile allows. Fraunhofer HHI, one of the standard’s developers, describes HEVC as allowing much more flexibility in encoding decisions than earlier standards. Depending on the application, HEVC encoders can trade off computational complexity, compression rate, robustness to errors and encoding delay.

x265 is one of several implementations. The others include the HM reference software and Kvazaar on the software side, plus hardware encoders such as Intel QSV, NVIDIA NVENC and AMD VCE. VideoLAN has also published an open-source HEVC encoder. x265 is released under GPLv2, with a commercial licence for companies that want to ship it without the GPL’s conditions. It has been integrated into FFmpeg since February 2014, where it is called as libx265.

How x265 Turns Frames into an HEVC Bitstream: Prediction, Transform and Quantisation

x265 predicts each block of a frame from data it has already coded, then compresses the difference (the residual) by transforming it, quantising it and entropy-coding it. Quantisation is the step that loses the most information, a point that comes back later in the article.

What Are the Main Stages of the x265 (HEVC) Encoding Pipeline?

  1. Block partitioning. HEVC splits each frame into coding tree units (CTUs) of up to 64×64 pixels. H.264 uses macroblocks instead. In x265 the maximum CU size defaults to 64. Larger blocks encode flat areas more efficiently but leave fewer rows to process in parallel, so the faster presets use 32.
  2. Prediction. Each block is predicted either from already-coded blocks in the same frame (intra) or from reference frames (inter, using motion compensation). Decoded pictures are kept in a decoded picture buffer, and the encoder decides which pictures to keep there.
  3. Transform. The residual is converted to the frequency domain. The human visual system is less sensitive to high frequencies, so less important data can be dropped.
  4. Quantisation. The transformed coefficients are stored at lower precision. In effect each coefficient is divided by a step size and rounded, and the information lost this way cannot be recovered. x265’s adaptive quantisation raises or lowers quantisation per block based on how complex the block is.
  5. In-loop filtering. Deblocking and sample-adaptive offset (SAO) filters modify the reconstructed samples. They are the third source of loss, after the non-reversible transform and quantisation.
  6. Entropy coding. The quantised coefficients are compressed into the final bitstream.

On top of these stages, x265 makes choices that the standard leaves open. Wavefront parallel processing lets the encoder start a row once the row above is two CTUs ahead. x265’s documentation says this gives a 3-5x gain in parallelism for about 1% loss in compression efficiency. The psycho-visual options, psy-rd and psy-rdoq, are there because a plain rate-distortion formula tends to prefer blurred blocks over blocks with wrong motion, and the eye prefers the opposite.

What’s the Difference Between x264 and x265, and Is x265 Actually Better Quality at the Same File Size?

Yes, by the published comparisons. x265 delivers better quality than x264 at the same bitrate, and it costs more energy to get there. In a 2016 comparison of clips from 500 titles, Netflix found that both VP9 and x265 gave 40%-50% better quality at 1080p than x264. A 2024 survey of video streaming energy use reached the same conclusion from the energy side: among the software encoders it reviewed, x264 had the lowest energy use but the worst compression efficiency, and x265 had the best compression efficiency but used more energy.

Published figures for the size of the gain vary widely. They also measure different things:

Source Figure Basis
Fraunhofer HHI about 50% bitrate reduction same subjective quality
Library of Congress HEVC format description 22%-43% objective; 55%-87% subjective four choices of coding parameters
Wikipedia summary of the literature 25%-50% same quality level
Apple HLS authoring specification bitrates reduced by about 20% Apple’s HEVC bitrate guidance

The cost side is just as concrete. One 2025 codec comparison puts x265 at roughly 2-4× slower than x264 at comparable quality. The streaming survey cites HEVC encoder complexity at 1.2 to 3.2 times that of AVC.

How Do x265 Presets, CRF and Bitrate Settings Trade Quality Against File Size?

Constant Rate Factor (CRF) is x265’s default rate control. It does not aim for a particular bitrate. It aims for a uniform quality and lets the source’s complexity decide the file size. The default CRF is 28, and higher values mean more quantisation and lower quality. The CRF scale runs from 0 to 51, with lower values giving higher quality and larger files. CRF changes the quantiser from frame to frame, compressing high-motion frames harder because motion hides artefacts. This means two sources at the same CRF can end up at quite different bitrates while looking about the same.

Presets control a different trade-off: compression efficiency against encoding speed. They are applied before any other parameter, so an explicit setting overrides them. The spread between presets is large. One study cited in the 2024 survey found that the ultrafast preset needed 45% more bitrate than placebo and used 45 times more energy than placebo. Within a preset, the RDO level works the same way: higher values mean more exhaustive analysis and, in general, a smaller bitstream.

x265 also offers multi-pass rate control. Each pass stores statistics that the next pass uses to tune per-frame QP. One caution for anyone measuring results: x265’s documentation says PSNR and SSIM figures are only comparable when the encode uses the matching --tune setting. Its psy-rdoq option improves perceived quality at the cost of lower metric scores.

What Does a “1080p x265” File Mean Compared with a Regular 1080p File?

Compared with H.264, HEVC achieves 25%-50% better compression at the same quality.

The label leaves out three details:

  • The container. The x265 command-line tool only writes a raw HEVC bitstream, so something else has to wrap it in MP4 or Matroska. Matroska added HEVC support through MKVToolNix 6.8.0.
  • The bit depth. x265 can produce the Main (8-bit), Main 10 and Main 12 profiles. Main is 8-bit 4:2:0, the common consumer format. A performance comparison cited in the HEVC Wikipedia article found Main 10 gave a 5% bitrate reduction over Main for inter coding. Many consumer devices stumble on 10-bit.
  • The rate control. Under CRF, x265’s default, the file size comes from the CRF value and how complex the source is.

One less obvious detail: x265 will mark a stream as profile NONE and level NONE if its reference-frame settings break the HEVC limit. It aborts such an encode unless non-conformance is explicitly allowed, and conforming decoders may refuse these streams.

How Do You Play an H.265/x265 File, and Why Does a Device Say “HEVC format not supported”?

Playback needs an HEVC decoder that supports the file’s profile and codec variant. VLC has supported HEVC playback since version 2.2.0 in February 2015, on Android and iOS as well. A 2026 troubleshooting guide lists seven usual causes: a missing hardware decoder, an unsupported codec variant, bitrate limits, container confusion, update conflicts, a Main 10 profile mismatch, and insufficient system resources.

Diagnostic Checklist for HEVC Playback Failures

Symptom Likely cause Usual fix
Black screen or “No suitable decoder module” on an older TV or VLC The file uses the hev1 tag (parameter sets in the bitstream); some decoders only handle hvc1 (parameter sets in the container) Store the parameter sets in the container (the hvc1 form); the video itself is the same under both tags
1080p files play, 4K HDR files do not The device decodes Main but not Main 10 Play on a Main 10 decoder, or encode an 8-bit Main version
Stutter and full CPU load on an older laptop No hardware HEVC decoder; HEVC needs about 2-3 times the CPU work of H.264 to decode Use hardware with HEVC decode (Intel Skylake, NVIDIA GM206, AMD Polaris onwards, per the same guide)
Windows says the codec is missing Microsoft removed built-in HEVC decoding in Windows 10 version 1709 and moved it to a paid Store extension Install the HEVC Video Extensions
Preparing HEVC for Apple HLS delivery HEVC in HLS must be in fMP4, at or below Main 10, Level 5.1, High Tier, and hev1 is not recommended Package as fMP4 with hvc1, per Apple’s specification
Nothing else works Decoder support is missing entirely Transcode to H.264, which roughly doubles file size

Licensing has also reached laptop hardware. Since November 2025, Dell and HP have said they will disable HEVC hardware decoding at UEFI/BIOS level on some entry and mid-range laptops because of higher licence fees.

MDN’s current codec guide says Chrome supports HEVC on devices with hardware support on Windows 8+, Linux and ChromeOS, and that Firefox enables it from version 134 on Windows and 136 on macOS. The more cautious summary on Can I Use is that universal browser support is hard because HEVC is complex and expensive to license.

Where x265 Fits Next to H.264/AVC and AV1 for Delivery at Scale

HEVC is specified for the transport streams used by ATSC, DVB and Blu-ray and for Apple HLS, but its adoption on the open web has been low. Implementing HEVC can require licences from its patent holders, available directly or through pools such as MPEG LA, Access Advance and Velos Media, and the combined fees are higher than for AVC. Those fees are one of the main reasons HEVC adoption on the web has been low. Amazon, Apple, Google, Microsoft, Mozilla, Netflix, NVIDIA and others joined the Alliance for Open Media, which finalised the royalty-free AV1 format in March 2018. With three or more pools plus unaffiliated patent holders, the total cost is hard to predict.

The 2024 streaming survey cites AV1 as 30% better than HEVC at the same quality, at the cost of four times longer encoding time. Netflix reports that AV1 now carries about 30% of its streaming, and that AV1 sessions use one-third less bandwidth than both AVC and HEVC while scoring 0.9 VMAF points higher than HEVC. These results come from Netflix’s own streaming sessions. A smaller service with a mixed device base may still find HEVC, or H.264 as a fallback, the sensible default. Past HEVC there is VVC (H.266), which aims for better compression than HEVC; our explainer on how x266 and VVC work in video pipelines covers it.

The broader point: which codec to use is a design decision for the pipeline, not a default inherited from web tooling.

How Does Lossy x265 Re-Encoding Affect ML Detectors and Perceptual Hashes?

Video transcoding research states the general rule: transcoding a hybrid-coded video always loses some quality, whatever target bitrate is chosen. In a study of HEVC-to-HEVC transcoding, the average maximum PSNR drop was 1.4 dB compared with encoding directly from the original. For the practical case of reducing bitrate, it stayed below 0.7 dB. The loss was smallest when the second encode used the same QP as the first, at 0.35 dB for a 95% bitrate ratio. More complex content lost more. Transcoding AVC to HEVC at the same bitrate cost an average of 0.5 dB, while a bitrate cut of 20% or more represented the video more efficiently than AVC’s own rate-distortion curve, a coding-efficiency result rather than a quality gain over the source.

PSNR measures how close the pixels stay to the original, so these figures show the data changing; they say nothing directly about any particular detector. The mechanism explains why the change matters for detection. Quantisation is the step that loses the most information, and x265’s psycho-visual options deliberately change how much high-frequency energy is kept. Our judgement is that a detector’s confidence on re-encoded video has to be measured on video that went through the real distribution path, not assumed from results on pristine files. A perceptual fingerprint is not a byte hash: C2PA defines it as a content identifier that is not statistically unique. How a given hash holds up at a given bitrate and content type is something to test, not assume.

Re-encoding also happens automatically. Apple notes that media shared by AirDrop, Messages or email to a device that lacks HEVC support may be sent automatically in a more compatible format such as H.264. We cover the moderation-side details, including how to set up a transcode stage that keeps detector signals usable, in a separate article.

Can C2PA Provenance Metadata Survive an x265 Transcode?

The hard binding cannot. The provenance chain can, but only if the tool doing the transcode supports C2PA. A re-encode always changes the content, even a one-bit change invalidates a cryptographic binding, and C2PA expects a transcode to be declared as a c2pa.transcoded action, which tells the consumer that the signer asserts no editorial change was made.

TechnoLynx treats the codec as engineering surface in media pipelines, as part of AI engineering for media, broadcast and telecom, starting from the pipeline as it actually runs.

In C2PA terms, a re-encoded video is an asset rendition: content that has had a non-editorial transformation such as re-encoding or scaling. A hard binding is one or more cryptographic hashes over the asset, and an asset is only valid if the parts covered by content bindings have not changed since the active manifest was produced. A transcoded file therefore needs a new manifest that records the action and references the source as an ingredient with a parentOf relationship. C2PA supports this kind of edit with cryptographic verification, but only when the editing tool supports the standard.

Signal After an x265 re-encode
Original hard binding (hash over bytes) Fails, because the bytes have changed
Embedded C2PA manifest Carried forward only if the transcoding tool supports C2PA
Soft binding: perceptual fingerprint Not a byte hash; a content identifier that is not statistically unique
Soft binding: broadcast watermark ATSC testing found watermarks recoverable through common transcoding and resolution changes

Watermarks have limits. The broadcast provenance paper treats them as durable but as mutable as ordinary metadata: any intermediary can change or remove them, so data carried in a watermark must still be validated cryptographically. Its proposed design uses the watermark to retrieve the original’s trusted metadata and its canonical version when verification fails.

Two x265 details matter when designing this. First, x265 writes only a raw bitstream. In MP4 files the C2PA manifest sits in a uuid box, because Chromium-based browsers stop playback when they meet an unknown top-level box. The manifest therefore has to be added outside the x265 CLI, which writes no container formats. Second, x265 by default writes an informational SEI message with its version and encode parameters, which its documentation warns can make bitstreams diverge. Its optional decoded-picture hash SEI checks decoding integrity, not origin.

We would treat the transcode stage as part of the chain of custody, not as a delivery detail: decide which signal each rendition is supposed to carry, then check that it survives your real encoder settings. For the wider picture of how cryptographic provenance sits alongside forensic detection, see our guide to detecting AI-generated content, from image forensics to cryptographic provenance.

FAQ

Is H.265 10-Bit?

Not necessarily. The Main profile is 8-bit 4:2:0, and Main 10 allows 8 to 10 bits per sample. Whether a given file is 10-bit depends on the profile it was encoded with.