Ffmpeg animated gif - blotchy

I am generating an animated gif from mp4 ... but due to (I think) a decrease in color (the gif requires -pix_fmt rgb24), the result is somewhat ... blotchy? for example, to run an image through oil paint (or, possibly, “posterize”) a special effects filter. I think the quality might be better, but I don’t know what to customize.

I'm not sure about that ... but the eyepiece in the color palette of the resulting gif in the image editor, it seems he didn’t even try to create a color palette specific to this clip, but instead tries to create a common palette ... that takes up a lot of pixmap space. That is, if I interpret it correctly.

Any tips on keeping the original video image instead of getting an “animated” gif-affixed font?

+6
source share
2 answers

To get the best gif files, you can use the created palettes. palettegen filter will generate png palette for use with paletteuse .

 ffmpeg -i input.mkv -vf palettegen palette.png ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif 
+10
source

You can try using -vf format=rgb8,format=rgb24 .

0
source

Source: https://habr.com/ru/post/951445/


All Articles