What Is Video Codec and Anonymization Quality?

Video codec and anonymization quality – definition

Video codec and anonymization quality refers to the relationship between the way video is compressed and the effectiveness of detecting faces and license plates, as well as the final quality of the blur applied to those areas. In practice, it describes how the encoding format and compression settings affect the amount of visual information available to object detection and tracking algorithms.

In the context of photo and video anonymization, the three most important groups of codec characteristics are the degree of lossy compression, the color sampling structure, and the frame organization within the stream. Codecs such as H.264/AVC and H.265/HEVC are lossy compression standards developed jointly by ITU-T and ISO/IEC, while Apple ProRes is a family of mezzanine codecs used mainly in post-production and designed to preserve higher source quality. H.264 was standardized as ITU-T H.264 and ISO/IEC 14496-10 AVC, H.265 as ITU-T H.265 and ISO/IEC 23008-2 HEVC, while ProRes is a vendor specification that is widely supported in editing environments.

For video anonymization, this leads to a simple rule: the fewer compression artifacts, the higher the effective resolution of the face or license plate area, and the more consistent the quality between frames, the higher the detection sensitivity tends to be and the lower the risk of incorrect or unstable blurring. However, this relationship is not linear. The detection model, frame extraction method, lighting, object motion, and bitrate often affect the outcome just as strongly as the codec choice itself.

How a video codec affects face and license plate detection

An anonymization system does not “understand” faces or license plates in a semantic way. It first analyzes pixels, and then an AI model, usually based on deep learning, locates objects using image features. If compression removes fine detail or introduces block distortion, ringing, or motion smearing, the model receives less reliable input data.

The most common mechanisms that reduce anonymization accuracy are:

  • loss of high-frequency detail – reduced visibility of the edges of the eyes, nose, mouth, or the characters on a plate,
  • chroma subsampling – typically 4:2:0 instead of 4:2:2 or 4:4:4, which lowers color precision around object boundaries,
  • inter-frame compression – dependence on I, P, and B frames can make stable tracking harder during sudden motion,
  • low bitrate – increased block artifacts and banding,
  • aggressive pre-encoding denoising – removal of micro-details needed by the detection model.

For faces, the problem is often the loss of local features. For license plate blurring, the critical factors are the edges of the rectangular plate area, the contrast of the characters, and the clarity of the plate outline. That is why heavily compressed footage may still look acceptable to a human viewer while being harder for an object detector to process.

H.264, H.265, and ProRes – practical differences for anonymization

These three options differ not only in compression efficiency but also in their typical use cases. For anonymization workflows, what matters is whether the footage is archival source material, an export from a recorder, or an intermediate editing file.

Codec

Compression type

Typical sampling

Impact on detection

Impact on blur quality

 

H.264/AVC

Lossy, highly compatible

Most often 4:2:0, 8-bit

Good at moderate bitrate, with visible quality loss under heavy compression

Mask edges may appear jagged when block artifacts are present

H.265/HEVC

Lossy, more efficient than H.264

Often 4:2:0, 8-bit or 10-bit

At the same visual quality, it usually requires less bitrate than H.264, but over-compressed footage still degrades detection

More stable image quality at a similar quality level and smaller file size, but local motion artifacts may still occur

Apple ProRes

Low-compression lossy, mezzanine

Often 4:2:2 or 4:4:4, higher bitrates

Usually the best input format for analysis among these three codec families

Typically offers the highest mask edge precision and the lowest risk of degradation after re-export

H.265 typically delivers similar visual quality at a lower bitrate than H.264, as confirmed by standardization documents, comparative JCT-VC literature, and academic studies on HEVC efficiency relative to AVC. However, this does not automatically mean higher detection performance. If the source footage was encoded at too low a bitrate, the codec’s efficiency cannot compensate for the lost information. ProRes usually provides the best starting point for face and license plate anonymization because it preserves more detail and handles further processing stages better.

Key parameters and metrics for assessing codec impact

The codec name alone is not enough. Two H.264 files can behave very differently if they use different bitrates, GOP structures, profiles, or resolutions. That is why technical assessment should be based on parameters and metrics.

In practice, you should monitor at least:

  • input resolution – the number of pixels representing a face or license plate within a frame,
  • average and peak bitrate – Mb/s,
  • GOP structure – spacing between I-frames and the presence of B-frames,
  • color sampling – 4:2:0, 4:2:2, 4:4:4,
  • bit depth – 8-bit or 10-bit,
  • image quality metrics – PSNR, SSIM, VMAF,
  • detection metrics – precision, recall, F1-score, IoU for the detection box,
  • tracking metrics – number of lost tracks and mask instability between frames.

The formula for recall is:

Recall = TP / (TP + FN)

where TP means correctly detected objects and FN means missed objects. For video anonymization, recall is critical. A missed face or license plate means there is a risk that no blur will be applied. Precision also matters, but a false positive is usually less risky than a false negative.

How the codec affects final blur quality

Anonymization quality is not only about detecting the object. It is equally important whether the mask accurately covers the face or license plate and whether it remains stable over time. Compression affects both stages.

With poor-quality input footage, the following issues become more common:

  • mask flickering between frames,
  • inaccurate coverage of object edges,
  • temporary loss of the face during head rotation or camera movement,
  • blurred areas that are too small because the detector underestimates the box size,
  • secondary degradation after re-export to a lossy codec.

For this reason, production environments often recommend performing anonymization on the highest-quality material available and only then exporting to the target format. This limits the accumulation of compression loss. In systems such as Gallio PRO, this is especially important when processing CCTV footage, mobile camera recordings, and evidentiary video, where the source is often already heavily compressed.

Challenges and limitations in anonymization workflows

The codec matters, but it is not the only factor. Even ProRes footage does not guarantee full effectiveness if a face occupies too few pixels, is occluded, or the scene is overexposed. On the other hand, well-recorded H.264 footage may be sufficient for accurate anonymization.

In practice, three limitations should be taken into account:

  • source quality cannot be “recovered” by the AI model alone,
  • re-compression after anonymization may reduce the clarity of mask boundaries,
  • automatic detection does not cover every potentially sensitive element, and some areas may require manual work in an editor.

This last distinction is organizationally important. Gallio PRO does not automatically detect logos, tattoos, name badges, documents, or content displayed on monitors. These areas can be blurred manually, but they are not part of the automatic detection discussed in this entry.

Standards references and technical sources

Assessing the impact of a video codec on anonymization should be based on source documents and on your organization’s own validation using real-world footage. The following standards and sources provide a technical reference point:

  • ITU-T Recommendation H.264 – Advanced video coding for generic audiovisual services, jointly with ISO/IEC 14496-10 AVC,
  • ITU-T Recommendation H.265 – High efficiency video coding, jointly with ISO/IEC 23008-2 HEVC,
  • Joint Collaborative Team on Video Coding (JCT-VC) documents on HEVC efficiency relative to AVC,
  • Apple materials on Apple ProRes, including profiles and bitrates used in post-production,
  • scientific literature on the impact of compression on computer vision, object detection, and facial recognition.

In data protection use cases, testing on a representative sample of footage is recommended. Detection performance should be compared across at least two bitrate levels and two input formats, and the results should be documented in a technical procedure. This approach aligns better with the principle of accountability than relying only on codec vendor claims.