GithubHelp home page GithubHelp logo

ttygif's Introduction

ttygif converts a ttyrec file into gif files. It's a stripped down version of ttyplay that screenshots every frame.

Demo

gif

Setup

Debian/Ubuntu

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

Fedora/CentOS/RHEL

$ sudo dnf install ImageMagick gcc xorg-x11-apps
$ # install ttyrec from source patched ~> https://github.com/mattwilmott/ttyrec
$ git clone https://github.com/icholy/ttygif.git
$ cd ttygif
$ make
$ sudo make install

OpenSUSE Leap

$ zypper addrepo http://download.opensuse.org/repositories/utilities/openSUSE_Leap_42.2/utilities.repo
$ zypper refresh
$ zypper install ttygif

Arch Linux

$ git clone https://aur.archlinux.org/ttyrec.git
$ cd ttyrec
$ makepkg -i
$ cd ..
$ git clone https://aur.archlinux.org/ttygif.git
$ cd ttygif
$ makepkg -is

With yaourt installed:

$ yaourt -S ttyrec ttygif

macOS

$ brew install ttygif

Usage:

1. Create ttyrec recording

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

2. Convert to gif

$ ttygif myrecording

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

Additional Notes

If you're getting Error: WINDOWID environment variable was empty., then you need to manually set WINDOWID.

export WINDOWID=23068679

If you're on Ubuntu, you can use xdotool to find the WINDOWID

$ sudo apt-get install xdotool
$ export WINDOWID=$(xdotool getwindowfocus)

Debugging

If you're having issues, then export the TTYGIF_DEBUG env variable.

export TTYGIF_DEBUG=1

This will print out all the commands it's trying to run.

Credits

The idea and approach was adapted from tty2gif

ttygif's People

Contributors

aaazalea avatar amarok1412 avatar azat avatar bdossantos avatar bfontaine avatar bitdeli-chef avatar chrisnellis avatar cicku avatar davelupt avatar eugeneiiim avatar facundobatista avatar federicoceratto avatar gabmontes avatar gywn avatar icholy avatar jimrandomh avatar jm3 avatar joelpurra avatar jonbho avatar leereilly avatar marklarr avatar mbologna avatar mixer3d avatar mkzero avatar mrahtz avatar n-tek avatar petems avatar polyzen avatar selesse avatar simenb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ttygif's Issues

Record as .gif

Record terminal session directly as a gif instead of saving the recording and then converting it to gif.

ttygif: myrecording: No such file or directory

I just installed it with:

brew install ttygif

That worked successfully. But when I run:

ttygif myrecording -f

I get the error message:

ttygif: myrecording: No such file or directory

What I'm doing wrong?

error on running ttygif

Hello,

When I run "/tmp/ttygif/ttygif ttyrecord", I get the message:

X Error of failed request: BadMatch (invalid parameter attributes)s/19@master)
Major opcode of failed request: 73 (X_GetImage)
Serial number of failed request: 174
Current serial number in output stream: 174
snapshot: Success

Any suggestions, please?

Thanks
Joe

Get error when install ttygit in arch i686

==> ERROR: ttygif is not available for the 'i686' architecture.

==> ERROR: An unknown error has occurred. Exiting...

when run makepkg -is in ttygit repo, I get these errors

Fish Shell: Error: Failed to execute 'convert' command

Running ttygif test on Ubuntu Linux vm 4.2.0-30-generic #36~14.04.1-Ubuntu SMP Fri Feb 26 18:49:23 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux and running the fish shell.

Creating Animated GIF ... this can take a while
Killed
Error: Failed to execute 'convert' command⏎ 

Tried to update dependencies and still getting the error.

> sudo apt-get install imagemagick ttyrec gcc x11-apps -u
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version.
x11-apps is already the newest version.
ttyrec is already the newest version.
imagemagick is already the newest version.

convert: unable to load module

Followed instructions without any change. But the following error seems to pop up:

https://gist.github.com/arjunmayilvaganan/e5202777888c9d37ca63

Custom playback speed

Nice work on this fork of ttygif, btw.

I have a question (or feature request?): Is it possible to change the final playback speed of the resulting gif? I sometimes have the issue where I type slow in my demos, and I don't want to re-record just for the sake of trying to speed things up. If there was a way to customize the playback speed of the resulting gif, that would be awesome.

Crashing mid conversion

, 337C writtenX Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)
Resource id in failed request: 0x4200001
Serial number of failed request: 217
Current serial number in output stream: 218
failed to execute: xwd -id 65011716 -out /tmp/ttygif.vPrtty/193.xwd

Running 16.04 on i3wm-gaps

iTerm2 issue

ttygif gives:

20:22: execution error: iTerm got an error: Can’t get id of window 1. (-1728)
snapshot: Undefined error: 0

Build 2.9.20150826-nightly

Have you considered homebrew for releases?

Your software is very great.
But , can not be installed from the "brew" is very disappointing .
Please let me help the release of the brew!

(When the grammar of English was funny is , I'm sorry)

There is no any .gif file

I am using Archlinux with i3wm. I created rec file with command ttyrec xdo this command create only one file name xdo. Then i convert to gif by command ttygif xdo but an error occured say xwd error. I tried export TTYGIF_DEBUG=1 then rerun ttygif xdo this output

ttygif xdo
window_id: 0
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/0.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/1.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/2.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/3.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/4.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/5.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/6.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/7.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/8.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/9.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/10.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/11.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/12.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/13.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/14.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/15.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/16.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/17.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/18.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/19.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/20.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/21.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/22.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/23.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/24.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/25.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/26.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/27.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/28.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/29.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/30.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/31.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/32.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/33.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/34.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/35.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/36.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/37.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/38.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/39.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/40.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/41.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/42.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/43.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/44.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/45.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/46.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/47.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/48.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/49.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/50.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/51.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/52.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/53.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/54.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/55.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/56.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/57.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/58.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/59.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/60.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/61.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/62.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/63.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/64.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/65.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/66.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/67.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/68.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/69.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/70.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/71.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/72.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/73.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/74.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/75.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/76.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/77.xwd
DEBUG: xwd -id 0 -out /tmp/ttygif.o3g0lz/78.xwd
Creating Animated GIF ... this can take a while
DEBUG: convert -loop 0  -delay 0.100000 /tmp/ttygif.o3g0lz/0.xwd -delay 528.000000 /tmp/ttygif.o3g0lz/1.xwd -delay 22.300000 /tmp/ttygif.o3g0lz/2.xwd -delay 64.800000 /tmp/ttygif.o3g0lz/3.xwd -delay 116.800000 /tmp/ttygif.o3g0lz/4.xwd -delay 11.100000 /tmp/ttygif.o3g0lz/5.xwd -delay 13.400000 /tmp/ttygif.o3g0lz/6.xwd -delay 18.500000 /tmp/ttygif.o3g0lz/7.xwd -delay 305.600000 /tmp/ttygif.o3g0lz/8.xwd -delay 15.200000 /tmp/ttygif.o3g0lz/9.xwd -delay 13.500000 /tmp/ttygif.o3g0lz/10.xwd -delay 11.900000 /tmp/ttygif.o3g0lz/11.xwd -delay 20.800000 /tmp/ttygif.o3g0lz/12.xwd -delay 11.100000 /tmp/ttygif.o3g0lz/13.xwd -delay 18.400000 /tmp/ttygif.o3g0lz/14.xwd -delay 14.400000 /tmp/ttygif.o3g0lz/15.xwd -delay 13.500000 /tmp/ttygif.o3g0lz/16.xwd -delay 12.000000 /tmp/ttygif.o3g0lz/17.xwd -delay 35.900000 /tmp/ttygif.o3g0lz/18.xwd -delay 13.500000 /tmp/ttygif.o3g0lz/19.xwd -delay 40.800000 /tmp/ttygif.o3g0lz/20.xwd -delay 11.100000 /tmp/ttygif.o3g0lz/21.xwd -delay 12.800000 /tmp/ttygif.o3g0lz/22.xwd -delay 40.700000 /tmp/ttygif.o3g0lz/23.xwd -delay 0.800000 /tmp/ttygif.o3g0lz/24.xwd -delay 0.100000 /tmp/ttygif.o3g0lz/25.xwd -delay 162.300000 /tmp/ttygif.o3g0lz/27.xwd -delay 21.500000 /tmp/ttygif.o3g0lz/28.xwd -delay 14.400000 /tmp/ttygif.o3g0lz/29.xwd -delay 19.100000 /tmp/ttygif.o3g0lz/30.xwd -delay 10.300000 /tmp/ttygif.o3g0lz/31.xwd -delay 20.800000 /tmp/ttygif.o3g0lz/32.xwd -delay 22.300000 /tmp/ttygif.o3g0lz/33.xwd -delay 41.500000 /tmp/ttygif.o3g0lz/34.xwd -delay 18.400000 /tmp/ttygif.o3g0lz/35.xwd -delay 18.300000 /tmp/ttygif.o3g0lz/36.xwd -delay 15.100000 /tmp/ttygif.o3g0lz/37.xwd -delay 12.700000 /tmp/ttygif.o3g0lz/38.xwd -delay 12.800000 /tmp/ttygif.o3g0lz/39.xwd -delay 98.300000 /tmp/ttygif.o3g0lz/40.xwd -delay 15.300000 /tmp/ttygif.o3g0lz/41.xwd -delay 172.100000 /tmp/ttygif.o3g0lz/42.xwd -delay 52.700000 /tmp/ttygif.o3g0lz/43.xwd -delay 67.900000 /tmp/ttygif.o3g0lz/44.xwd -delay 12.800000 /tmp/ttygif.o3g0lz/45.xwd -delay 31.200000 /tmp/ttygif.o3g0lz/46.xwd -delay 48.700000 /tmp/ttygif.o3g0lz/47.xwd -delay 26.400000 /tmp/ttygif.o3g0lz/48.xwd -delay 47.900000 /tmp/ttygif.o3g0lz/49.xwd -delay 108.800000 /tmp/ttygif.o3g0lz/50.xwd -delay 12.000000 /tmp/ttygif.o3g0lz/51.xwd -delay 13.500000 /tmp/ttygif.o3g0lz/52.xwd -delay 18.400000 /tmp/ttygif.o3g0lz/53.xwd -delay 23.900000 /tmp/ttygif.o3g0lz/54.xwd -delay 11.100000 /tmp/ttygif.o3g0lz/55.xwd -delay 17.600000 /tmp/ttygif.o3g0lz/56.xwd -delay 9.600000 /tmp/ttygif.o3g0lz/57.xwd -delay 16.800000 /tmp/ttygif.o3g0lz/58.xwd -delay 11.900000 /tmp/ttygif.o3g0lz/59.xwd -delay 18.300000 /tmp/ttygif.o3g0lz/60.xwd -delay 15.200000 /tmp/ttygif.o3g0lz/61.xwd -delay 14.300000 /tmp/ttygif.o3g0lz/62.xwd -delay 9.600000 /tmp/ttygif.o3g0lz/63.xwd -delay 36.700000 /tmp/ttygif.o3g0lz/64.xwd -delay 10.300000 /tmp/ttygif.o3g0lz/65.xwd -delay 35.200000 /tmp/ttygif.o3g0lz/66.xwd -delay 9.600000 /tmp/ttygif.o3g0lz/67.xwd -delay 14.400000 /tmp/ttygif.o3g0lz/68.xwd -delay 143.100000 /tmp/ttygif.o3g0lz/69.xwd -delay 1.000000 /tmp/ttygif.o3g0lz/70.xwd -delay 543.700000 /tmp/ttygif.o3g0lz/72.xwd -delay 23.200000 /tmp/ttygif.o3g0lz/73.xwd -delay 13.500000 /tmp/ttygif.o3g0lz/74.xwd -delay 15.900000 /tmp/ttygif.o3g0lz/75.xwd -delay 163.100000 /tmp/ttygif.o3g0lz/76.xwd -layers Optimize tty.gif 2>&1
Created: tty.gif in the current directory!

but there is no one any .gif file created. It still only one xdo file.
Please help.

OSX iTerm2 zsh: `Error: Failed to execute 'convert' command: Undefined error: 0`

Error: Failed to take snapshot: Undefined error: 0
Creating Animated GIF ... this can take a while
convert: no images defined `tty.gif' @ error/convert.c/ConvertImageCommand/3257.
Error: Failed to execute 'convert' command: Undefined error: 0
Created: tty.gif in the current directory!

convert -version

Version: ImageMagick 6.9.4-6 Q16 x86_64 2016-06-02 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib

TAG YOUR PROJECT

I can see 1.0.8 in mk file, please tag your github project so I can start packaging it for Fedora (amazing software ~)

readme.md references a bad concat_osx.sh

When doing this line on OS X:

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

I noticed the installed version was out of date with master. It looks like it was missing the rm $pngs fix and was instead doing rm $gifs.

I cannot confirm if this was specific to my system or not (I had installed ttygif in the past so it may have not overwrote the old installed script).

concat_osx.sh is hanging . . . maybe

Kind of a two part issue. First, and most pressing, it appears that concat_osx.sh is hanging. I see "creating animated gif: output.gif", but it never completes. Not sure how long it should take . . . but I let it run for like 45 minutes and still nothing. And then a second related issue, or feature request rather, would be additional logging . . . perhaps a progress bar or something. Anything to let the user know that something is indeed happening.

No environment variable WINDOWID

For some reason I kept getting an error about the env var WINDOWID not being set. To remedy this, on Xubuntu I was able to do:
export WINDOWID=$(xdotool getwindowfocus)
After that everything worked.

29:31: execution error: Can’t get application "Apple_Terminal". (-1728)

~/tty $ ttyrec myrecording
~/tty $ ttygif myrecording

29:31: execution error: Can’t get application "Apple_Terminal". (-1728)
Error: Failed to take snapshot: Undefined error: 0
Creating Animated GIF ... this can take a while
convert: no images defined `tty.gif' @ error/convert.c/ConvertImageCommand/3241.
Error: Failed to execute 'convert' command: Undefined error: 0
Created: tty.gif in the current directory!

OSX. Any ideas?

ttyrec helper

Thanks for developing ttygif. It would be very convenient to have a ttyrec wrapper that runs a set of commands with a configurable pause between them and at the end and then calls ttygif on the output.

Error: Out of pty's

iTerm 2 Build 3.1.5.beta.2
macOS High Sierra 10.13.1 (17B48)

$ ttyrec myrecording
Out of pty's
Terminated: 15

Any suggestions?

Incorrect capture: tqdm progress bar

I'm using the tqdm progress bar to show download progress in my hips package. However, after each iteration there is a line break (shown in the screenshot below). Is there any way to fix this?

issue-ttygif

Homebrew: sha1 is deprecated

In case you're not already aware, I'm logging a ticket about the ttygif sha1 warning:

Warning: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/Users/me/Library/Caches/Homebrew/Formula/ttygif.rb:6:in `<class:Ttygif>'

Warning: Calling SoftwareSpec#sha1 is deprecated!
Use SoftwareSpec#sha256 instead.
/Users/me/Library/Caches/Homebrew/Formula/ttygif.rb:6:in `<class:Ttygif>'

Warning: Calling Resource#sha1 is deprecated!
Use Resource#sha256 instead.
/Users/me/Library/Caches/Homebrew/Formula/ttygif.rb:6:in `<class:Ttygif>'

concat.sh makes mistakes in the 2nd use.

The concat.sh doesn't remove the temp gifs, so at the 2nd time I use it, it will concat all the gifs (including the temp gifs of both two times and the output gif of the 1st time). I think you can use a regular expression to filter the temp gifs and after concatting, remove all the temp gifs.

concat.sh delete all my gifs under subdirectories

In concat.sh, line 7:

gifs=$(find . -name '*.gif'| grep -v "$output" | sort | xargs)

Maybe it should limit its depth to only current directory:

gifs=$(find . -maxdepth 1 -name '*.gif'| grep -v "$output" | sort | xargs)

Now it deletes all my gifs in my$HOME/Images/ ... (too late when I have realized it)

Errors in bash

When calling the ttygif binary, I get one of these errors for each image

convert: iCCP: Not recognizing known sRGB profile that has been edited `00001_0.png` @ warning/png.c/MagickPNGWarningHandler/1832.

As a workaround, I added the -quiet flag to convert on this line. Obviously, not ideal, but at least I was able to make my gif ;)

xwd: unable to open display ' '

I have make a terminal record by ttyrec myrecord and it can be played with ttyplay myrecord, but when I try to convert it to a gif by the command ttygif myrecord, it occurs a problem as following:

xwd:  unable to open display ''
failed to execute: xwd -id 23068679 -out /tmp/ttygif.o9dmWc/0.xwd

I have already executed export WINDOWID=23068679 before converting, and Installed those package with

yum install imagemagick gcc x11-apps xdotool

My environment is:

OS: CentOS release 6.8 (Final)
Arch: x86_64
ttygif: 1.4.0

Hope to reply, thanks ! 🙏

osascript error for 32-bit

When running ./ttygif myrecording

I get the following error:

Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find:
    /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper

Seems to be related to Photoshop dependencies

Related Link: (Unit type conversion error)[http://helpx.adobe.com/photoshop/kb/unit-type-conversion-error-applescript.html]

screen shot 2014-05-31 at 2 48 55 pm

Temp files aren't cleaned up

Running ttygif (on Linux) results in a directory in /tmp full of .xwd files, which doesn't get cleaned up after ttygif is done with them.

not working on fedora 27

[raphaelsc@Host-001 ~]$ export WINDOWID=23068679
[raphaelsc@Host-001 ~]$ ttyrec my
[raphaelsc@Host-001 ~]$ echo "test"
test
[raphaelsc@Host-001 ~]$ exit
[raphaelsc@Host-001 ~]$ ttygif my
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)
Resource id in failed request: 0x1600007
Serial number of failed request: 9
Current serial number in output stream: 10
failed to execute: xwd -id 23068679 -out /tmp/ttygif.qD6wY6/0.xwd

Recording drops last two frames

The generated gif effectively drops the last two displayed frames. Looking at the command-line arguments given to convert(1), the last frame (present in the tmp directory full of xwd files) is not mentioned, and (assuming the gif is played in a loop) the second-to-last frame is shown for zero duration because there isn't a -delay after it.

Error on Centos7

when i execute the following command

$ ttygif myrecording

the error information is :

failed to execute: xwd -id 31457286 -out /tmp/ttygif.Ln1Nqw/0.xwd

Can’t get application "Apple_Terminal"

ttygif foo.ttyrec
29:31: execution error: Can’t get application "Apple_Terminal". (-1728)
Error: Failed to take snapshot: Undefined error: 0
Creating Animated GIF ... this can take a while
convert: no images defined `tty.gif' @ error/convert.c/ConvertImageCommand/3257.
Error: Failed to execute 'convert' command: Undefined error: 0
Created: tty.gif in the current directory!

tty.gif is not created.

Error: failed to exec screencapture

I pulled the latest version and got this error:

image

it seems that screencapture can't accept -l(null). I removed this param in ttygif.c and ttygif works fine. So, what's the point of -l(null)?

`xwd` not found error

I had no xwd command in my Debian system, so had to sudo apt-get install x11-apps. Please consider adding a note to the installation instructions.

Thanks!

run 'ttygif myrecording' err!

when I run the command './ttygif myrecording', it turn out to be
'linux-shrek:/home/Myworks/ttygif # sh: -c: line 0: syntax error near unexpected token (' sh: -c: line 0:import -window (null) 00000_0.gif'
snapshot: Success'

I don't kown why!please help me!

Not working on OSX

Currently running 10.7.5, but tested other versions as well. Tested under latest zsh (my primary shell), bash, sh.

Output is:

sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `import -window (null) 00000_0.gif'
snapshot: Undefined error: 0

Syntax error: "(" unexpected

I've got a problem for processing my ttyrecord file with ttygif tha failed and display:
Syntax error: "(" unexpected

Full detail:

I start by generating a small ttyrecord file:

root@orange:~ # ttyrec
You have mail.
root@orange:~ # echo "hello world"
hello world
root@orange:~ # exit
exit

Now I try to generate the gif file:

root@orange:~ # ttygif ttyrecord
You have mail.
Syntax error: "(" unexpected
snapshot: No error: 0
root@orange:~ #

System details:

  • OS: FreeBSD 11.0-CURRENT
  • TERM: screen (tmux more precisely)
  • Shell: /bin/csh

ttygif syntax error

Getting an error when processing ttygif:

sh: Syntax error: "(" unexpected
snapshot: Success

A compiler's warning in io.c

When I make the project, the compiler found the function efdopen() in io.c is non-void but doesn't return anything. Although it's a warning and this function is unused in your program, I still want you to solve it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.