Last active
November 25, 2024 13:16
-
-
Save scarf005/600fe086c48c3e71b0cc0ad2d918b944 to your computer and use it in GitHub Desktop.
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/bash | |
INPUT=${1:-input.mp4} | |
OUTPUT=${2:-output.gif} | |
ffmpeg -i "$INPUT" -vf "fps=10,palettegen=max_colors=20:reserve_transparent=0" palette.png | |
ffmpeg -i "$INPUT" -i palette.png -filter_complex "fps=4,paletteuse" "$OUTPUT" -y | |
rm palette.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment