Skip to content

Instantly share code, notes, and snippets.

@GEMISIS
Last active June 28, 2020 15:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GEMISIS/5f530ab0c19fb7c4662ad3b76c0dfa0a to your computer and use it in GitHub Desktop.
Save GEMISIS/5f530ab0c19fb7c4662ad3b76c0dfa0a to your computer and use it in GitHub Desktop.
Usage: **vid-2-gif.bat input.mp4** Takes a video input and converts it into a nice, small gif. Note that you'll want to keep the video size fairly small, otherwise the gif could turn out huge! Requires FFMPEG to use!
@echo off
if [%1]==[] goto :error1
:post
set output="%~n1.gif"
echo Creating %output%...
ffmpeg -i %1 -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" %output%
goto :done
:error1
echo No input file specified!
goto :end
:done
echo GIF created!
:end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment