-
Notifications
You must be signed in to change notification settings - Fork 125
Video to Gif Conversion
Lukas Herman edited this page Nov 6, 2020
·
1 revision
#!/bin/sh
palette="/tmp/palette.png"
filters="fps=10,scale=1280:720:flags=lanczos"
ffmpeg -v warning -i $1 -t 30 -vf "$filters,palettegen=stats_mode=diff" -y $palette
ffmpeg -i $1 -i $palette -t 30 -lavfi "$filters,paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle" -y $2
gifsicle --lossy=90 -O3 $2 -o $3 --no-conserve-memory
Usage
Developer Guide