A script for converting video files to GIF/APNG/WEBP using FFmpeg.
.gitignore | ||
LICENSE | ||
README.md | ||
sample.gif | ||
sample.mp4 | ||
video2gif.bat |
video2gif
A batch script for convert video to GIF files by FFmpeg.exe on Windows.
Installation
- Clone the repo
- Install FFmpeg for Windows.
- Make sure the
ffmpeg.exe
andgifenc.bat
are on your systems path.
Usage
gifenc [input_file] [width_in_pixels] [framerate_in_Hz] [palettegen_mode] [Dithering_Algorithm]
Options:
Palettegen Modes:
1: diff - only what moves affects the palette
2: single - one palette per frame
3: full - one palette for the whole gif
-----------------------------------------------------------------------------------------------
Dithering Options:
1: bayer
2: heckbert
3: floyd steinberg
4: sierra2
5 sierra2_4a
Example:
gifenc sample.mp4 300 15 1 1
gifenc sample.mp4 300 15 2 3
Tips
Special thanks to this article.