Skip to content

Instantly share code, notes, and snippets.

@romaninsh
Created May 15, 2018 08:50
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 romaninsh/3143d7235410bcda4845b18aab7e0f6f to your computer and use it in GitHub Desktop.
Save romaninsh/3143d7235410bcda4845b18aab7e0f6f to your computer and use it in GitHub Desktop.
convert mov into gif
#!/bin/bash
# Don't install or buy crappy gif makers. Here is the magic file:
palette="/tmp/palette.png"
filters="fps=10,scale=800:-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