Update README.md
This commit is contained in:
parent
1da4d96f9d
commit
ac2756c5a5
55
README.md
55
README.md
@ -7,54 +7,33 @@ A batch script for convert video to GIF files by FFmpeg.exe on Windows.
|
|||||||
## Installation
|
## Installation
|
||||||
* Clone the repo
|
* Clone the repo
|
||||||
* Install [FFmpeg](http://ffmpeg.zeranoe.com/builds/) for Windows.
|
* Install [FFmpeg](http://ffmpeg.zeranoe.com/builds/) for Windows.
|
||||||
* Make sure the `ffmpeg.exe` and `video2gif.bat` are on your systems path.
|
* Make sure the `ffmpeg.exe` and `gifenc.bat` are on your systems path.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
**Method #1:** Anywhere you can use it by this command in `cmd`:
|
|
||||||
```
|
```
|
||||||
video2gif myvideo.mp4
|
gifenc [input_file] [width_in_pixels] [framerate_in_Hz] [palettegen_mode] [Dithering_Algorithm]
|
||||||
```
|
|
||||||
Then you have `myvideo.gif` in current directory.
|
|
||||||
|
|
||||||
If `myvideo.gif` there is existed, question from you for overwrite it.
|
|
||||||
|
|
||||||
**Method #2:** You can just drag and drop `.gif` file on the `video2gif.bat` file.
|
|
||||||
|
|
||||||
## Advance Usage
|
|
||||||
|
|
||||||
```
|
|
||||||
video2gif SOURCE_FILE [OPTIONS]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Options:
|
## Options:
|
||||||
```
|
```
|
||||||
SOURCE_FILE Source video file name for convert
|
Palettegen Modes:
|
||||||
also you can drag and drop source video file to this batch file directly
|
1: diff - only what moves affects the palette
|
||||||
-o Output destination .GIF file name
|
2: single - one palette per frame
|
||||||
if not set it, use video source file name with new .gif extension
|
3: full - one palette for the whole gif
|
||||||
-y Overwrite destination file
|
-----------------------------------------------------------------------------------------------
|
||||||
if not set it, appears prompt for overwrite destination file
|
Dithering Options:
|
||||||
-f Frame per second (fps)
|
1: bayer
|
||||||
default: 15
|
2: heckbert
|
||||||
-w Width scale of destination gif file
|
3: floyd steinberg
|
||||||
in pixel unit and (-1) for use original width, default: -1
|
4: sierra2
|
||||||
-s Start time of video source for crop
|
5 sierra2_4a
|
||||||
in second or time format (ex. 1:12), if set it, so must be set (-d) param
|
|
||||||
-d Duration time of video source for crop
|
|
||||||
in second, if set it, so must be set (-s) param
|
|
||||||
-c Maximum number of colors to the palette
|
|
||||||
must be (<=256), default: 256
|
|
||||||
-q Quality of destination gif file
|
|
||||||
must be a number between 1(low) to 6(high), default: 5
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Examples:
|
## Example:
|
||||||
```
|
```
|
||||||
video2gif sample.mp4
|
gifenc sample.mp4 300 15 1 1
|
||||||
video2gif sample.mp4 -y -w 60 -q 1 -f 10
|
gifenc sample.mp4 300 15 2 3
|
||||||
video2gif sample.mp4 -o new_file.gif -y -w 100 -f 10 -s 10 -d 5
|
|
||||||
video2gif sample.mp4 -s 0:30 -d 20 -c 128 -q 6
|
|
||||||
video2gif sample.mp4 -s 1:16.5 -d 8.3
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Tips
|
## Tips
|
||||||
|
Loading…
Reference in New Issue
Block a user