Created
April 3, 2019 08:17
-
-
Save joannecheng/34fdc6df14e118741b25f689a3e42cac to your computer and use it in GitHub Desktop.
Movie to GIF using ffmpeg
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
if [ $# -eq 0 ] ; then | |
echo "example use: 'movie-to-gif.sh [movie-file]'" | |
exit 0 | |
fi | |
ffmpeg -i $1 -filter_complex "[0:v] palettegen" $1-palette.png | |
ffmpeg -i $1 -i $1-palette.png -filter_complex "[0:v][1:v] paletteuse" $1.gif | |
rm $1-palette.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment