Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: add "pause" control to record action #321

Closed
yuvalif opened this issue Sep 6, 2018 · 11 comments
Closed

Feature Request: add "pause" control to record action #321

yuvalif opened this issue Sep 6, 2018 · 11 comments

Comments

@yuvalif
Copy link

yuvalif commented Sep 6, 2018

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

@just4t
Copy link

just4t commented 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.

@yuvalif
Copy link
Author

yuvalif commented 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).

@ku1ik
Copy link
Contributor

ku1ik commented 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.

@vanyakosmos
Copy link
Contributor

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

@probonopd
Copy link

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

Can this be made the default please?

@fabianbaier
Copy link

fabianbaier commented 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.

@probonopd
Copy link

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

@ku1ik
Copy link
Contributor

ku1ik commented 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

@ku1ik
Copy link
Contributor

ku1ik commented 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.

@stealthman22
Copy link

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

@ku1ik
Copy link
Contributor

ku1ik commented Oct 2, 2021

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

@ku1ik ku1ik closed this as completed Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants