Skip to content

sanchezand/node-gifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GIFIER

Create a gif from a video.
(Its more like a gif slideshow)

Installation

npm install gifier

=> REQUIRES Ffmpeg
=> REQUIRES GraphicsMagic

Getting started

const Gifier = require('gifier'); //Require gifier

Creating gifs

var newGif = new Gifier("/dir/to/source/video", {
   frames: 10,    //Number of frames to get from the video. The frames will be evenly distributed.
   size: '480x?', //Size of the new gif, '?' follows the video ratio.
   delay: 25      //Delay between the frames in ms.
})

// Write the GIF to a file
newGif.write("/dir/to/new/gif").then(file=>{
	// Gif has been created.
	// Returns destination to new file
})

Algorithm

=> Create temporary folder in destination location.
=> Get the source video and create frames.
   -> Frames are evenly distributed depending on the count.
   -> IE: 4 frames will create frames in 25%, 50%, 75%, 100%
=> Create frames and store them in the temp folder.
=> Create GIF from frames to the destination.
=> Delete frames and temp folder.

About

Make gifs from videos using GM and Ffmpeg

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published