[GH-ISSUE #321] Feature Request: add "pause" control to record action #827

Closed
opened 2026-03-15 10:37:57 +03:00 by kerem · 11 comments
Owner

Originally created by @yuvalif on GitHub (Sep 6, 2018).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/321

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

Originally created by @yuvalif on GitHub (Sep 6, 2018). Original GitHub issue: https://github.com/asciinema/asciinema/issues/321 When recording, sometimes you want to pause the recording, and then continue.
kerem closed this issue 2026-03-15 10:38:02 +03:00
Author
Owner

@just4t commented on GitHub (Sep 6, 2018):

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.

<!-- gh-comment-id:419068890 --> @just4t commented on GitHub (Sep 6, 2018): 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.](https://asciinema.org/docs/config) about for more info. + other options available. Hope this helps.
Author
Owner

@yuvalif commented on GitHub (Sep 6, 2018):

@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).

<!-- gh-comment-id:419074173 --> @yuvalif commented on GitHub (Sep 6, 2018): @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).
Author
Owner

@ku1ik commented on GitHub (Nov 16, 2018):

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.

<!-- gh-comment-id:439322188 --> @ku1ik commented on GitHub (Nov 16, 2018): 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.
Author
Owner

@vanyakosmos commented on GitHub (Dec 6, 2018):

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
<!-- gh-comment-id:445059896 --> @vanyakosmos commented on GitHub (Dec 6, 2018): 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 <key> press we will pause recording and change first column to mark this pause - on second <key> 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: ```diff + 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 ```
Author
Owner

@probonopd commented on GitHub (Dec 27, 2018):

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

Can this be made the default please?

<!-- gh-comment-id:450146604 --> @probonopd commented on GitHub (Dec 27, 2018): > You can set an idle_time_limit in a custom file /root/.config/asciinema/config Can this be made the default please?
Author
Owner

@fabianbaier commented on GitHub (Jan 11, 2019):

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.

<!-- gh-comment-id:453654231 --> @fabianbaier commented on GitHub (Jan 11, 2019): 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.
Author
Owner

@probonopd commented on GitHub (Jan 11, 2019):

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

<!-- gh-comment-id:453668577 --> @probonopd commented on GitHub (Jan 11, 2019): Not really, as I don't type with constant speed ;-)
Author
Owner

@ku1ik commented on GitHub (Mar 2, 2019):

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
<!-- gh-comment-id:468920466 --> @ku1ik commented on GitHub (Mar 2, 2019): 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
Author
Owner

@ku1ik commented on GitHub (Mar 17, 2019):

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.

<!-- gh-comment-id:473704671 --> @ku1ik commented on GitHub (Mar 17, 2019): 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.
Author
Owner

@stealthman22 commented on GitHub (Oct 22, 2019):

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

<!-- gh-comment-id:544794026 --> @stealthman22 commented on GitHub (Oct 22, 2019): 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
Author
Owner

@ku1ik commented on GitHub (Oct 2, 2021):

This has been solved with #340, will be relased shortly with v2.1.

<!-- gh-comment-id:932790466 --> @ku1ik commented on GitHub (Oct 2, 2021): This has been solved with #340, will be relased shortly with v2.1.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#827
No description provided.