Skip to content

Instantly share code, notes, and snippets.

@lambdan
Last active August 12, 2018 19:15
Show Gist options
  • Save lambdan/e8d9182b4ab7ba27db1e6f9ce25cb2a9 to your computer and use it in GitHub Desktop.
Save lambdan/e8d9182b4ab7ba27db1e6f9ce25cb2a9 to your computer and use it in GitHub Desktop.
Create HQ Gif With FFMPEG Batch File
@echo off
set /p video="Video path (drag n drop supported): "
set /p start="Start time (HH:MM:SS.XXX): "
set /p duration="Duration (in secs, eg SS.XXX): "
REM "How to make GIFs with FFMPEG": https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/
ffmpeg -ss %start% -t %duration% -i %video% -filter_complex "[0:v] fps=12,scale=480:-1:lanczos,split [a][b];[a] palettegen [p];[b][p] paletteuse" "gif-%date%-%time::=-%.gif"
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment