Skip to content

Instantly share code, notes, and snippets.

@softworkz
Created November 6, 2022 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save softworkz/e310e3c84a338f98977d70b09e3e3f4f to your computer and use it in GitHub Desktop.
Save softworkz/e310e3c84a338f98977d70b09e3e3f4f to your computer and use it in GitHub Desktop.
Comparing Results of Paletteuse Patch

Command

ffmpeg -y -loglevel verbose -i "..\..\build\fate-suite\apng\o_sample.png" -filter_complex "split[split1][split2];[split1]palettegen=max_colors=255[pal1];[split2][pal1]paletteuse" -frames:v 1 out.png  

Result with Current FFmpeg

image

Result with Patch Applied

image

Achievable Result

(with pngquant, and even with the palette having alpha values!)

image

@softworkz
Copy link
Author

Also, despite the inferior appearance, the output file with the patch applied (5384 bytes) is even larger than without (4733 bytes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment