Why do AI-generated clips show banding in skies and fog, and when should I use FFmpeg gradfun versus deband versus a 10-bit master?
Problem. Smooth gradients (sky, fog, walls, vignettes) in generated clips show contour bands, usually worse after delivery encoding. Conditions. 8-bit delivery. BT.709 8-bit coding assigns black 16 and nominal peak 235 (219 steps); 10-bit assigns 64 and 940 (876 steps), so 10-bit has four times the steps over the same range (arithmetic from the table). Open tools quantise float frames to uint8 before encoding (see P-L1-4-03). Method. (1) Decide where the bands enter: at the 8-bit cast/export, or at lossy compression. (2) For a playback-only copy, FFmpeg gradfun=strength[:radius]: strength range .51 to 64 (default 1.2) is both the maximum change per pixel and the flat-region threshold; radius 8 to 32 (default 16); a larger radius gives smoother gradients but protects pixels near detail. The FFmpeg doc says it is designed for playback only and must not be used before lossy compression because compression loses the dither and brings the bands back. (3) deband filter: replaces banded pi...
Structured fields
{
"citations": [
{
"url": "https://ffmpeg.org/ffmpeg-filters.html",
"note": "11.113 gradfun; 11.113 gradfun; 11.54 deband; 11.54 deband; 11.54 deband; Section 4 digital representation; Section 4 digital representation; Section 4"
},
{
"url": "https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-6-201506-I!!PDF-E.pdf",
"note": "11.113 gradfun; 11.113 gradfun; 11.54 deband; 11.54 deband; 11.54 deband; Section 4 digital representation; Section 4 digital representation; Section 4"
}
]
}Evidence claims
- [sourced_fact] Problem. Smooth gradients (sky, fog, walls, vignettes) in generated clips show contour bands, usually worse after delivery encoding. Conditions. 8-bit delivery. BT.709 8-bit coding assigns black 16 and nominal peak 235 (219 steps); 10-bit assigns 64 and 940 (876 steps), so 10-bit has four times the steps over the same range (arithmetic from the table). Open tools quantise float frames to uint8 before encoding (see P-L1-4-03). Method. (1) Decide where the bands enter: at the 8-bit cast/export, or at lossy compression. (2) For a playback-only copy, FFmpeg gradfun=strength[:radius]: strength range .51 to 64 (default 1.2) is both the maximum change per pixel and the flat-region threshold; radius 8 to 32 (default 16); a larger radius gives smoother gradients but protects pixels near detail. The FFmpeg doc says it is designed for playback only and must not be used before lossy compression because compression loses the dither and brings the bands back. (3) deband filter: replaces banded pixels with the average of referenced pixels; thresholds 1thr..4thr per plane (default 0.02, range 0.00003 to 0.5), range (default 16), direction, blur (default on), coupling (default off; if on, a pixel changes only when all components are banded). (4) For a master, keep a higher bit depth as long as possible and only quantise once to 8-bit with dither (P-L1-4-02); Runway documents a 10-bit Rec.709 HEVC output for two of its models (P-L1-4-04). Example. gradfun=3.5:8 is the doc's own example of strength 3.5, radius 8. Failure modes. [inference] strong thresholds can smear genuine low-contrast texture (skin, fabric); deband on a clip with intentional film grain may remove it; fixing banding in an 8-bit file after it has been compressed is fixing a symptom. Limitations. I did not run either filter on generated footage; no source read measures banding in AI video specifically. Version/date. FFmpeg docs as served 2026-10-23; BT.709-6 (06/2015). · locator: 11.113 gradfun; 11.113 gradfun; 11.54 deband; 11.54 deband; 11.54 deband; Section 4 digital representation; Section 4 digital representation; Section 4 source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |