initial files of project in version 0.0.1
Signed-off-by: Nabi <nabikaz@gmail.com>
This commit is contained in:
parent
848e4a0903
commit
6e332e6f7c
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/.idea
|
||||
sample.mp4
|
||||
sample.gif
|
16
README.md
16
README.md
@ -1,2 +1,18 @@
|
||||
# video2gif
|
||||
A batch script for convert video to GIF files by FFmpeg.exe on Windows
|
||||
|
||||
## Installation
|
||||
* Clone the repo
|
||||
* Install [FFmpeg](http://ffmpeg.zeranoe.com/builds/) for Windows.
|
||||
* Make sure the `ffmpeg.exe` and `video2gif.bat` are on your systems path.
|
||||
|
||||
## Usage
|
||||
Anywhere you can use it be like this example:
|
||||
```
|
||||
video2gif myvideo.mp4
|
||||
```
|
||||
Then you have `myvideo.gif` in current directory.
|
||||
If `myvideo.gif` there is existed, question from you for overwrite it.
|
||||
|
||||
## Tips
|
||||
Special thanks to [this article](http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html).
|
||||
|
10
video2gif.bat
Normal file
10
video2gif.bat
Normal file
@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
rem by: nabi karamalizadeh <nabikaz@gmail.com>
|
||||
rem description: video to gif converter
|
||||
rem version: 0.0.1
|
||||
rem license: The MIT License (MIT)
|
||||
set arg1=%1
|
||||
set arg2=%arg1:~0,-4%
|
||||
ffmpeg -y -i %arg1% -vf fps=15,scale=-1:-1:flags=lanczos,palettegen %TEMP%\palette.png
|
||||
ffmpeg -i %arg1% -i %TEMP%\palette.png -filter_complex "fps=10,scale=-1:-1:flags=lanczos[x];[x][1:v]paletteuse" %arg2%.gif
|
||||
del /f %TEMP%\palette.png
|
Loading…
Reference in New Issue
Block a user