6

Can I convert a .json file; generated by a program like asciinema; into an animated .gif?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
voices
  • 1,252
  • 3
  • 15
  • 30

1 Answers1

6

Yes. While asciinema doesn't provide this natively, there are tools out there that can facilitate that for you.

You can create your local recording like so:

asciinema rec my_recording.json

And then feed that into a tool like asciicast2gif:

./asciicast2gif my_recording.json my_recording.gif
mcmahoniel
  • 176
  • 2
  • `$ asciinema rec my_recording.json asciinema: Too many arguments. See 'asciinema --help'.` – user84207 Nov 28 '17 at 02:17
  • @user84207: I'm not sure what's going on; I just tested this on the latest version of asciinema (`1.4.0`) and it still seems to be working for me. If you run `asciinema` without any parameters (or `asciinema --help`), you should see almost the exact same command listed. – mcmahoniel Nov 28 '17 at 19:13
  • It was an older version – user84207 Nov 28 '17 at 20:53
  • From a comment in the source code: `# run phantomjs to take screenshots while asciinema-player runs`. That's a pretty poor solution, oops! I would use a recording utility other than asciinema, like ttystudio. – Kaz May 05 '20 at 06:14