Skip to content

Instantly share code, notes, and snippets.

@bupy7
Last active April 16, 2022 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bupy7/242d4db534a3840f2225ba9a20db909b to your computer and use it in GitHub Desktop.
Save bupy7/242d4db534a3840f2225ba9a20db909b to your computer and use it in GitHub Desktop.
Converting video file to GIF using ffmpeg
#!/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