Last active
February 11, 2020 22:43
-
-
Save kdzwinel/3990edef9eb21fff795a to your computer and use it in GitHub Desktop.
Making gifs from mov files on OS X.
This file contains hidden or 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
#!/bin/sh | |
palette="./palette.png" | |
# speed - setpts=0.15*PTS, | |
# crop - ffmpeg -i in.mov -filter:v "crop=480:600:320:80" out.mov | |
filters="fps=25,scale=640:-1:flags=lanczos" | |
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette | |
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $1.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome... thanks dude! I really enjoyed looking over your public gists today.
Thanks for sharing so much great stuff. You are clearly a skilled developer!