gifme
Convert any video file or video readable stream to an animated GIF of desired length and size.
Features
- Less depedencies
- Fast
- No temporary files generated
- Supports readable stream as input
- Returns promise, better for handling errors
Requirements
Before using gifme, please install:
Installation
For global
npm install -g gifme
For local
npm install gifme
Usage
let fs = ;let gifme = ;let path = ; let input = path;let output = path; let gif = fs; var options = width: 320 height: 240 from: '00:00:00.000' to: '00:00:10.000';
You can also pass a readable stream to gifme(stream, options)
.
Options usage
options can have following keys
from
- from speciifies the time from which gif should start. It must be in format ofhh:mm:ss.xxx
eg.00:00:00.000
.to
- It must be in format ofhh:mm:ss.xxx
eg.00:00:10.000
width
- width of generated gif must be anumber
height
- height of generated gif must be anumber
fps
- frame rate for generating gif must benumber
Events emitted
Follownig events are eimmited from the generated gif stream.
done
Event done
is emitted when gif is created successfull without any errors.
Example: