Navigation Menu

Skip to content

Commit

Permalink
beter readme, remove bad filter, remove vsync
Browse files Browse the repository at this point in the history
  • Loading branch information
vvo committed Nov 22, 2014
1 parent 757f09b commit 45f4b1e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions .npmignore
@@ -1 +1,2 @@
example/
screencast.gif
13 changes: 11 additions & 2 deletions README.md
@@ -1,9 +1,18 @@
# gifify [![Dependency Status](http://img.shields.io/david/vvo/gifify.svg?style=flat-square)](https://david-dm.org/vvo/gifify)

Convert any video file to an optimized animated GIF. Either in it's full length or just some part.
Convert any video file to an optimized animated GIF. Either in it's full length or only a part of it.

It's like [jclem/gifify](https://github.com/jclem/gifify/) but better in many ways from my point of view.

## Demo time

![screencast](screencast.gif)

This screencast was recorded with [lolilolicon/FFcast](https://github.com/lolilolicon/FFcast) then converted to a GIF with:

```shell
gifify screencast.mkv -o screencast.gif --resize 800:-1
```

## Features

Expand All @@ -25,7 +34,7 @@ Before using gifify, please install:
- [convert](http://www.imagemagick.org/script/convert.php), the famous [ImageMagick](http://www.imagemagick.org/)
- [pornel/giflossy](https://github.com/pornel/giflossy), it's a [gifsicle](http://www.lcdf.org/gifsicle/) fork

## Install
## Installation

```shell
npm install -g gifify
Expand Down
Binary file added example/movie.mp4
Binary file not shown.
7 changes: 4 additions & 3 deletions index.js
Expand Up @@ -74,7 +74,7 @@ function computeFFmpegArgs(opts) {
// FFmpeg options
// https://www.ffmpeg.org/ffmpeg.html#Options
var args = [
'-loglevel', 'quiet'
'-loglevel', 'warning'
];

// fast seek to opts.from - 500ms
Expand All @@ -96,14 +96,15 @@ function computeFFmpegArgs(opts) {

// resize filter
if (opts.resize !== undefined) {
args.push('-vf', 'scale=' + opts.resize + ',subtitles=22.srt');
args.push('-vf', 'scale=' + opts.resize);
}

// encoding filter and codec
args.push('-f', 'image2pipe', '-vcodec', 'ppm');

// force video sync so that even if nothing moves in the video, we get a constant frame rate
args.push('-vsync', '1');
// seems buggy, not what I want, still, some videos are failing to encode
// args.push('-vsync', '1');

// write on stdout
args.push('pipe:1');
Expand Down
Binary file added screencast.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 45f4b1e

Please sign in to comment.