Created
May 12, 2017 21:01
-
-
Save mikeseif/4b56df5f2e681c119854c6cf194c613f to your computer and use it in GitHub Desktop.
gifenc.sh accepts 2 parameters, the first being width and the second being framerate (going higher than 30 will melt most computers when playing back.. gifenc.sh is just another bash script with the following:
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 | |
palette="/tmp/palette.png" | |
filters="fps=$4,scale=$3:-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