[GH-ISSUE #283] Support following mode in asciinema play like tail -f #810

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

Originally created by @lebinh on GitHub (Mar 30, 2018).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/283

The 2.0 file format already allow us to play a recording "live", i.e., while rec is still running. However there's still a small draw back, the playback finish immediately when it reaches EOF. This prevents us from watching and following the recording "live" over simple setup like an SSH connection to the same machine. Which I believe is a useful feature to have.

I'd like to add a new flag -f/--follow to asciinema play so that instead of exiting it will keep watching the file for new data and keep on playing it. And I can work on it but would like to hear from the maintainers first.

Originally created by @lebinh on GitHub (Mar 30, 2018). Original GitHub issue: https://github.com/asciinema/asciinema/issues/283 The 2.0 file format already allow us to play a recording "live", i.e., while `rec` is still running. However there's still a small draw back, the playback finish immediately when it reaches EOF. This prevents us from watching and following the recording "live" over simple setup like an SSH connection to the same machine. Which I believe is a useful feature to have. I'd like to add a new flag `-f/--follow` to `asciinema play` so that instead of exiting it will keep watching the file for new data and keep on playing it. And I can work on it but would like to hear from the maintainers first.
kerem 2026-03-15 10:33:37 +03:00
  • closed this issue
  • added the
    idea
    label
Author
Owner

@ku1ik commented on GitHub (Mar 31, 2018):

There are several, already working options for this, see this blog post: http://blog.asciinema.org/post/two-point-o/ and specifically this comment by @benaryorg http://blog.asciinema.org/post/two-point-o/#comment-3764849151:

# record
asciinema rec file.cast

# play
tail -fn +1 file.cast | asciinema play -

# play via ssh
ssh example.com tail -fn +1 file.cast | asciinema play -
<!-- gh-comment-id:377680423 --> @ku1ik commented on GitHub (Mar 31, 2018): There are several, already working options for this, see this blog post: http://blog.asciinema.org/post/two-point-o/ and specifically this comment by @benaryorg http://blog.asciinema.org/post/two-point-o/#comment-3764849151: ``` # record asciinema rec file.cast # play tail -fn +1 file.cast | asciinema play - # play via ssh ssh example.com tail -fn +1 file.cast | asciinema play - ```
Author
Owner

@ku1ik commented on GitHub (Mar 31, 2018):

I definitely find this use case worth looking into. Not sure if it's worth implementing native support if you can do it with unix tools. Maybe, maybe not, let's discuss :)

<!-- gh-comment-id:377680552 --> @ku1ik commented on GitHub (Mar 31, 2018): I definitely find this use case worth looking into. Not sure if it's worth implementing native support if you can do it with unix tools. Maybe, maybe not, let's discuss :)
Author
Owner

@lebinh commented on GitHub (Mar 31, 2018):

Oh that's great! And sorry, I missed the blog post and thus the (now) obvious use of playing from stdin, my bad. I think this is good enough, asciinema is already super useful and let's not reinvent tail -f 😄

But perhaps adding this to README might make it easier to discover 🤔 ?

<!-- gh-comment-id:377716013 --> @lebinh commented on GitHub (Mar 31, 2018): Oh that's great! And sorry, I missed the blog post and thus the (now) obvious use of playing from stdin, my bad. I think this is good enough, asciinema is already super useful and let's not reinvent `tail -f` 😄 But perhaps adding this to README might make it easier to discover 🤔 ?
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#810
No description provided.