Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Speed-up ASCIInema by editing file

I'm using ASCIInema.
And I try to speed it up. asciinema --speed solves this problem. But how to set the speed in the file.cast itself, so that it could be published and the user can execute asciinema play without an additional parameter?

like image 250
kyb Avatar asked Aug 22 '19 19:08

kyb


1 Answers

To make the speed change persistent you need to adjust the timing of each event in the cast file.

jq based solution proposed by @kyb is one way. Another is to re-record the cast with this command:

asciinema rec -c 'asciinema play -s 4 file.cast' faster-file.cast

This will create a new recording, but instead of recording a new interactive shell it will record the sped up playback of the old cast.

You don't need jq for this, however the downside is that it's not instant - it takes as much time as the playback at a desired speed.

like image 80
sickill Avatar answered Sep 27 '22 17:09

sickill