Skip to content

Instantly share code, notes, and snippets.

@spite
Last active August 29, 2015 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spite/10ff99d4f85a87abad7f to your computer and use it in GitHub Desktop.
Save spite/10ff99d4f85a87abad7f to your computer and use it in GitHub Desktop.
Converting a video captured with Quicktime to GIF (for posting to twitter)
ffmpeg -i input2.mov -vf "setpts=(1/2)*PTS" output.mov
ffmpeg -ss 00:00:00.000 -i output.mov -pix_fmt rgb24 -vf scale=506:-1 -r 10 output.gif
@spite
Copy link
Author

spite commented Apr 21, 2015

This one plays at twice the speed, at the size of twitter GIF card

@spite
Copy link
Author

spite commented May 29, 2015

-ss specifies the starting time
-vf scale=506:1 forces to 506px wide, according height
-r specifies framerate

@spite
Copy link
Author

spite commented Jul 13, 2015

ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment