Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Dither Video and Reduce Colors ====== Sometimes you need to reduce the number of colors you can use. Typically for gif, but sometimes other reasons. ===== Step 1 - create the palette ===== Example to batch process a bunch of Mp4 files for reducing to 14 colors parallel --ungroup -j16 -q ffmpeg -i "{}" -vf palettegen=max_colors=16 -y "{.}.png" ::: *.mp4 ===== Step 2 - use it ===== Here is my sample command parallel --ungroup -j24 -q ffmpeg -i "{}" -i "{.}.png" -filter_complex "paletteuse=dither=sierra3" -c:v libx264 -an -s 640x450 -crf 26 -pix_fmt yuv420p -y "{.}.MP4" ::: *.mp4 NOTE: this will give you the APPEARANCE of a dithered video, but the output is still full 8 bit color. This matters for images like gif or if you're turning to raw vidoe, but otherwise, it's simply for aesthetics scripts/ffmpeg/dither_video_reduce_colors.txt Last modified: 2025-04-08 08:39by Tony