Skip to content

Convert a GIF image into an HTML5-ready video for considerably better file sizes

License

Notifications You must be signed in to change notification settings

hughsk/gif-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gif-video Flattr this!experimental

Convert a GIF image into an HTML5-ready video for considerably better file sizes. Much like gfycat, except you can process and host it yourself.

Usage

gif-video

require('gif-video')([options])

Returns a transform stream which takes a GIF buffer as input, and spits out a video file on the other side.

var createStream = require('gif-video')
var fs = require('fs')

fs.createReadStream('input.gif')
  .pipe(createStream({ height: 200 }))
  .pipe(fs.createWriteStream('output.webm'))

options will be passed onto the stopmotion module, with the exception of inputCodec which is forced to be gif.

Dependency on FFmpeg

gif-video depends on you having ffmpeg in your path, with support for webm enabled. You can do this easily using homebrew:

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc

License

MIT. See LICENSE.md for details.

About

Convert a GIF image into an HTML5-ready video for considerably better file sizes

Resources

License

Stars

Watchers

Forks

Packages

No packages published