Created
March 16, 2016 11:40
-
-
Save alfredodeza/a3faa3b4601257f9bd0a to your computer and use it in GitHub Desktop.
convert an mp4 to a gif
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
mp4=$1 | |
DEFAULT_GIF_NAME="output.gif" | |
OUTPUT=${2:-$DEFAULT_GIF_NAME} | |
# -delay is used to control the timing between frames, the scale sets the resolution | |
ffmpeg -i $mp4 -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 10 -loop 0 - $OUTPUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment