Created
August 7, 2015 08:56
-
-
Save kiddouk/d02bdc419f13153db41a to your computer and use it in GitHub Desktop.
Video 2 Gif encoding with palette optimisation
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
#!/bin/sh | |
# usage : sh gifenc.sh my_video.mp4 my_gif.gif | |
palette="/tmp/palette.png" | |
filters="fps=15,scale=240:-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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment