• Stars
    star
    1,315
  • Rank 35,446 (Top 0.8 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create animated gif screencasts.

Screengif

A commandline tool to convert SCREENCAST.mov into ANIMATED.gif

Here's what happens when you apply it to demo.mov

Usage

screengif - Convert your screencast into a gif.
Usage:
	screengif [options] [--input FILENAME.mov] [--output OUTPUTFILE.gif]
Examples:
	screengif --input demo.mov --output out.gif
	cat somefile.gif | screengif --progressbar --framerate 10 --delay 50 --delay-last 5 > out.gif

Specific options:
    -i, --input FILENAME.mov         Use ffmpeg to convert FILENAME.mov into PPM image stream and process results.
                                     If missing, will process PPM or GIF image stream from STDIN.
    -o, --output FILENAME.gif        Output resulting GIF data to FILENAME.gif. (defaults to STDOUT).
    -p, --progressbar                Overlay progress bar on the animation.
    -d, --delay MS                   Animation frame delay, in tens of ms. (default: 10)
        --delay-last MS              Animation frame delay of last frame, in tens of ms. (default: 50)
    -r, --framerate FPS              Specify amount of frames per second to keep. (default: 5)
    -w, --max-width PIXELS           Output image max width, in pixels.
        --max-height PIXELS          Output image max height, in pixels.
        --no-contrast                Skip increasing contrast using imagemagick.
    -f, --fuzz PERCENT               Imagemagick fuzz factor for color reduction. (default: 5%)
        --no-coalesce                Skip Magick::ImageList#coalesce() if input doesn't need it.
        --no-gifsicle                Prevent filter the output through gifsicle. Greatly increases output file size.
    -h, --help                       Show this message
    -v, --verbose                    Verbose output
        --version                    Show version

Installation

Under Docker

If you have docker running, this is the quickest way to get started with screengif:

git clone [email protected]:dergachev/screengif.git
cd screengif

make build      # or alternatively, 'docker pull dergachev/screengif'

make docker-convert args="-i demo.mov -o demo-docker.gif"

# input files must be relative to cloned screengif repo
cp /path/to/myMovie.mov .

make docker-convert args="-i myMovie.mov -o myMovie.gif"

See Dockerfile and Makefile for how it works.

With Vagrant

If you have Vagrant and Virtualbox already installed, this is both faster and cleaner than downloading and compiling all the dependencies in OS X. To install, simply do the following:

vagrant up

The easiest way to use it is to copy your image to screengif project directory (shared in the VM under /vagrant), and run the following:

cp ~/screencast.mov ./screencast.mov
vagrant ssh -- '/vagrant/bin/screengif --input /vagrant/screencast.mov --output /vagrant/output/screencast.gif'
ls ./output/screencast.gif # should exist!

# when finished, destroy the VM
vagrant destroy -f

On OSX, with homebrew

The following works with OS X and homebrew, assuming you have ruby 1.9.2+:

You may need to install brew-cask: https://github.com/phinze/homebrew-cask

# x-quartz is a dependency for gifsicle, no longer installed starting on 10.8
brew cask install xquartz
open /usr/local/Caskroom/xquartz/2.7.11/XQuartz.pkg # runs the XQuartz installer

brew install ffmpeg imagemagick@6 gifsicle pkg-config
gem install screengif       # might need sudo

To be able to use the --progressbar option, you also need to install ghostscript and some fonts for it:

brew install gs
cd /usr/local/share/ghostscript/
wget https://ghostscript.googlecode.com/files/ghostscript-fonts-std-8.11.tar.gz
tar xzvf ghostscript-fonts-std-8.11.tar.gz

If running screengif shows an errror Library not loaded: libMagickCore-6.Q16.1.dylib, see #26.

Tips

See https://gist.github.com/dergachev/4627207#os-x-screencast-to-animated-gif for a guide on how to use Quicktime Player to record a screencast on OS X.
Keep in mind that other tools (like Screenflow) produce better video quality.

If you install dropbox-screenshots, the following will automatically upload your new gif to Dropbox:

cp out.gif ~/Dropbox/Public/screenshots

Resources

See DEVNOTES

More Repositories

1

vagrant-vbox-snapshot

Vagrant plugin that wraps "VBoxManage snapshot"
Ruby
377
star
2

redmine_git_remote

Redmine plugin to automatically clone and fetch referenced repositories
Ruby
73
star
3

puppypaste

Extract HTML clipboard contents without losing the structure, as you'd get from pasting into TextEdit or Notepad.
CSS
60
star
4

csv2sqlite

Ruby script to parse CSV file(s) into a database.
Ruby
53
star
5

dropbox-screenshots

Improved automatic Dropbox upload of screenshots on OSX
Ruby
36
star
6

solr-security-proxy

Node.js based proxy to make a solr instance read-only.
JavaScript
27
star
7

copy-public-url

A Folder Action Script that copies to clipboard the public URL of any newly created file inside of a public folder in Dropbox or Google Drive
AppleScript
26
star
8

babelfrog

Chrome extension to help learn languages as you browse.
JavaScript
16
star
9

gdocs-export

Programatically download a Google Doc and convert it to LaTeX
HTML
16
star
10

redmine_gist

Redmine plugin adding a {{gist}} macro that embeds Github Gists into Redmine.
Ruby
12
star
11

chef_root_ssh_agent

A chef cookbook that will allow "sudo su root" to maintain ssh agent forwarding.
Ruby
11
star
12

vagrant_drupal

Deploy a local Drupal development stack with Vagrant.
Ruby
9
star
13

vagrant_redmine

Tutorial on how to use Vagrant+Chef to automatically deploy a redmine development VM
Ruby
8
star
14

vagrant-drupal

Example of integration of Vagrant, deploy-drupal cookbook, and your Drupal project.
Ruby
8
star
15

chrome-xpath-link

JavaScript
8
star
16

vgrnt

Speeds up a few common vagrant operations through dirty hacks.
Ruby
6
star
17

redmine-reconcile

Google Refine reconciliation service
Python
5
star
18

chef_extend_lwrp

Chef cookbook demonstrating how to extend an LWRP
Ruby
5
star
19

sitediff

SiteDiff makes it easy to see differences between two versions of a website.
Ruby
5
star
20

uggedal-thesis

Mirror of https://bitbucket.org/uggedal/thesis
5
star
21

detect-drupal-modules

Detect what modules a Drupal site might have installed.
4
star
22

url2mdpress

Wrapper on egonSchiele/mdpress that pulls markdown from URL.
Ruby
4
star
23

docker-jekyll

Shell
3
star
24

chef_homesick_agent

Extends github.com/fnichol/chef-homesick cookbook to support ssh agent forwarding
Ruby
3
star
25

vagrant-vboxmanage

Vagrant plugin that simplifies calling VBoxManage
Ruby
3
star
26

drupal-docker-marriage

Example Docker-powered Drupal site, for a wedding
PHP
3
star
27

markleteer

A javascript library for creating and distributing bookmarklets.
JavaScript
2
star
28

nginx-examples

Snippets of nginx config files, and an experimentation environment
Ruby
2
star
29

presentations

My various talks
JavaScript
2
star
30

straighten-pdf

Docker image to straighten scanned PDFs
Shell
2
star
31

audioskim

Sinatra app to parse audio files
Ruby
2
star
32

vagrant-chef-guide

JavaScript
2
star
33

dictionary-bookmarklet

A bookmarklet to simplify looking up foreign words... without translating the whole page.
JavaScript
2
star
34

travis-test

sandbox to play around with travis-ci integration
Shell
1
star
35

babelfrog.com

Website to promote BabelFrog
CSS
1
star
36

rspec-tutorial

Playing around with writing rspec tests
Ruby
1
star
37

alfred-redmine-workflow

Alfred workflow to interact with Redmine
PHP
1
star
38

link-to-element

Chrome extension to link within elements
JavaScript
1
star
39

descriptive-url-bookmarklet

Makes unreadable URLs human friendly by automatically appending the page title, eg https://gist.github.com/4540158#cross-domain-post-requests
JavaScript
1
star
40

pin-screenshot-bookmarklet

Allows you to post a screenshot of the current page to Pinterest.
JavaScript
1
star