XMedia Recode

H.264 Codec: Quantizers settings

H.264 Codec: Quantizers settings

Quantization in the libx264 H.264 codec controls how much the video is compressed—the higher the QP value, the more the image is compressed and the lower the quality. Choosing the appropriate quantization settings depends on your specific quality and file size requirements.


Advertisement

Minimum Quantizer

The Minimum Quantizer ensures that the quality of the video never drops below a certain threshold, even for very complex or detailed areas of the image. This means that the QP for compression will not be smaller than the set value. The purpose of this setting is to ensure a minimum quality and prevent too much detail from being lost in difficult scenes.

H.264: Minimum Quantizer

Maximum Quantizers

The Maximum Quantizer sets an upper limit for compression. This prevents the QP value from becoming too high, which would lead to a visible degradation of the image quality, such as visible blocking or blurred details. The value of the Maximum Quantizer therefore determines how much the video can be compressed and ensures that the compression does not become too lossy.

H.264: Maximum Quantizers

Maximum Quantizers Delta

The Maximum Quantizer Delta parameter in libx264 helps control quantizer fluctuations across adjacent image blocks. A lower value provides more consistent image quality and reduces visual artifacts, while a higher value provides more compression flexibility but may potentially compromise image quality. Choosing the optimal value depends on your file size and quality goals.

H.264: Maximum Quantizers Delta

IP Ratio

Modifies the target average increase in quantizer for I-frames as compared to P-frames. Higher values increase the quality of I-frames generated

PB Ratio

Modifies the target average decrease in quantizer for B-frames as compared to P-frames.
Higher values decrease the quality of B-frames generated.
Not used with mbtree (enabled by default), which calculates the optimum value automatically.

Chroma QP Offset

The Chroma QP Offset allows you to control the compression of the color information by adding an offset (a shift) to the default quantization value for the color components. A positive offset means that the color information is compressed more (higher QP value), while a negative offset compresses the color information less (lower QP value).

Example

  • A Chroma QP Offset of +2 means that the color information is compressed with a QP value 2 higher than the brightness information.
  • A Chroma QP Offset of -2 means that the color information is compressed with a QP value 2 lower than the brightness information.
H.264: Chroma QP Offset

Inter luma quantization deadzone

The Inter Luma Quantization Deadzone is a fine-tuning parameter for the quantization of luminance data in the inter-frame range. It affects how sensitive the codec is to small brightness changes. A larger deadzone can increase compression, while a smaller deadzone preserves more image detail, but this can increase file size. The appropriate value depends on the trade-off between image quality and file size.
Deadzones should be in the range of 0 to 32.

H.264: Inter luma quantization deadzone

Intra luma quantization deadzone

Set the size of the intra luma quantization deadzone.
Deadzones should be in the range of 0 to 32.

AQ Mode (Adaptive Quantization Mode)

The AQ mode (Adaptive Quantization Mode) in the libx264 H.264 codec is a technique for improving image quality by adaptively applying quantization (i.e., compression) to different image regions. AQ aims to improve visual quality by compressing highly varying image details more heavily in certain areas and compressing less in other areas that require more detail (such as faces or textures).

H.264: AQ Mode (Adaptive Quantization Mode)

Advertisement

AQ Strength (Adaptive Quantization Strength)

The AQ Strength parameter in the libx264 H.264 codec is an important component of adaptive quantization, allowing control over the degree to which the quantizer adapts to image complexity. A higher AQ Strength value results in better image quality, especially in rich detail, while a lower value maximizes compression but may compromise image quality. Choosing the optimal value depends on the specific image quality and file size requirements.


Share