Last active
August 22, 2017 17:25
-
-
Save JakeCoxon/d8f86261af87cffe4922 to your computer and use it in GitHub Desktop.
MOV to 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
ffmpeg -i input.mov -filter:v "setpts=2.0*PTS" -s 187x333 -pix_fmt rgb8 -r 10 -f gif - | gifsicle --optimize=3 > out.gif | |
# Explanation | |
ffmpeg -i input.mov \ # Input file | |
-filter:v "setpts=2.0*PTS" \ # Scale time 2x | |
-s 187x333 \ # Set pixel size | |
-pix_fmt rgb24 \ # Pixel format | |
-r 10 \ # Set framerate | |
-f gif - | \ # Output gif format | |
gifsicle \ # Optimize the ffmpeg gif | |
--optimize=3 \ # Optimize level 3 (max) | |
> out.gif # Output file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment