Skip to content

Instantly share code, notes, and snippets.

@nakov
Last active April 8, 2021 13:14
Show Gist options
  • Save nakov/ce4a62ce1a02f71ef934c438532bdaee to your computer and use it in GitHub Desktop.
Save nakov/ce4a62ce1a02f71ef934c438532bdaee to your computer and use it in GitHub Desktop.
Create highly-optimized GIF from screencast video (MP4)
ffmpeg -i .\input.avi -vf scale=1280x720 -crf 0 -r 4 -an -y out.mp4
ffmpeg -i .\out.mp4 -vf palettegen=256 -y palette.png
ffmpeg -y -i .\out.mp4 -i palette.png -filter_complex paletteuse -y animation.gif
del out.mp4
del palette.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment