Skip to content

Instantly share code, notes, and snippets.

@esDotDev
Created November 15, 2019 16:27
Show Gist options
  • Save esDotDev/d7eeaddfb2225956b58402a5d6faa08a to your computer and use it in GitHub Desktop.
Save esDotDev/d7eeaddfb2225956b58402a5d6faa08a to your computer and use it in GitHub Desktop.
#!/bin/bash
width=480
fps=20
for fn in *.mp4; do
[ -e "$fn" ] || continue;
ffmpeg -y -i ${fn} -filter_complex '[0:v]fps='$fps'},scale=w='$width':h=-1,split [a][b];[a] palettegen [p];[b][p] paletteuse' ${fn/mp4/gif}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment