-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial files of project in version 0.0.1
Signed-off-by: Nabi <nabikaz@gmail.com>
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.idea | ||
sample.mp4 | ||
sample.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
# video2gif | ||
A batch script for convert video to GIF files by FFmpeg.exe on Windows | ||
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |