Choosing Codec Settings That Don't Break Watermarking or Moderation

Choose codec, profile and bitrate ladder by eliminating settings that break watermark detection or moderation accuracy, then cost the survivors.

Choosing Codec Settings That Don't Break Watermarking or Moderation
Written by TechnoLynx Published on 01 Nov 2026

Choose your codec, profile and bitrate ladder by elimination. Transcode a representative content set at every candidate setting, run your own forensic watermark detector and your own moderation classifier on the outputs, and drop every configuration that breaks either threshold. Only then pick the cheapest of the survivors on storage, encoding and delivery cost. You have to set those thresholds yourself. The only way to know how your moderation models behave after a codec change is to measure them.

The compression layer is engineering surface that should be designed for the workload, not transport infrastructure inherited from web defaults. A classifier and a watermark extractor both consume the codec’s output, so a codec chosen only on how the picture looks has skipped two of its consumers.

Codec choice under forensic watermark and moderation constraints

Selecting a codec and profile for user-generated or licensed video is a constrained optimisation. Storage and delivery cost is the thing to minimise. Moderation-classifier accuracy and forensic watermark survival after transcoding are hard limits you cannot trade away.

TechnoLynx runs this selection as an engineering engagement. The first step is agreeing the classifier and watermark acceptance thresholds, the target ladder and the content mix before any encoder setting is touched. From there, TechnoLynx’s AI engineering for media, broadcast and telecom work covers building the transcode-and-evaluate pipeline, validating each candidate against those thresholds, and monitoring both metrics after the chosen profile reaches production.

The elimination procedure, step by step

  1. Set the thresholds: a minimum precision and recall for each moderation class you care about, and a maximum watermark false-negative rate tied to how the watermark is used.
  2. Choose the candidates.
  3. Encode the same source set at every rung of the ladder for each candidate, so that the codec is the only thing that changes.
  4. Run the watermark detector and the moderation classifier on every output, and record results per rung and per content category.
  5. Eliminate any configuration that breaks either threshold at any rung it would actually ship.
  6. Cost the survivors on storage, encoding compute and delivery under your real audience mix.
  7. Deploy the winner with both metrics monitored.

The harness behind steps 3 and 4 is worth building once and keeping, so the same check can run again on the next codec or profile change instead of being rebuilt from scratch each time.

How much do HEVC or AV1 save once the constraints hold?

The savings are real, but encoding cost and audience mix shrink them and delay their arrival. In a Streaming Learning Center test, a 1080p60 football clip encoded to codec-specific ladders at matched quality (about VMAF 93 at the top rung) needed roughly 60% less bitrate with AV1 than with H.264, about 35% less with VP9 and about 31% less with HEVC. The same analysis then added encoding cost. With a CDN price of $0.02/GB, a baseline encode cost of $5/hour and encode-cost multipliers of 4x for AV1 and 2x for HEVC, it found break-even points of 1,140 viewing hours for HEVC and 2,025 for AV1. Under a mobile-centric audience distribution, AV1’s efficiency over H.264 fell to about 23% and HEVC’s to about 4%, and HEVC’s break-even rose to 7,936 hours.

The analysis’s own conclusion is that BD-rate gives only general guidance. Deciding when to switch codecs needs a return-on-investment calculation built on your own ladder, distribution pattern and cost structure. Gains also vary by content. A multi-codec DASH dataset study found AV1 averaged about 48% savings over AVC and 17% over HEVC, with gains that “vary strongly” between sequences. Only compute a savings figure for configurations that have already passed both checks.

Three caveats belong in the cost model. Codec distortion depends on image content, so one global setting may hide a content category that fails. AV1’s encoding premium can eat into storage savings when the transcode compute budget is tight. And in the Ghent University–imec measurements, detection failed only under the strongest, quality-reducing recompression, which is why the lowest rungs need the closest testing.

Moderation classifiers need a side-by-side run against the current baseline

To find out whether AV1 or a new HEVC profile changes what your moderation classifiers flag or miss, run the same classifier version on identically sourced content transcoded under each candidate and under your current H.264 or HEVC baseline, then compare false-negative and false-positive rates class by class. Generic codec comparisons measure perceived picture quality, and your classifier is not a human viewer.

A side-by-side table is straightforward once the harness exists: one row per content class, one column pair (false negatives, false positives) per candidate, and the baseline as the reference column. The decision rule follows from it. If every class stays within an agreed tolerance of baseline, approve the candidate. If any class loses recall or precision beyond tolerance, reject the candidate or restrict it to the profile and bitrate range where it held.

As for which compression settings distort what classifiers depend on: lossy compression and low-pass filtering such as denoising discard low-amplitude, high-frequency detail, and very low ladder rungs compress hardest. Encoder tuning modes for quality metrics deserve suspicion too. A 2021 study of objective video quality metrics reports that libaom’s VMAF tuning mode applies preprocessing that can significantly reduce visual quality while raising the metric score. A setting that improves a quality number can still change the pixels your classifier was trained on.

Three conditions limit what the results mean. They are tied to the classifier version tested, so re-run them after retraining. The content set has to reflect the production distribution, including adversarial and edge cases. And track the watermark detector and the classifier separately against the same codec change. The tolerance itself is a business decision.

Does forensic watermark detection still work after transcoding to HEVC or AV1 at each rung of our bitrate ladder?

You can only answer that by re-encoding watermarked content at each candidate codec, profile and bitrate and running your watermarking vendor’s own detector on the results. Survival depends on the encoder’s operating point, so test the scheme you actually run.

The reason is in how real codecs distort a signal. A 2026 analysis of robustness limits in deep watermarking describes H.264 and HEVC compression as arguably the most frequent degradation content goes through and the hardest to reproduce in training. Hybrid codecs combine intra- and inter-prediction, block transforms, quantisation, entropy coding and in-loop filters, so the resulting distortion cannot be reduced to a few simple differentiable operations. That distortion depends on image content, the encoder’s operating point and the GOP structure. With rate control the problem gets worse: encoders allocate bits by content, so a fixed quality parameter is not a fixed distortion. A detector that passes at “CRF 23” on one clip has not passed at CRF 23 on your catalogue.

Do not assume codec-aware training will save a marginal profile. In the same 2026 analysis, an extractor trained on a codec at constant rate factors 16 to 23 read worse at all three of those points than an extractor that had never seen a codec. At rate factor 16 its error rate rose from 0.1091 to 0.2033. Other work points the other way: the Video Seal authors (2024) report that training with differentiable compression augmentation gives significant bit-accuracy gains, especially at the strong compression of CRF 40 and 50. The two results come from different designs, and taken together they show that robustness claims do not transfer between schemes, which is the case for testing the one you run.

Video Seal (2024) uses H.264 at CRF 30 as its representative compression test, and a 2017 paper measured correlation after two H.264/HEVC cycles. Mareen et al. at Ghent University–imec report a zero false-negative rate for most attacks on their frame-replacement forensic watermark, with failures only at the highest recompression QP values. Moving part of the ladder to AV1 stays an open question until your vendor’s detector has run on AV1 output. If detection fails above the bitrate you planned to ship, you have two options: raise the floor and pay for it, or adopt a more robust watermarking technique before AV1 ships.

What is the minimum bitrate below which a forensic video watermark becomes undetectable, and what does that floor cost in storage?

Detection does fail under strong enough compression, but the published measurements are for other schemes. In the Ghent University–imec measurements, detection failed only when strong, quality-reducing recompression was applied. Below some strength the watermark signal is too weak to read, and above some strength it becomes visible. Within that window, strength is the lever: at 64 bits, raising embedding strength from 1.0 to 1.5 cost 3.5 dB of transparency and cut the error rate under H.264 at rate factor 23 from 0.2987 to 0.2623. At high payloads the window closes to a single setting, and the lever disappears.

The storage cost has two parts. The first is the watermark’s own overhead, which differs by scheme. A PLOS ONE HEVC scheme that embeds in quantised transform coefficients increased frame size by 6.6% on average at QP 18 and 3.9% at QP 32, and its authors say its robustness still needs work. The frame-replacement method reports a bit increase rate close to 0%. The second part is the floor itself: raise every rung below the tested survival bitrate to the floor or remove it from the ladder. Estimate the cost as the added bitrate on those rungs, multiplied by the viewing hours those rungs actually serve, multiplied by your CDN price.

Two caveats keep the floor honest. Re-validate the floor when the detector version or the test content changes, since codec distortion depends on image content. And a false-negative rate that is fine for piracy tracing may not meet the threshold expected of forensic evidence.

One shared ladder for phone uploads and partner feeds

Our recommendation is one codec, profile and ladder design for both low-resolution phone uploads and high-resolution partner feeds. It works if the ladder is built on a shared baseline profile with a small, explicit set of rungs, plus narrowly scoped exceptions at the extremes, rather than separate pipelines for moderation and watermarking.

TechnoLynx would start by cataloguing the real spread of input resolutions and bitrates across uploads and partner feeds, along with the codec, profile and level matrix your moderation and watermarking tools accept. TechnoLynx would then design the baseline ladder, build the GPU-accelerated transcode (NVENC/NVDEC hardware encoding for HEVC and H.264) on your target hardware, and validate moderation accuracy, watermark detection and throughput on every rung, boundary exceptions included.

Profile and level are what determine device compatibility: in H.264, levels cap resolution, frame rate and bitrate, and choosing the profile-level combination decides compatibility and playback reliability. AV1 accepts 4:0:0, 4:2:0, 4:2:2 and 4:4:4 input at 8, 10 or 12 bits. That range is wide enough that a partner feed can arrive in a format your watermark or moderation tooling does not parse.

Plan for exceptions at both ends. At the low end, test whether upscaling a small phone upload affects moderation or watermark detection. At the high end, downsampling a partner feed has to preserve watermark integrity and the detail moderation relies on. Partner contracts may also require a specific profile or level, which forces an exception whatever the technical need.

A/B forensic watermarking puts hard limits on ladder design. In the DASH-IF OTT watermarking architecture, each segment is prepared as pre-watermarked variants (two in the A/B case, one encoding ‘0’ and one ‘1’), and each viewer receives a unique sequence of them. Minimum segment duration has to allow for the watermark technology, so that each segment carries only one bit. AWS Elemental MediaLive’s A/B implementation produces A and B variants of every rendition in the output group. Producing two variants per rendition duplicates the watermarked content. MediaLive also requires output widths of 240 to 3,840 pixels and heights of 240 to 2,160, epoch locking, an embedded UTC timecode and an explicitly specified frame rate. A 256×144 rung, like the lowest one in the 2018 multi-codec DASH dataset ladder, falls below that 240-pixel height minimum. DASH-IF also describes switching watermark enforcement off when it is not needed, so the system does not keep duplicate content.

Keep the variant count small. The right number is the smallest set that covers the input spread you actually measured. A typical H.264 adaptive ladder has 4 to 6 renditions from 240p to 1080p. Pruning helps further: a 2023 multi-codec bitrate-ladder study removed representations whose VMAF differed by less than a just-noticeable-difference threshold, and redundant newer-codec rungs that sat below the AVC rate-distortion curve. In a live session where every client decoded AVC, HEVC and AV1, that cut stored data by 77.61% against the HLS ladder. Each extra variant adds storage, QA and pipeline complexity even when it is individually justified, and GPU transcoding capacity changes how many you can afford.

Re-QC and sign-off against the CDN ladder and device matrix

Treat a change of encoder as a change to test, even when the codec name stays the same. Check the bitrate-to-quality mapping, profile and level, and GOP structure of the new path. Re-QC every rung and profile produced by the changed encoder path against your existing compatibility matrix. A named owner should sign off against a specific matrix version before rollout.

You need not re-QC the whole ladder, with one exception. If the change touches shared parameters, re-QC the “untouched” rungs too. GOP length is the usual one: a 2-second keyframe interval is typically aligned with 2-second HLS segment boundaries, so changing it on one path can misalign segments across renditions that players switch between. Codec structure in the manifest matters as well. In the 2018 multi-codec DASH dataset, each codec’s representations sit in one AdaptationSet, which allows seamless switching within a codec and switching across codecs only where the client and device support it. Check separately whether the AV1 rungs behave consistently across the real client decoder population, not just in the lab.

Treat a sign-off as valid only against the matrix it referenced. Record the matrix version alongside the approval. Any rung that fails on a supported device class gets its settings adjusted or is left out of the change.

Re-encoding footage that may end up as evidence

To show that a re-encode is not meaningfully worse than the original, keep the original masters, log every encoding setting, and run an objective before-and-after comparison with more than one metric before the profile is used. The OSAC 2022-S-0031 workflow guide says transcoding to a lossy format must be avoided when video will be used for further analysis. Where circumstances force it, the reasoning has to be documented and the result must accurately represent the original. The same guide prefers lossless techniques such as re-wrapping the original bitstream into a new container, while noting that re-wrapping may change metadata such as creation times. SWGDE’s video authentication best practices describe stream hashing to confirm that streams were not altered during conversion.

The objective check’s own method needs scrutiny too. A 2021 study of objective quality metrics in codec comparisons found that metric configuration, such as luma-only versus weighted YUV summation, significantly changes how codecs rank. The same study found modifications of PSNR unjustified for AV1, where multiscale metrics such as VMAF and MS-SSIM tracked viewer scores better. Its recommendation is to use a set of metrics and watch for sharp fluctuations on individual clips. The method behind a check opposing counsel will accept is covered in designing defensible quality validation for codec and AI pipeline changes.

Signal metrics have limits. PSNR and SSIM may not capture what an examiner or a court treats as meaningful degradation. You may not know in advance how the other side will test the footage. A written rationale linking your settings to the evidentiary standard is therefore worth producing alongside the metrics. The legal judgement on admissibility belongs to counsel.

What should we do with legacy footage already encoded at older settings, and will today’s choice force a full re-transcode later?

Normalise legacy footage only where it fails current evidentiary or storage criteria, because every lossy re-encode costs quality. In Gough Lui’s 2016 x264 tests at CRF 20, the second generation lost about 1.5 dB against the first and the fifth reached about 3 dB, and lossy-to-lossy encoding produced noticeable loss even after a single generation. Where HEVC archives do move to AV1, a 2019 EUSIPCO transcoder that reuses HEVC block-depth decisions cut transcoding time by 35.4% to 69.5%, at a compression efficiency loss of 4.9% to 16.8% depending on mode. Footage that passes current criteria can stay as it is, with the reasoning written down.

No setting chosen today guarantees you will never re-transcode. Codec standards, court requirements and storage policy are outside the control of any encoder parameter. Choose settings that meet today’s evidentiary and retention requirements with margin, and write down a migration policy for format drift, instead of promising that the archive is permanent.

Pre-ship checklist for a codec or profile change

Check Passes when If it fails
Watermark detection with the vendor’s own detector False-negative rate stays within threshold at every shipped rung, per content category Raise the bitrate floor, strengthen the embedding, or change the watermarking technique
Moderation classifier, side by side with baseline Every class stays within the agreed false-negative/false-positive tolerance Reject the candidate or restrict it to the passing profile and bitrate range
A/B watermark constraints Rung dimensions, frame rate, locking mode and segment duration meet the watermarking system’s limits Drop or rework the rung, or leave it unwatermarked by policy
Device and CDN ladder compatibility Changed rungs, and rungs sharing GOP or container parameters, pass the versioned matrix Adjust settings for that rung or exclude it from the change
Evidentiary footage Originals and settings log kept; multi-metric before-and-after check documented Do not re-encode that footage
Cost Savings computed for survivors only, with encoding premium and audience mix included Keep the current codec for that part of the ladder

FAQ

What is meant by forensic watermarking?

A forensic watermark changes media content in a robust, invisible way so that it encodes a unique identifier, such as a session ID. That identifier lets a leaked copy be traced back to its source.

Back See Blogs
arrow icon