vid2ani/README.md

42 lines
1.1 KiB
Markdown
Raw Normal View History

2017-04-23 03:28:48 +04:30
# video2gif
![sample gif file generated](sample.gif)
2021-09-22 12:14:18 -06:00
A batch script for converting video files to GIF files using FFmpeg.exe on Windows.
## Installation
* Clone the repo
* Install [FFmpeg](http://ffmpeg.zeranoe.com/builds/) for Windows.
2021-09-22 12:26:10 -06:00
* Make sure that the path to `ffmpeg.exe` is configured in your system environment variables control panel or that you run the `gifenc.bat` file in the same folder as `ffmpeg.exe`.
## Usage
```
2021-09-22 11:57:57 -06:00
gifenc [input_file] [width_in_pixels] [framerate_in_Hz] [palettegen_mode] [Dithering_Algorithm]
```
## Options:
```
2021-09-22 11:57:57 -06:00
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
```
2021-09-22 11:59:14 -06:00
## Examples:
```
2021-09-22 11:57:57 -06:00
gifenc sample.mp4 300 15 1 1
2021-09-22 11:59:14 -06:00
gifenc sample.mp4 600 10 2 3
gifenc sample.mp4 350 13 3 1
2021-09-22 11:57:57 -06:00
```
## Tips
Special thanks to [this article](http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html).