tav / asciinema2gif Goto Github PK
View Code? Open in Web Editor NEWGenerate animated GIFs from asciinema terminal recordings
Generate animated GIFs from asciinema terminal recordings
It just ate up something like 15GBs of ram/swap while trying to convert https://asciinema.org/a/3uftg7cenn3dgga0ji8w1xniu?speed=2 with -s small
- anything I can do?
I am following the exact command in the README and am getting the following result. I tried using both my own recordings and the default one on asciinema.org.
asciinema2gif --theme solarized-light -o "${HOME}/Desktop/another.gif" https://asciinema.org/api/asciicasts/8332
ReferenceError: Can't find variable: $
undefined:2
:4
The recording is of nothing. I simply started and then stopped the recorder and that was the error I received every time.
I am using OS X Sierra (or macOS or whatever it is called). I have used it in and out of tmux, and tried both bash and zsh. I have tried using node versions 0.10.30
, 4.6.0
and 6.4.0
. I am happy to try any other recommend debugging techniques if that would be helpful.
asciinema2gif-0.1 ./asciinema2gif https://asciinema.org/a/18135
Creating and changing to temporary dir: /var/folders/6p/0dbj8n411c9379rh737dhk9m0000gn/T/asciinema2gif.XXX.CtygEhlR
>> Dimensions: 332x576
>> Preparing window ...
ReferenceError: Can't find variable: asciinema
phantomjs://webpage.evaluate():9
phantomjs://webpage.evaluate():42
I tried to use phantomjs
but with no success.
Here I get Wrong URL format
asciinema2gif --size small --speed 2 -o "${HOME}/Desktop/another.gif" /Users/thomasreggi/Desktop/example.json
Some other gif creation scripts also tend to use gifsicle
, which is fine, but why use it when using imagemagick
as well? That seems to me like one dependency too many, since imagemagick
can also create and optimize gifs just as well.
I usually do just fine with a simple convert
command. Is there any strong reason to require gifsicle
?
it's hard to maintain
Repro:
brew install asciinema2gif
$ asciinema2gif -s small -t solarized-dark -o demo2.gif https://asciinema.org/api/asciicasts/dD9UhCIaPw13znirhmGUnNJtd
>> Dimensions: undefinedxundefined
>> Preparing window ...
TypeError: undefined is not an object (evaluating 'el.dispatchEvent')
undefined:47
:48
(hangs here forever)
Asciinema supports saving recordings to file now. Not having to upload recordings before conversion would be nice.
$ asciinema2gif -s big 104105
Dimensions: 1463.9375x1312
Preparing window ...
Generating screenshots ...
Progress: 0%
Progress: 0.3430794820830282%
Progress: 100%
Done!
Generating GIF…
gifsicle: warning: huge GIF, conserving memory (processing may take a while)
gifsicle::#434: read error: missing 1632188 pixels of image data
gifsicle:asciicast.gif:#434: read error: missing 1632188 pixels of image data
gifsicle: warning: trivial adaptive palette (only 46 colors in source)
$
Hi,
Thanks a lot for your work which seems to work great. Nevertheless, I try to convert an asciicast to a gif following your examples and I face an SSL error. Actually, I run this command:
./asciinema2gif --theme solarized-light -o "${HOME}/Bureau/test.gif" https://asciinema.org/api/asciicasts/81648
and I get the following error codes:
ERROR: Couldn't open https://asciinema.org/api/asciicasts/81648?theme=solarized-light.
ERROR: SSL handshake failed
My asciicast is public. And I get the same error codes while trying to run simply:
./asciinema2gif --size small --speed 2 --theme solarized-light 81648
Any idea why?
I just would like to note I think I have all the dependencies installed and I'm on Ubuntu 14.04 LTS
Many thanks for your help. Don't hesitate to tell me if I post in the wrong place...
see #5
Just created a cast with asciienema2 and tried to convert it with asciienema2gif and it fails with:
ERROR: Error creating SSL context (error:140A90C4:SSL routines:func(169):reason(196))
Running Debian Testing.
Gets to here and hangs:
>> Progress: 100%
>> Done!
>> Generating GIF…
asciinema2gif https://asciinema.org/a/deo5wx7v8iok4dt4h7mrtei1e
>> Dimensions: 563x752
>> Preparing window ...
sist output:
Darwin
x64
uname
: Darwin
echo $SHELL
: /bin/zsh
echo $TERM
: xterm-256color
echo $TERM_PROGRAM
: iTerm.app
npm -v
: 2.14.2
node --version
: v4.0.0
Time created: Wed Jul 27 2016 23:58:48 GMT-0700 (PDT)
It would be nice if we could pass option args to asciinema2gif that are supported in the GET request to the https://asciinema.org/api/asciicasts/ resource. e.g. speed, tframe, etc.
This would preclude users from having to figure out the ugly GET request syntax with their desired parameters before running the URL by asciinema2gif. i.e. https://asciinema.org/api/asciicasts/88888?t=4&speed=2
I tried to use the script, and run it, however it could not find the binary: phantomjs2.
This is the error message I am recieving:
./asciinema2gif: line 19: phantomjs2: command not found
I checked in the binary for phantomjs2 and under phantomjs2/bin: I saw the name of the binary was phantomjs.
I changed line 19 to phantomjs and ran the script and it worked afterwards. Is this something that needs to be updated?
during a coding session i reimplemented the shellscript using typescript if you want to check it out look here https://github.com/jfmherokiller/asciinema2gif i am hopeing to work my way up to that pull request where i can add file to gif support
I just cannot get it to work.
$ asciinema2gif 125790
ERROR: https://asciinema.org/api/asciicasts/125790 returns 404
Thanks.
Once the gif generation starts it's eating all my available memory very quickly (like 8gb in a few seconds)
Using master and:
[email protected]
imagemagick 6.9.5.10-1
npm install --global phantomjs2
threw me errors on Debian 8, with something to do about the 'node' legacy binary.
This page helped me out. I suggest adding a Debian installation section just to save other people the trouble of figuring out why phantomjs won't install.
When running the example from the readme I get this:
$ ./asciinema2gif --theme solarized-light -o "${HOME}/Desktop/another.gif" https://asciinema.org/api/asciicasts/8332
mktemp: too few X's in template ‘asciinema2gif’
: No such file or directory
The same happens with any asciicast numer or url and with different settings.
then OS X users can use brew install asciinema2gif
to install it
Installing asciinema2gif from a MacOS was a breeze. However things are not quite clear with Ubuntu.
Any way to improve it?
I'm able to adjust the size by giving asciinema.org the size=big
option, shown here: https://asciinema.org/api/asciicasts/5ljjg4iuybn8wpf5rk67m1e9z?size=big
However, when I tried:
asciinema2gif --size big -o output_big.gif https://asciinema.org/api/asciicasts/5ljjg4iuybn8wpf5rk67m1e9z
The size is still small.
Am I missing something here?
Thanks for your help 😄
I get this error when running it under ubuntu 14.04
$./asciinema2gif xxxxxxx
>> Dimensions: 948x1792
>> Preparing window ...
>> Generating screenshots ...
>> Progress: 0%
>> Progress: 0.23200604715409717%
<snipped>
>> Progress: 100%
>> Done!
>> Generating GIF…
libgomp: Thread creation failed: Resource temporarily unavailable
mv: cannot stat ‘/tmp/asciinema2gif.bXnq/asciicast.gif’: No such file or directory
$uname -a
Linux kubuntu14 4.4.0-59-generic #80~14.04.1-Ubuntu SMP Fri Jan 6 18:02:23 UTC 2017 i686 i686 i686 GNU/Linux
Seems like the /api/asciicasts
URL is no longer available
$ asciinema2gif https://asciinema.org/api/asciicasts/123683ERROR: https://asciinema.org/api/asciicasts/123683 returns 404
$ asciinema2gif https://asciinema.org/a/123683
Wrong URL format. See https://github.com/tav/asciinema2gif#url-format.
Neither does parsing by ID work
$ asciinema2gif 123683
ERROR: https://asciinema.org/api/asciicasts/123683 returns 404
It works well, but I was expecting the output to resemble what is have embedded in README.md as an example. Instead, the resulting gif contains a portion of the webpage.
e.g: http://i.imgur.com/g40TBU0.gifv
Is there an option I'm missing? If not, can this be added?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.