Created
April 21, 2019 11:02
-
-
Save ahmedam55/a40a4df8c4225c349ab6d189b3f92192 to your computer and use it in GitHub Desktop.
Convert Video to Gif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gif { | |
ffmpeg -y -i $1 -vf fps=10,scale=${2:-1280}:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -i $1 -i palette.png -filter_complex "fps=10,scale=${2:-1280}:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif | |
rm palette.png | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment