asciinema / asciicast2gif

Generate GIF animations from asciicasts (asciinema recordings)
MIT License
1.21k stars 82 forks source link

Produced GIF freezes when played #69

Closed falzm closed 2 years ago

falzm commented 5 years ago

Hi 👋

I'm facing a very odd issue using asciicast2gif: it successfully produces a GIF file from an Asciinema cast file, however at some point the resulting GIF playback "freezes" (around frame 59 of 77). I tried on various players/browsers, all of them face the same problem. This is really weird, because when I open the GIF in macOS's Preview, all the frames are there... Do you know what could cause this?

Here is the command I'm running to generate the GIF (I run it via Docker):

$ docker run --rm -ti -v $PWD:/data asciinema/asciicast2gif exo_1.4.0.cast exo_1.4.0.gif
==> Loading exo_1.4.0.cast...
==> Spawning PhantomJS renderer...
==> Generating frame screenshots...
==> Combining 77 screenshots into GIF file...
==> Done.

The input .cast file (suffixed with .txt because Github): exo_1.4.0.cast.txt

The resulting bogus GIF:

exo_1 4 0

The correct Asciinema sequence can be played here: https://asciinema.org/a/4IXSk9XJ81aaDMmh0tTAqmjor

Thank you in advance!

ku1ik commented 2 years ago

Not sure why would that be... Either you can try https://github.com/asciinema/agg instead, which is a successor to asciicast2gif.

I generated gif from your recording with agg, looks like this:

4IXSk9XJ81aaDMmh0tTAqmjor