ShortKatz
27th October 2025, 20:15
I try to better understand the meaning of the parameters --qm-min & --qm-max and --chroma-qm-min & --chroma-qm-max. The help file only mentions it controls the "flatness".
I asked ChatGPT, GitHub Copilot and Le Chat to give me a very simple and understandable explanation. But because KI systems sometimes explain you things incorrectly, could you please check if this is all correct? :confused:
I also asked:
And please give me parameters that are recommended for:
1. Archiving of anime movies
2. Archiving of 4k action movies (fast movements, lots of dark scenes, HDR10, Dolby Vision).
The AI systems ChatGPT / GitHub Copilot vs. Le Chat kind of contradict each other in terms of what higher numbers and lower numbers do, but they are quite consistent in terms of the values they recommend for my two scenarios.
ChatGPT responded:
What “QM” (Quantization Matrix) means — in simple words
When compressing video (AV1, HEVC, etc.), the encoder decides how much detail to throw away to save bits.
The quantization matrix (QM) tells the encoder how aggressively to reduce fine details in different parts of the image — mainly textures and high frequencies.
You can think of it like this:
A flatter matrix (higher QM level) means: less variation, smoother quantization, more uniform treatment — fewer artifacts, but possibly a little less detail.
A rougher matrix (lower QM level) means: more contrast in quantization, sharper but riskier — can preserve more fine detail, but also cause ringing or blocky artifacts.
So the parameters define a range of how flat or detailed the quantization matrices can be:
--qm-min: the minimum flatness (lower = allows more detail / less flat)
--qm-max: the maximum flatness (higher = flatter / smoother quantization)
--chroma-qm-min and --chroma-qm-max: same idea, but for the color (chroma) planes.
Recommended settings for your use cases
Let’s balance quality vs. smoothness based on content.
�� 1. Archiving anime movies
Why special:
Anime has large flat color areas, thin line art, and minimal texture. Too much “detail preservation” (low QM) can make lines noisy or introduce banding.
Goal: Keep lines clean and colors consistent → favor flatter QMs.
✅ Recommended QM parameters:
--qm-min=6
--qm-max=12
--chroma-qm-min=8
--chroma-qm-max=15
Rationale:
Slightly less flat than SVT-AV1 default (8–15), so you keep some edge definition.
Still smooth enough to avoid banding or noisy chroma edges.
If you use SVT-AV1-PSY, you might increase qm-min slightly (e.g. 4 instead of 2) to avoid over-sharpening.
�� 2. Archiving 4K action movies (HDR10 / Dolby Vision)
Why special:
Lots of motion, dark scenes, and HDR gradients. You need to preserve subtle lighting and texture details.
Goal: Keep high dynamic range detail and texture → use less flat matrices.
✅ Recommended QM parameters:
--qm-min=4
--qm-max=10
--chroma-qm-min=6
--chroma-qm-max=12
Rationale:
Similar to aomenc and svt-av1-hdr defaults — good HDR preservation.
Avoids over-flattening highlights and shadows.
Slightly tighter chroma range helps preserve saturated colors in HDR.
If your source is Dolby Vision with fine gradients, consider even narrower:
--qm-min=4
--qm-max=8
This preserves delicate tone mapping transitions better.
Le Chat responded:
What Do These Parameters Do?
Quantization Matrix (QM) Flatness
Quantization matrices are tools used in video encoding to control how much detail is preserved or discarded during compression.
Flatness refers to how "uniform" or "smooth" the quantization is:
Higher flatness (higher number): The matrix is flatter, meaning less variation in how different frequencies (details) are quantized. This generally preserves more detail but can reduce compression efficiency.
Lower flatness (lower number): The matrix is more "shaped," meaning more aggressive quantization for certain frequencies, which can increase compression but may lose detail or introduce artifacts.
Luma vs. Chroma
Luma (--qm-min/max): Controls flatness for brightness/detail (black & white) information.
Chroma (--chroma-qm-min/max): Controls flatness for color information.
What Do the Defaults Mean?
SVT-AV1 (Standard)
Luma: Min 8, Max 15
Starts moderately flat, allows for some variation.
Chroma: Min 8, Max 15
Same as luma, balanced approach.
SVT-AV1-HDR
Luma: Min 5, Max 10
Less flat by default, likely to preserve more detail in HDR content.
Chroma: Min 8, Max 15
Same as standard, likely because chroma is less critical for HDR.
SVT-AV1-PSY (Psycho-visual tuning)
Luma: Min 2, Max 15
Very low minimum, allowing for more aggressive shaping to exploit human visual perception.
Chroma: Min 8, Max 15
Same as standard, likely because chroma is less perceptually sensitive.
Aomenc
Luma: Min 5 (4 in all-intra), Max 9 (10 in all-intra)
More conservative, likely optimized for general-purpose encoding.
What Does This Mean in Practice?
Higher min/max values: More detail preserved, larger file size.
Lower min/max values: More compression, smaller file size, but risk of artifacts.
HDR and PSY forks: Tailored for specific content types (HDR for high dynamic range, PSY for perceptual optimization).
Recommended Parameters
1. Archiving Anime Movies
Goal: Preserve sharp edges, flat colors, and fine details.
Luma: --qm-min 6, --qm-max 12
Chroma: --chroma-qm-min 8, --chroma-qm-max 12
Rationale: Anime often has large flat areas and sharp lines. A slightly less flat luma matrix helps preserve edges, while chroma can be flatter to avoid color banding.
2. Archiving 4K Action Movies (HDR10/Dolby Vision, Fast Motion, Dark Scenes)
Goal: Preserve detail in dark areas, handle fast motion, and retain HDR highlights.
Luma: --qm-min 4, --qm-max 10
Chroma: --chroma-qm-min 7, --chroma-qm-max 12
Rationale: Lower luma flatness helps retain detail in dark scenes and fast motion. Chroma can be slightly less flat to avoid color artifacts in HDR.
Additional Tips
For HDR content: Consider using the SVT-AV1-HDR preset as a starting point.
For perceptual quality: If you want to maximize perceived quality, experiment with the SVT-AV1-PSY preset.
Always test: Encode a short clip with different settings and compare visually and with metrics (e.g., VMAF).
And GitHub Copilot (Claude Sonnet):
What These Parameters Do:
Quantization Matrices (QM) control how much detail is preserved in different parts of the image. Think of it like a detail-preservation control system:
Lower numbers (0-7): Preserve more fine details, textures, and subtle changes
Higher numbers (8-15): Make the image "flatter" with fewer subtle variations, which can help with compression
The parameters come in pairs:
qm-min and qm-max: Control detail preservation for brightness (luma)
chroma-qm-min and chroma-qm-max: Control detail preservation for colors (chroma)
Recommendations:
For Anime Movies Archiving:
Code
--qm-min 4 --qm-max 8 --chroma-qm-min 6 --chroma-qm-max 10
Reasoning:
Lower QM values to preserve sharp lines and detailed artwork
Moderate chroma values to maintain color vibrancy while allowing some compression
This balances detail preservation with reasonable file sizes
Works well with cel-shaded animation and flat color areas
For 4K HDR/DV Action Movies:
Code
--qm-min 5 --qm-max 10 --chroma-qm-min 5 --chroma-qm-max 12
Reasoning:
Balanced luma QM values to preserve HDR detail while handling noise in dark scenes
Lower chroma minimum to preserve subtle color gradients in HDR
Higher chroma maximum to help compress areas with less noticeable color variation
These settings help maintain HDR quality while managing file size with fast-moving content
I asked ChatGPT, GitHub Copilot and Le Chat to give me a very simple and understandable explanation. But because KI systems sometimes explain you things incorrectly, could you please check if this is all correct? :confused:
I also asked:
And please give me parameters that are recommended for:
1. Archiving of anime movies
2. Archiving of 4k action movies (fast movements, lots of dark scenes, HDR10, Dolby Vision).
The AI systems ChatGPT / GitHub Copilot vs. Le Chat kind of contradict each other in terms of what higher numbers and lower numbers do, but they are quite consistent in terms of the values they recommend for my two scenarios.
ChatGPT responded:
What “QM” (Quantization Matrix) means — in simple words
When compressing video (AV1, HEVC, etc.), the encoder decides how much detail to throw away to save bits.
The quantization matrix (QM) tells the encoder how aggressively to reduce fine details in different parts of the image — mainly textures and high frequencies.
You can think of it like this:
A flatter matrix (higher QM level) means: less variation, smoother quantization, more uniform treatment — fewer artifacts, but possibly a little less detail.
A rougher matrix (lower QM level) means: more contrast in quantization, sharper but riskier — can preserve more fine detail, but also cause ringing or blocky artifacts.
So the parameters define a range of how flat or detailed the quantization matrices can be:
--qm-min: the minimum flatness (lower = allows more detail / less flat)
--qm-max: the maximum flatness (higher = flatter / smoother quantization)
--chroma-qm-min and --chroma-qm-max: same idea, but for the color (chroma) planes.
Recommended settings for your use cases
Let’s balance quality vs. smoothness based on content.
�� 1. Archiving anime movies
Why special:
Anime has large flat color areas, thin line art, and minimal texture. Too much “detail preservation” (low QM) can make lines noisy or introduce banding.
Goal: Keep lines clean and colors consistent → favor flatter QMs.
✅ Recommended QM parameters:
--qm-min=6
--qm-max=12
--chroma-qm-min=8
--chroma-qm-max=15
Rationale:
Slightly less flat than SVT-AV1 default (8–15), so you keep some edge definition.
Still smooth enough to avoid banding or noisy chroma edges.
If you use SVT-AV1-PSY, you might increase qm-min slightly (e.g. 4 instead of 2) to avoid over-sharpening.
�� 2. Archiving 4K action movies (HDR10 / Dolby Vision)
Why special:
Lots of motion, dark scenes, and HDR gradients. You need to preserve subtle lighting and texture details.
Goal: Keep high dynamic range detail and texture → use less flat matrices.
✅ Recommended QM parameters:
--qm-min=4
--qm-max=10
--chroma-qm-min=6
--chroma-qm-max=12
Rationale:
Similar to aomenc and svt-av1-hdr defaults — good HDR preservation.
Avoids over-flattening highlights and shadows.
Slightly tighter chroma range helps preserve saturated colors in HDR.
If your source is Dolby Vision with fine gradients, consider even narrower:
--qm-min=4
--qm-max=8
This preserves delicate tone mapping transitions better.
Le Chat responded:
What Do These Parameters Do?
Quantization Matrix (QM) Flatness
Quantization matrices are tools used in video encoding to control how much detail is preserved or discarded during compression.
Flatness refers to how "uniform" or "smooth" the quantization is:
Higher flatness (higher number): The matrix is flatter, meaning less variation in how different frequencies (details) are quantized. This generally preserves more detail but can reduce compression efficiency.
Lower flatness (lower number): The matrix is more "shaped," meaning more aggressive quantization for certain frequencies, which can increase compression but may lose detail or introduce artifacts.
Luma vs. Chroma
Luma (--qm-min/max): Controls flatness for brightness/detail (black & white) information.
Chroma (--chroma-qm-min/max): Controls flatness for color information.
What Do the Defaults Mean?
SVT-AV1 (Standard)
Luma: Min 8, Max 15
Starts moderately flat, allows for some variation.
Chroma: Min 8, Max 15
Same as luma, balanced approach.
SVT-AV1-HDR
Luma: Min 5, Max 10
Less flat by default, likely to preserve more detail in HDR content.
Chroma: Min 8, Max 15
Same as standard, likely because chroma is less critical for HDR.
SVT-AV1-PSY (Psycho-visual tuning)
Luma: Min 2, Max 15
Very low minimum, allowing for more aggressive shaping to exploit human visual perception.
Chroma: Min 8, Max 15
Same as standard, likely because chroma is less perceptually sensitive.
Aomenc
Luma: Min 5 (4 in all-intra), Max 9 (10 in all-intra)
More conservative, likely optimized for general-purpose encoding.
What Does This Mean in Practice?
Higher min/max values: More detail preserved, larger file size.
Lower min/max values: More compression, smaller file size, but risk of artifacts.
HDR and PSY forks: Tailored for specific content types (HDR for high dynamic range, PSY for perceptual optimization).
Recommended Parameters
1. Archiving Anime Movies
Goal: Preserve sharp edges, flat colors, and fine details.
Luma: --qm-min 6, --qm-max 12
Chroma: --chroma-qm-min 8, --chroma-qm-max 12
Rationale: Anime often has large flat areas and sharp lines. A slightly less flat luma matrix helps preserve edges, while chroma can be flatter to avoid color banding.
2. Archiving 4K Action Movies (HDR10/Dolby Vision, Fast Motion, Dark Scenes)
Goal: Preserve detail in dark areas, handle fast motion, and retain HDR highlights.
Luma: --qm-min 4, --qm-max 10
Chroma: --chroma-qm-min 7, --chroma-qm-max 12
Rationale: Lower luma flatness helps retain detail in dark scenes and fast motion. Chroma can be slightly less flat to avoid color artifacts in HDR.
Additional Tips
For HDR content: Consider using the SVT-AV1-HDR preset as a starting point.
For perceptual quality: If you want to maximize perceived quality, experiment with the SVT-AV1-PSY preset.
Always test: Encode a short clip with different settings and compare visually and with metrics (e.g., VMAF).
And GitHub Copilot (Claude Sonnet):
What These Parameters Do:
Quantization Matrices (QM) control how much detail is preserved in different parts of the image. Think of it like a detail-preservation control system:
Lower numbers (0-7): Preserve more fine details, textures, and subtle changes
Higher numbers (8-15): Make the image "flatter" with fewer subtle variations, which can help with compression
The parameters come in pairs:
qm-min and qm-max: Control detail preservation for brightness (luma)
chroma-qm-min and chroma-qm-max: Control detail preservation for colors (chroma)
Recommendations:
For Anime Movies Archiving:
Code
--qm-min 4 --qm-max 8 --chroma-qm-min 6 --chroma-qm-max 10
Reasoning:
Lower QM values to preserve sharp lines and detailed artwork
Moderate chroma values to maintain color vibrancy while allowing some compression
This balances detail preservation with reasonable file sizes
Works well with cel-shaded animation and flat color areas
For 4K HDR/DV Action Movies:
Code
--qm-min 5 --qm-max 10 --chroma-qm-min 5 --chroma-qm-max 12
Reasoning:
Balanced luma QM values to preserve HDR detail while handling noise in dark scenes
Lower chroma minimum to preserve subtle color gradients in HDR
Higher chroma maximum to help compress areas with less noticeable color variation
These settings help maintain HDR quality while managing file size with fast-moving content