Gifify是一款视频转换成压缩Gif动画图片的开源工具。可以截取视频部分也可以全部视频转换。Gifify遵守ISC(基本等同于BSD-clause2)开源协议。
主要功能特性:
命令行界面
可定制 JavaScript 界面
对unix 系统友好, 支持 stdin & stdout
图片优化压缩
多项设置可调节,如l视频速度, fps, 颜色, 压缩率, 大小, 倒放, 截取, 字幕
不产生临时文件,全部在内存中完成
快速!从2小时视频截取 制作5秒gif图片只需要少于20秒
命令行使用方法:
gifify screencast.mkv -o screencast.gif --resize 800:-1
[repo owner=”vvo” name=”gifify”]
--------------------------------------------
gifify
Convert any video file to an optimized animated GIF. Either in its full length or only a part of it.
Demo time
This screencast was recorded with lolilolicon/FFcast then converted to a GIF with:
gifify screencast.mkv -o screencast.gif --resize 800:-1
Features
- command line interface
- programmatic JavaScript (Node.JS) stream interface
- unix friendly, supports
stdin
&stdout
- optimized! uses pornel/giflossy to generate light GIFS
- lots of options: movie speed, fps, colors, compression, resize, reverse, from & to, subtitles
- no temp files used, everything happens in memory
- fast! Extracting a 5-second GIF from the middle of a 2-hour movie takes less than 20 seconds
Requirements
Before using gifify, please install:
- Node.js (
$ brew install node
) - FFmpeg (
$ brew install ffmpeg
) - convert, the famous ImageMagick (
$ brew install imagemagick
) - pornel/giflossy, it's a gifsicle fork (waiting for gifsicle#16 to be merged) (
$ brew install giflossy
)
You can also use the gifify Docker image which comes with everything installed.
Installation
npm install -g gifify
Command line usage
> gifify -h
Usage: gifify [options] [file]
Options:
-h, --help output usage information
-V, --version output the version number
--colors <n> Number of colors, up to 255, defaults to 80
--compress <n> Compression (quality) level, from 0 (no compression) to 100, defaults to 40
--from <position> Start position, hh:mm:ss or seconds, defaults to 0
--fps <n> Frames Per Second, defaults to 10
-o, --output <file> Output file, defaults to stdout
--resize <W:H> Resize output, use -1 when specifying only width or height. `350:100`, `400:-1`, `-1:200`
--reverse Reverses movie
--speed <n> Movie speed, defaults to 1
--subtitles <filepath> Subtitle filepath to burn to the GIF
--text <string> Add some text at the bottom of the movie
--to <position> End position, hh:mm:ss or seconds, defaults to end of movie
--no-loop Will show every frame once without looping
from