top | item 17048922

Asciinema – Record and share your terminal sessions

275 points| andrewla | 7 years ago |asciinema.org

60 comments

order
[+] slavik81|7 years ago|reply
I think I was pushing the limits of what the service could handle with my fluid simulations. They're pretty choppy on first playback, but run smoothly the second time.

Block - https://asciinema.org/a/125371

Waterfall - https://asciinema.org/a/125380

[+] warent|7 years ago|reply
Those are worth an HN thread of their own imo. Maybe a blog post or github page explaining how you did this
[+] celerity|7 years ago|reply
My co-founder wrote a bit about Asciinema as part of a comprehensive comparison of terminal recorders [1]. There's a lot to love about it (wide availability, very nice JavaScript playback -- check out the Game of Life playback at [1]), but it's a bit of a chore to self host, if that's important for you.

[1]: https://intoli.com/blog/terminal-recorders/

[+] AdmiralAsshat|7 years ago|reply
The difficulty in self-hosting was what prevented us from using this at my job. Proprietary source code, and whatnot.
[+] loeg|7 years ago|reply
This is really cool, and if I wanted to host a demo on a public website or something like that (attempting to keep bandwidth use down), I would use it in a heartbeat.

My use case for terminal demos is very different from that. Usually I'm just recording something short and emailing it to one person. Bandwidth savings do not accumulate across many website visitors, and simple is perfect.

The nice thing about video is I can just email it. I don't need to host a web server instance for playback. Even at very high quality settings ("ffmpeg -qscale:v 1", nothing blurry about it) the resulting video is only about 1MB/minute (80x24 term, h264 or h265).

Here's my demo workflow, in case folks are curious:

1. simplescreenrecorder to record terminal window + voice.

2. ffmpeg -i recorded.mkv -vcodec libx264 -qscale:v 1 -acodec aac encoded.mp4 # or s/264/265/ for slightly better compression, if the receiver has new enough codecs

3. Email the video or whatever.

That's it.

[+] Nadya|7 years ago|reply
The main killer feature, in my opinion, is that you can pause and copy and paste the text from any given point. Not that you can record and share terminal session, which you could do with basically any video recording software.

For example, at 00:11 of https://asciinema.org/a/139514

    Puzzle: 54-14343245-14134544-48EW.53NE                                          
        1 4 1 3 4 5 4 4            1 4 1 3 4 5 4 4                                  
       ┌─┬─┬─┬─┬─┬─┬─┬─┐          ┌─┬─┬─┬─┬─┬─┬─┬─┐                                 
     8 │ │ │ │━│ │ │ │ │ 5      8 │ │┏│━│━│┓│ │ │ │ 5                               
       ├─┼─┼─┼─┼─┼─┼─┼─┤          ├─┼─┼─┼─┼─┼─┼─┼─┤                                 
     7 │ │ │ │ │ │ │ │ │ 4      7 │ │┃│ │ │┗│━│┓│ │ 4                               
       ├─┼─┼─┼─┼─┼─┼─┼─┤          ├─┼─┼─┼─┼─┼─┼─┼─┤                                 
     6 │ │ │ │ │ │ │ │ │ 2      6 │ │┃│ │ │ │ │┃│ │ 2                               
       ├─┼─┼─┼─┼─┼─┼─┼─┤          ├─┼─┼─┼─┼─┼─┼─┼─┤                                 
     A │━│ │ │ │ │ │ │ │ 3      A │━│┛│ │ │ │ │┃│ │ 3                               
       ├─┼─┼─┼─┼─┼─┼─┼─┤          ├─┼─┼─┼─┼─┼─┼─┼─┤                                 
     4 │ │ │ │ │ │ │ │ │ 4      4 │ │ │ │ │┏│━│┛│ │ 4                               
       ├─┼─┼─┼─┼─┼─┼─┼─┤          ├─┼─┼─┼─┼─┼─┼─┼─┤                                 
     3 │ │ │ │ │┗│ │ │ │ 3      3 │ │ │ │ │┗│ │ │ │ 3                               
       ├─┼─┼─┼─┼─┼─┼─┼─┤          ├─┼─┼─┼─┼─┼─┼─┼─┤                                 
     2 │ │ │ │ │ │ │ │ │ 4      2 │ │ │ │ │ │ │ │ │ 4                               
       ├─┼─┼─┼─┼─┼─┼─┼─┤          ├─┼─┼─┼─┼─┼─┼─┼─┤                                 
     1 │ │ │ │┃│ │ │ │ │ 1      1 │ │ │ │┃│ │ │ │ │ 1                               
       └─┴─┴─┴─┴─┴─┴─┴─┘          └─┴─┴─┴─┴─┴─┴─┴─┘                                 
        1 2 3 B 5 6 7 8            1 2 3 B 5 6 7 8
[+] xfer|7 years ago|reply
You can send the recording(json file) of asciinema too and it's significantly smaller in size. The receiver does need to haveasciinema installed to playback though.
[+] JepZ|7 years ago|reply
Sometimes you wonder how something that is so widely known and has been posted so many times [1] can reach No. 1... but yeah, its cool.

[1]: https://hn.algolia.com/?query=asciinema&sort=byPopularity&pr...

[+] lucb1e|7 years ago|reply
Perhaps because it has lots of fans who like to spread the word?

I use it only very occasionally, like once a year, but love the way it works. My first experience was perfect, I really couldn't think of a single thing to improve (and that's very rare), so that left a very good impression.

[+] lasekar|7 years ago|reply
Visual Studio Code LiveShare extension also has terminal sharing, but not with recording, simply being able to work with the remote's terminal.
[+] jaytaylor|7 years ago|reply
Tried out asciinema earlier this year, and it is super duper cool.

TLDR: Wish it included some functionality to get finished usable media artifacts out.

In the end I gave up after failing to find a way to convert the resulting asciinema data files to a GIF or any other HTML-compatible media file. The open-source projects ended up not working for various reasons- broken shell scripts, abandoned projects, node.js programs that require a fully working phantomjs installation and then it still doesn't work, requiring docker (come on, really? Spin up containers just to convert to a GIF?), and these are only the problems I remember offhand.

Some breadcrumbs:

https://www.google.com/search?q=asciinema+convert+to+gif

https://unix.stackexchange.com/questions/314235/converting-a...

"asciinema doesn't provide this natively, there are tools out there that can facilitate that for you"

Right.

[+] dcbadacd|7 years ago|reply
Wouldn't animated svgs be a better output format for something like that?
[+] fiddlerwoaroof|7 years ago|reply
This has been an issue for me. My solution so far has been to just make a wrapper html page that uses their library.
[+] airstrike|7 years ago|reply
I swear I can't be the only one who's bugged by the fact that the link to the recording[0] doesn't actually play out the same way as the session you just watched in the front page![1]

[0] https://asciinema.org/a/17648

[1] https://asciinema.org/

[+] daveevad|7 years ago|reply
how on earth does copy/paste work from inside a video?

i'm way more confused than disappointed and wonder how easy it would be to rip this for use in a non-public environment?

[+] kashifr|7 years ago|reply
With all the terminal recordings I have seen, the content eventually ends up at the bottom. It would be awesome to have the cursor always stay in the middle... any idea if thats possible with Asciinema?
[+] lucb1e|7 years ago|reply
Why do you want to have it in the middle? Then you waste half the screen space right?

If you want it to push from the top, I could understand... but in the middle?

[+] domakidis|7 years ago|reply
I last used Asciinema when presenting my thesis. It certainly gave the presentation a nice vibe, but I still had to fire up a real terminal window when answering questions.
[+] advisedwang|7 years ago|reply
This fixes my main grievance with ttyrec: no seeking!
[+] kevin_thibedeau|7 years ago|reply
tty-player [1] gives you seekability, scrolling, and copy/paste with standard ttyrec files. Much easier for self-hosting than Asciinema and permits the use of other existing tools that work with ttyrec output.

[1] http://tty-player.chrismorgan.info

[+] alexbeloi|7 years ago|reply
Super cool!

IMO, the killer feature is how easy it is to embed recordings into your project readme or issues/comments in markdown/html.

[+] GiorgioG|7 years ago|reply
Still doesn't support Windows =(
[+] tripa|7 years ago|reply
There's a “Contributing” link at the bottom of the page.
[+] lacker|7 years ago|reply
I read this as "Ascii enema". Yikes
[+] artgon|7 years ago|reply
Me too. What's the correct pronunciation? "Ass-cinema"?
[+] analognoise|7 years ago|reply
Read it the exact same way.

This is a perfect example of why engineering has a separate marketing division.

[+] CharlesW|7 years ago|reply
I mean, O's wouldn't be so bad. #'s would hurt.
[+] ythn|7 years ago|reply
Or just the `script` command?

http://man7.org/linux/man-pages/man1/script.1.html

Still, that's pretty sick that you can pause the "video" and highlight/copy/paste in-browser

[+] geofft|7 years ago|reply
The script command doesn't record timing data, so it's not very useful for playback. It's designed for transcripts, not for videos.