Created
October 1, 2016 21:42
-
-
Save galori/3a15b661346018c7b1c69a5b4f9e2a75 to your computer and use it in GitHub Desktop.
ffmpeg
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 | |
echo 'usage: ./ffmpeg_to_gif.sh ~/Downloads/test.mov ~/Downloads/test.gif' | |
palette="/tmp/palette.png" | |
filters="fps=15,scale=1000:-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 $2 | |
open $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment