In one study, benign processing such as transcoding noticeably lowered a deepfake detector’s accuracy, with no new generator involved. The x264 vs x265 comparison that matters here comes from a study of a popular deepfake detector on FaceForensics++. It measured 80.25% accuracy on raw video, 76.38% after libx264 at CRF 23, and 76.51% after libx265 at CRF 28, with the x265 encode using about half the bitrate. So x265 held detector accuracy at the x264 level for about half the bitrate, but neither encode matched raw video. That makes the encode profile one of the detector’s operating conditions, and it should be recorded like one. The encode profile, as a single input condition, is the scope here. The wider question of whether detector scores can be trusted at all sits in our reliability evidence for Hive AI-content detection in the triage pipeline.
x264 vs x265: Bitrate Saving Against Encoding Cost
HEVC (H.265, also published as ISO/IEC 23008-2 and MPEG-H Part 2) became a standard in 2013. x265 is an open-source encoder for it, released under GPL v2 with commercial licences also offered. The Library of Congress format description cites objective gains of 22% to 43% for HEVC over AVC across four coding configurations, and higher savings in subjective tests.
On 1080p content, the Streaming Learning Center found that tuned x265 cut bandwidth by 16% to 27% compared with tuned x264, but cost about 7.5 times as much to encode. The saving paid back the extra encoding after roughly 3,200 to 10,000 viewing hours, depending on the audience. The same tests found that x265 at default settings gave almost no benefit (−0.59%) over an optimised x264. Preset choice also mattered more for x265 than for x264: x265 medium reached 97.7% of veryslow’s VMAF in 6% of the encoding time, against 99.2% for x264 medium.
For a moderation pipeline, that break-even arithmetic needs a second look. The payback is measured in viewing hours, and an ingest copy that exists only to be scored and occasionally reviewed may never be watched enough to recover a 7.5× encoding bill. Choosing the ingest codec for storage or compatibility alone leaves the detector out of the decision.
How x265 Compression Reshapes the Frame-Level Evidence
HEVC does not just compress harder than AVC. It compresses differently, with different block structures and intra prediction. H.264 codes in fixed 16×16 macroblocks. HEVC uses a Coding Tree Unit of up to 64×64 that splits by quad-tree down to 4×4 blocks, with transforms from 4×4 to 32×32. HEVC intra coding has 35 prediction modes against AVC’s 9, which predicts edges better and reduces ringing around them. Quantisation throws away high-frequency detail in proportion to the quality setting. Together these change the scale of block boundaries, how edges ring and how smooth regions are flattened. Those are the same kinds of statistical traces a detector may have learned to tie to generated content.
The in-loop filters add another layer, and some tune settings switch them off. By default x265 tunes for perceived visual quality, using psycho-visual optimisations that the psnr and ssim tunes turn off. The fastdecode tune disables both HEVC loop filters (--no-deblock --no-sao) along with weighted prediction. The animation tune sets --psy-rd 0.4 --aq-strength 0.4 --deblock 1:1. Two encodes at the same CRF with different tunes can therefore differ exactly in how much smoothing and texture shaping they apply. The studies cited here vary codec and CRF settings, not deblocking or SAO. We treat it as a plausible mechanism to test on your own detector, not as a measured effect.
Why Do Detector Scores Drift When No New Generator Has Appeared?
Scores drift because the detector was calibrated on one input distribution and the transcode quietly swapped in another. One assessment of video processing in deepfake detection notes that deep learning detectors are built and evaluated on constrained, high-quality datasets. That leaves them poorly prepared for real conditions, where social media video picks up compression, brightness changes and filters as it spreads. Content can also be compressed several times before it reaches a platform. In that assessment, none of the three methods tested could reliably classify deepfakes that had been heavily compressed. The FaceForensics++ detector study cited above saw the same pattern by degree: accuracy was 76.38% at x264 CRF 23 and fell to 68.23% at CRF 40.
Drift does not only go downward. A study ran a YOLOv3 pedestrian detector over KITTI frames encoded with libx264, libx265, NVIDIA’s hardware HEVC and AV1 across 52 CRF settings each. At the best CRF settings, lossy compression raised the match rate from a 68.8% baseline to 72.2% (x264), 72.1% (x265) and 72.4% (NVENC HEVC). The authors warn that the best settings vary with frame content and lighting, so the result cannot be generalised. What carries over to a moderation model is narrow: in that study, encoder settings pushed scores up as well as down.
Which Encode Settings to Log with Every Detector Score
Log the full encode profile next to each score; the bitstream’s parameter sets hold only tersely coded sequence characteristics. The Sequence Parameter Set stores bit depth, chroma format and picture dimensions. Reading it needs HEVC-aware tools. CRF, preset and tune are set as options of FFmpeg’s libx265 encoder.
| Parameter | What it changes in the encode | Where it is set |
|---|---|---|
| Encoder implementation and version (libx264, libx265, hevc_nvenc, QSV) | Some hardware encoders omit or modify B-frames, reference frames and RDO compared with software | FFmpeg -c:v; libx265 is FFmpeg’s x265 wrapper |
| Preset | Faster presets take shortcuts that cost quality and compression efficiency | preset (x265 has ten); NVENC p1 to p7 |
| CRF, QP or target bitrate | Sets how much detail quantisation removes; in one deepfake detector study, accuracy fell from x264 CRF 23 to CRF 40 | crf, qp, b, maxrate, bufsize |
| Rate-control mode | CBR, VBR, VBR-CQ and constant QP spread bits across frames differently | NVENC -rc; x265 crf, qp or bitrate |
| Tune | psnr and ssim disable psycho-visual optimisations; fastdecode disables both loop filters |
tune |
| Deblock and SAO | fastdecode disables both loop filters |
-x265-params key=value list |
| Adaptive quantisation | can lower objective metric scores | NVENC spatial or temporal AQ |
| GOP length, B-frames, reference frames | Set the I-frame spacing and the number of reference frames per P-frame | g, keyint_min, bf, refs |
| Profile and bit depth | Main is 8-bit per channel; Main 10 allows 10-bit | profile; readable from the SPS |
Recording these inputs lets a later score change be explained instead of guessed at. We see that as part of production AI reliability engineering, which is a separate discipline from model accuracy.
Should the Detector Score Media Before or After the HEVC Transcode?
Score before the delivery transcode wherever the pipeline allows it, and keep the original. In the FaceForensics++ study the detector did best on raw video, and every lossy encode cost accuracy. Delivery codecs are designed for human viewing, not for the evidence a detector needs. Once that information is gone, no threshold can bring it back. Keeping the original also means a later re-score, after a detector update or an investigation, runs on the same input as the first.
Sometimes only the delivery encode exists, for example with re-uploads compressed several times on the way. In that case, treat each distinct encode profile as its own operating condition. Read what the SPS gives you, record what the container and encoder metadata expose, and compare scores within a profile bucket rather than across buckets. A threshold calibrated on high-quality ingest should not be assumed to hold on a heavily compressed second-generation copy.
Moving an Ingest Path from Software x265 to a GPU HEVC Encoder
A GPU encoder is a different encoder, not a faster copy of x265. Hardware encoders are ASICs. To fit silicon limits, some implementations drop or change support for B-frames, the maximum number of reference frames and rate-distortion optimisation. In the 2025 evaluation by Arunruangsirilert and Katto, modern GPU encoders matched the medium software presets typically used for real-time work, but not the best software presets. At 1080p, NVIDIA’s encoder averaged 0.38 VMAF above the software baseline. Qualcomm’s implementation has no B-frame support and averaged 6.77 VMAF below it. A separate arXiv study of low-latency encoding at constant bitrate, with lookahead, two-pass and AQ disabled, found hardware encoders had much lower end-to-end latency than software, with slightly better RD performance.
Those results sit alongside BlazingCDN’s vendor blog, which, summarising public VMAF comparisons from 2023 to 2025, puts NVENC HEVC at roughly 15% to 25% more bits than x265 slow. The two sources use different baselines. The academic one compared against software presets fast enough for real time (faster for libx265 on its laptop CPU), while the blog compared against a slow VOD preset. The practical point holds either way: how far apart software and GPU HEVC land depends on which software preset you are replacing.
In the pedestrian study, NVENC HEVC scored 72.4% against 72.1% for libx265 at their best settings. That is one pedestrian detector, on one dataset, with one GPU, so check your own detector before rollout.
A Pre-Rollout Check for an Encoder Swap
- Take a stratified sample of originals per content type, including known synthetic and known clean items.
- Encode each with the current software x265 profile and the proposed GPU profile at matched target quality, logging every parameter in the table above.
- Run the detector on both encodes and on the originals.
- Compare score distributions per content type, not only the average. Look for shifts in the tails where the threshold sits.
- Measure decision agreement at the current threshold: the share of items that change side, split into synthetic and clean.
- Roll out only for content types where agreement holds. Elsewhere, treat the GPU profile as a new operating condition and re-baseline.
Telling Codec Drift from Generator Drift with Agreement Telemetry
As a working rule, codec-induced drift follows the encode profile, and generator-induced drift follows the content. Telemetry needs both dimensions to tell them apart. Track how often detector decisions agree with human review outcomes (see how AI content moderation workflows combine human review with model triage), split by content type and by encode profile. If agreement drops only in the profile buckets whose settings changed, and the originals still score as before, the cause is the codec. If agreement drops across every profile within a content type, including on originals, something about the content has changed, and a new generator is the likely suspect.
None of the sources we rely on measures this method directly, so treat it as engineering judgement and not as a validated protocol. It also depends on encode profiles being logged from day one. Without that record, a score shift cannot be attributed after the fact.
When an Encoder Change Justifies Re-Baselining the Threshold
| Situation | Threshold | Reasoning |
|---|---|---|
| Profile changed, matched-encode check shows stable agreement | Keep fixed | Scores moved inside the margin the threshold already tolerates |
| Profile changed, score distribution shifted in one content type | Re-baseline for that content type and profile only | The operating condition changed locally, so a global re-tune would disturb unaffected paths |
| Agreement fell across all profiles, originals included | Keep the threshold, investigate the detector | A threshold change would hide generator drift instead of addressing it |
| Ingest moved to a GPU encoder lacking B-frames or RDO | Re-baseline after the pre-rollout check | Encoder features differ materially from software x265 |
| Only delivery encodes available for a new source | Calibrate a separate bucket | None of three tested detectors classified heavily compressed deepfakes accurately |
When the answer is to re-baseline, the mechanics of finding the new operating point are covered in re-tuning confidence thresholds with a W&B sweep. The point to hold onto here is narrower. Re-baseline the bucket whose input changed, and never use a threshold move to absorb drift you have not yet attributed.
The reason this deserves engineering attention is that codecs like H.264 and H.265 are designed for human consumption, not for inference pipelines. That makes the compression layer something to design for the workload rather than a default inherited from delivery. TechnoLynx’s AI engineering for media, broadcast and telecom covers the point where codec choice and detector reliability meet in a broadcast or platform stack. The same logging discipline applies to the next codec on the roadmap, and VVC raises the same questions for ACR and moderation pipelines. The open question for most teams is not which codec wins. It is whether today’s logs could explain next month’s score shift.
FAQ
Is H.265 the Same as HEVC?
Yes. H.265 is the ITU-T name for High Efficiency Video Coding, which ISO/IEC publishes as 23008-2 (MPEG-H Part 2). x265 is one encoder that produces HEVC bitstreams, and x264 is an encoder for H.264/AVC.
Is H.265 10-Bit?
It can be. HEVC’s Main profile is limited to 8 bits per colour channel, while the Main 10 profile supports 10-bit.
Does x265 Lose Quality?
Slower presets recover quality at a given bitrate by testing more encoding options.