[GH-ISSUE #351] [ Feature Request ] seek to location #224

Closed
opened 2026-02-25 20:33:06 +03:00 by kerem · 6 comments
Owner

Originally created by @cyc115 on GitHub (Apr 10, 2019).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/351

For a long recording it would be nice to be able to seek to

  • a location in time
  • a location that has string that matches a given string or regex.

This makes it easy to navigate a large recording for the purpose of record keeping without having to parse through the cat output.

Originally created by @cyc115 on GitHub (Apr 10, 2019). Original GitHub issue: https://github.com/asciinema/asciinema/issues/351 For a long recording it would be nice to be able to seek to - a location in time - a location that has string that matches a given string or regex. This makes it easy to navigate a large recording for the purpose of record keeping without having to parse through the `cat` output.
kerem closed this issue 2026-02-25 20:33:06 +03:00
Author
Owner

@ku1ik commented on GitHub (Sep 8, 2019):

That sounds useful but poses a big challenge on usability/UI of it. Since asciinema is "transparent" to terminal, in a sense that it doesn't draw any extra UI elements, I'm not sure how one would use the suggested feature.

Maybe breakpoints feature (#341) could be useful for this?

<!-- gh-comment-id:529187092 --> @ku1ik commented on GitHub (Sep 8, 2019): That sounds useful but poses a big challenge on usability/UI of it. Since asciinema is "transparent" to terminal, in a sense that it doesn't draw any extra UI elements, I'm not sure how one would use the suggested feature. Maybe breakpoints feature (#341) could be useful for this?
Author
Owner

@ju-sh commented on GitHub (Feb 11, 2020):

I wonder how seek is being implemented when the session is played for the recordings hosted at the asciiema website? As in https://asciinema.org/a/113463?autoplay=1

Maybe the recordings are first converted to some other video format?

<!-- gh-comment-id:584720546 --> @ju-sh commented on GitHub (Feb 11, 2020): I wonder how seek is being implemented when the session is played for the recordings hosted at the asciiema website? As in https://asciinema.org/a/113463?autoplay=1 Maybe the recordings are first converted to some other video format?
Author
Owner

@cyc115 commented on GitHub (Jun 12, 2020):

The recorded cast files are plaintext and each output lines are timestamped so seeking should be doable with the native format. We could have hotkeys to fast forward / go back x seconds and a more precise "seek to" functionality that pauses the playback and draws a UI on top of the (paused) recording to let us seek to location.

<!-- gh-comment-id:643337476 --> @cyc115 commented on GitHub (Jun 12, 2020): The recorded cast files are plaintext and each output lines are timestamped so seeking should be doable with the native format. We could have hotkeys to fast forward / go back x seconds and a more precise "seek to" functionality that pauses the playback and draws a UI on top of the (paused) recording to let us seek to location.
Author
Owner

@psdon commented on GitHub (Sep 10, 2021):

this would be useful, any updates on this? Or anyone is working?

<!-- gh-comment-id:916539558 --> @psdon commented on GitHub (Sep 10, 2021): this would be useful, any updates on this? Or anyone is working?
Author
Owner

@saulius-krasuckas commented on GitHub (Dec 25, 2021):

ping

<!-- gh-comment-id:1001016332 --> @saulius-krasuckas commented on GitHub (Dec 25, 2021): ping
Author
Owner

@ku1ik commented on GitHub (Dec 25, 2021):

What you're looking for is something a combo of ttyrec + ipbt provides:

Conventional ttyrec players are little more than a loop
interspersing sleep(2) with write(2); it's easy to pause and
fast-forward, and a particularly advanced player might be able to
rewind by noticing screen clears and using them as marker points
(since replay can be restarted reasonably safely from a screen
clear), but precision single-step backward and forward motion is
entirely beyond such an application.

ipbt works by embedding a terminal emulator: it is essentially a
derivative work of the PuTTY code base. The input file is read in
full and run through the internal terminal emulator, and the
resulting screen states are saved in an internal movie array in such
a way that any screen state (`frame') can be retrieved efficiently.
Once this is done, the player application simply displays a sequence
of frames using libncurses; the user can perform the usual pause and
speed adjustment operations, but can also jump to an arbitrary frame
number and move backwards as well as forwards.

To have the rewind (seek-back) functionality in asciinema cli we'd need to implement it the same way as ipbt does - by embedding a terminal emulator. This is not planned, it's beyond the scope of the cli at the moment.

Implementing seek-forward only would be rather straightforward, but then the feature would feel half-baked for the end user so I'm hesitant to add it.

<!-- gh-comment-id:1001042142 --> @ku1ik commented on GitHub (Dec 25, 2021): What you're looking for is something a combo of ttyrec + [ipbt](https://www.chiark.greenend.org.uk/~sgtatham/ipbt/) provides: > Conventional ttyrec players are little more than a loop interspersing sleep(2) with write(2); it's easy to pause and fast-forward, and a particularly advanced player might be able to rewind by noticing screen clears and using them as marker points (since replay can be restarted reasonably safely from a screen clear), but precision single-step backward and forward motion is entirely beyond such an application. > > ipbt works by embedding a terminal emulator: it is essentially a derivative work of the PuTTY code base. The input file is read in full and run through the internal terminal emulator, and the resulting screen states are saved in an internal movie array in such a way that any screen state (`frame') can be retrieved efficiently. Once this is done, the player application simply displays a sequence of frames using libncurses; the user can perform the usual pause and speed adjustment operations, but can also jump to an arbitrary frame number and move backwards as well as forwards. To have the rewind (seek-back) functionality in asciinema cli we'd need to implement it the same way as ipbt does - by embedding a terminal emulator. This is not planned, it's beyond the scope of the cli at the moment. Implementing seek-forward only would be rather straightforward, but then the feature would feel half-baked for the end user so I'm hesitant to add it.
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#224
No description provided.