Skip to content

Instantly share code, notes, and snippets.

@hatashiro
Created March 23, 2015 11:49
Show Gist options
  • Save hatashiro/d8dbbb6a28cd49987a72 to your computer and use it in GitHub Desktop.
Save hatashiro/d8dbbb6a28cd49987a72 to your computer and use it in GitHub Desktop.
MOV to GIF bash script
# convert Untitled.mov to out.gif with width: 310px;
movtogif Untitled.mov out.gif 310
#!/usr/bin/env bash
if [ -z "$3" ]; then
scale=800
else
scale=$3
fi
ffmpeg -i "$1" -vf scale=$scale:-1 -r 10 -f image2pipe -vcodec ppm - |\
convert -delay 5 -layers Optimize -loop 0 - "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment