Created
April 26, 2018 08:16
-
-
Save damien-monni/d3bef8067dab7353622beb72242a0e9e to your computer and use it in GitHub Desktop.
Converts MP4 videos to high quality GIFs converter
This file contains 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
#!/bin/bash | |
for completeFilename in ./*.mp4; do | |
filename=$(basename "$completeFilename") | |
f="${filename%.*}" | |
echo $f | |
ffmpeg -y -i "$filename" -vf palettegen palette.png | |
ffmpeg -i "$filename" -i palette.png -filter_complex "scale=-1:-1:flags=lanczos[x];[x][1:v]paletteuse" "$f.gif" | |
rm palette.png | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment