Playback support for terminal graphics (iTerm inline images protocol)?

Hi, my first post here… I noticed that asciinema cli is perfectly able to record and play “terminal graphics” output from imgcat, an iTerm2 tool”, but asciinema player e.g. on Asciinema dot org, does not play the content. It’s kind of easy to extract the base64-encoded content from the asciicasts, though. I think it would be a wonderful feature to support rendering this graphics in asciinema player, too. Is this anything others would consider to be of interest?

Here is a bunch of links for further reading (sadly I can put only two links here, so I’m including an image, too, if you like to do OCR… :wink:):

1 Like

This is link to the online example: iTerm2 imgcat example - asciinema.org

1 Like

Ok, here are two examples after some experimentation, which look to me like this could open a new category of use cases. So far this is supporting iTerm2 (most popular terminal on macOS) for recording and playing in CLIs, while the player should play them in any browser. If there is any interest I can clean this up and make a PR, @ku1ik? And then see how to extend to Kitty and Sixel, which are also quite popular and should also work on Linux/Windows.

Player output:

asciinema-player-images

CLI output in next reply…

CLI output:

asciinema-cli-images

There is a PR now: Add inline image rendering support (iTerm2 OSC 1337 protocol) by deeplook · Pull Request #308 · asciinema/asciinema-player · GitHub

Hey @deeplook ,

Thanks for interest in improving the player. The demos above look cool.

However…

At this point I’m not interesting in incorporating this into the player. I’m not strictly against image support either. I briefly scanned through the PR code and there are too many things to change for the code to fit well into the player, and it’s just a significant amount of new (AI generated) code to maintain, which I’m not really looking forward to. But I encourage you to maintain this in your own fork, if your use cases require image support.

Good luck!