Skip to content

Instantly share code, notes, and snippets.

@FelixWeichselgartner
Created June 11, 2021 07:51
Show Gist options
  • Save FelixWeichselgartner/a23d34369333a45520fa4406edef9b34 to your computer and use it in GitHub Desktop.
Save FelixWeichselgartner/a23d34369333a45520fa4406edef9b34 to your computer and use it in GitHub Desktop.
This script will convert all videos (mp4) in the folder to GIFs.
# This script will convert all videos (mp4) in the folder to GIFs.
FILES="./*.mp4"
for f in $FILES
do
echo "Processing $f file..."
ffmpeg -i $f -vf "fps=10,scale=600:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "${f}.gif"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment