screengif

Create animated gif screencasts.

  • 所有者: dergachev/screengif
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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 git@github.com: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

主要指標

概覽
名稱與所有者dergachev/screengif
主編程語言Ruby
編程語言Ruby (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2013-02-20 19:58:06
推送於2020-07-31 08:09:56
最后一次提交2020-07-14 13:44:55
發布數4
最新版本名稱v0.0.3 (發布於 )
第一版名稱v0.1 (發布於 )
用户参与
星數1.3k
關注者數14
派生數54
提交數67
已啟用問題?
問題數36
打開的問題數14
拉請求數16
打開的拉請求數2
關閉的拉請求數6
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?