dcloud / MOS

Easily create animated GIFs from video files using ffmpeg
GNU General Public License v2.0
0 stars 0 forks source link

Add color palette generation #3

Open dcloud opened 5 years ago

dcloud commented 5 years ago

Generate a color palette from the clip first, then use that to aid in making a better quality gif. See https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/:

$ ffmpeg -i StickAround.mp4 -filter_complex "[0:v] palettegen" palette.png
$ ffmpeg -i StickAround.mp4 -i palette.png -filter_complex "[0:v][1:v] paletteuse" prettyStickAround.gif

But will need to do a bit more than that (incorporate framerate, other args)

dcloud commented 5 years ago
$ ffmpeg -ss 61.0 -t 2.5 -i StickAround.mp4 -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" SmallerStickAround.gif