Skip to content
/ ttygif Public
forked from icholy/ttygif

Convert terminal recordings to animated gifs

License

Notifications You must be signed in to change notification settings

jonbho/ttygif

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTYGIF

ttygif converts a ttyrec file into gif files. It's a stripped down version of ttyplay which calls xwd on every frame.

Setup

Debian/Ubuntu

$ sudo apt-get install imagemagick ttyrec gcc
$ git clone https://github.com/icholy/ttygif.git
$ cd ttygif
$ make

Fedora/Redhat

$ sudo yum install ImageMagick gcc
$ # install ttyrec from source ~> https://github.com/mjording/ttyrec
$ git clone https://github.com/icholy/ttygif.git
$ cd ttygif
$ make

OSX

$ brew install imagemagick ttyrec
$ brew install https://raw.githubusercontent.com/icholy/ttygif/master/ttygif.rb

Usage:

1. Create ttyrec recording

$ ttyrec myrecording
  • Hit CTRL-D or type exit when done recording.

2. Create gif frames

$ ./ttygif myrecording
  • Dumps a bunch of gif images into the current directory.
  • File names have this pattern: <zero_padded_index>_<delay_in_milliseconds>.gif

On OSX optionally you can set a -f flag which will bypass cropping which is needed for terminal apps which aren't full screen. Both standard Terminal and iTerm apps are supported.

$ ./ttygif myrecording -f

3. Create animated gif

$ ./concat.sh terminal.gif 
  • Concatenates all the images in the current directory

On OSX use concat_osx.sh since in OSX version bunch of PNGs are dumped into a folder and used as source (for better image quality).

$ ./concat_osx.sh terminal.gif 

Demo:

gif

Credits

The idea and approach was adapted from tty2gif

About

Convert terminal recordings to animated gifs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 85.7%
  • Shell 10.6%
  • Ruby 1.9%
  • Makefile 1.8%