Last active
April 16, 2022 17:03
-
-
Save bupy7/242d4db534a3840f2225ba9a20db909b to your computer and use it in GitHub Desktop.
Converting video file to GIF using ffmpeg
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
#!/usr/bin/env bash | |
INPUT_FILE=$1 | |
OUTPUT_FILE=$2 | |
ffmpeg -i $INPUT_FILE \ | |
-filter_complex "[0:v] fps=12,scale=w=480:h=-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" \ | |
$OUTPUT_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment