Asciinema: Feature Request: add "pause" control to record action

Created on 6 Sep 2018  ·  10Comments  ·  Source: asciinema/asciinema

When recording, sometimes you want to pause the recording, and then continue.

Most helpful comment

You can set an _idle_time_limit_ in a custom file _/root/.config/asciinema/config_ as follows (this would save you to record the delay times while typing your terminal entries, making the playback 'waiting' times reduced to max. 2 seconds) :

[record]
; Limit recorded terminal inactivity to max n seconds, default: off
idle_time_limit = 2

Recommended to read the docs. about for more info. + other options available.

Hope this helps.

All 10 comments

You can set an _idle_time_limit_ in a custom file _/root/.config/asciinema/config_ as follows (this would save you to record the delay times while typing your terminal entries, making the playback 'waiting' times reduced to max. 2 seconds) :

[record]
; Limit recorded terminal inactivity to max n seconds, default: off
idle_time_limit = 2

Recommended to read the docs. about for more info. + other options available.

Hope this helps.

@just4t thanks for the answer. This will help in some cases, but not when i want to actually skip in the recording parts that are printed to the terminal (e.g. booting of a virtual machine).

That's a good use case. We could implement pause/unpause via a keyboard shortcut, for ex: <ctrl-p> or similar.

It would probably be good to have some indicator/confirmation that you actually paused/unpaused, otherwise you would never be sure.

The only thing I can imagine is that recorder could write play/pause status into some file and we will need to run something like watch -n 1 cat that_file.txt in separate tab in order to check that status.
But this approach looks kinda ugly...

Maybe we can add this feature as post processing step:

  • play recording in special "edit" mode
  • first character of each row will indicate state (play/pause), maybe with some color
  • on press we will pause recording and change first column to mark this pause
  • on second press we will continue recording and change first column again
  • when recording is finished we will cut off segments that were marked as pause

illustration:

+ echo recording...
+ echo still playing...
- echo this pause, it will not be present in final recording file
- echo this line too
+ echo and this line we will keep
- exit

You can set an idle_time_limit in a custom file /root/.config/asciinema/config

Can this be made the default please?

Another workaround would be:

1) Start the recording via asciinema rec my.cast
2) On the part where you want to pause press CTRL+D to end the recording
3) When you are ready to resume use asciinema rec --append my.cast
Optional: You can edit the recording and e.g. remove certain bits and pieces by editing the my.cast afterwards with a text-editor

Watching your recording via asciinema play my.cast should show you a smooth video as if you hit the pause/resume buttons.

Not really, as I don't type with constant speed ;-)

You can "burn" fixed idle time of existing recording by playing it inside new recording.

This one will save idle-time-limit in new recording's header line:

asciinema rec -i 2 -c "asciinema play existing.cast" new.cast

This one will actually adjust the timing of every print event:

asciinema rec -c "asciinema play -i 2 existing.cast" new.cast

I've opened PR #340 for recording pause feature. Please take a look, I think this is what @yuvalif had in mind when opening this issue.

This pause feature if added will be the best.
Sometimes I am not too sure of what I am doing on the terminal (Like reading some docs to learn something), I should be able to pause and resume easily. It's intuitive

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThomasWaldmann picture ThomasWaldmann  ·  3Comments

maphew picture maphew  ·  12Comments

redaxmedia picture redaxmedia  ·  3Comments

ethanboxx picture ethanboxx  ·  6Comments

omaraboumrad picture omaraboumrad  ·  10Comments