Skip to content

Instantly share code, notes, and snippets.

@dnlcrl
Created January 6, 2016 11:50
Show Gist options
  • Save dnlcrl/af515ef7024f658791c6 to your computer and use it in GitHub Desktop.
Save dnlcrl/af515ef7024f658791c6 to your computer and use it in GitHub Desktop.
#!/bin/sh
palette="/tmp/palette.png"
filters="fps=15,scale=320:-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
# ./gifenc.sh video.mkv anim.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment