Skip to content

Instantly share code, notes, and snippets.

@drequeary
Last active June 17, 2024 15:42
Show Gist options
  • Select an option

  • Save drequeary/41db2653e424b8ecbd94da8216f70a6c to your computer and use it in GitHub Desktop.

Select an option

Save drequeary/41db2653e424b8ecbd94da8216f70a6c to your computer and use it in GitHub Desktop.
Uses FFmpeg to create image sequences, then Gifski to make animated gif.
Echo off
set /p video=Enter Input Filename (with file extension):
set /p output=Enter Output Filename (without extension):
set /p ffmpeg_options=Enter FFmpeg Options:
set /p gifski_options=Enter Gifski Options:
mkdir %temp%\gifski_sequence
ffmpeg.exe -i %video% %ffmpeg_options% %temp%\gifski_sequence\frame%%04d.png
gifski.exe %gifski_options% -o %output%.gif %temp%\gifski_sequence\frame*.png
del /S /Q "%temp%\gifski_sequence\*"
Echo Complete!
CMD /K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment