asciinema-server
asciinema-server copied to clipboard
Speed control and annotation
Hi,
Love this tool, just great.
As two feature requests, could you consider to build in:
- Speed control during playback
- Adding the possibility to add annotation (dunno how, maybe by adding timestamp - annotation and displaying it on top or bottom of the playback window)?
Thanks,
Jasper
Annotation is planned. And the playback speed.. You can already adjust it by appending "?speed=3" to the URL (1 is normal speed).
Separate control on the player (or near it) would be IMO even better. This way users can change the speed on the fly (instead of currently having to refresh the page after adjusting the ?speed=
variable in the URL).
The FAQ mentions that editing the ascii cast would be quite difficult. What about just more granular speed control? Basically to speed up slow portions to make the end result flow better?
That would also lend to synchronizing with audio by tweaking the speed to align with a spoken script.
You can use --max-wait
option to rec
to optimize terminal inactivity and make the end result smoother and less boring.
Also, there's 1.0.0.rc1 which introduces new asciicast format which is JSON based, and allows editing (if you know what you're doing).
That is the catch. Right now it would be difficult to visualize where changes are needed, though making those changes would certainly be possible in the current file format.
I think two things could help make editing easier, without having to actually build an asciicast editor:
- Including some sort of time code in the JSON just for human consumption. That could be as simple as a frame number.
- A debug mode in the player that overlays that time code.
Then I could see that at frame 311 I need to reduce the duration, tweak the JSON, replay the video again.
Though an ascii video editor would be sweet too :-) Have you heard of Monodraw?
I was thinking if replacing pause time with absolute time, i.e. timestamp wouldn't be better here. However, while it would allow one to quickly find the right spot, it would make changing harder, because if you wanted to make one pause shorter you would need to update all following timestamps too.
I think we should be good for now with the format introduced in rc1. Also, it will be very easy to build additional tools for post-processing asciicasts. They could do things like making it twice as fast by dividing all delays by 2, removing/replacing some text etc. Imagination is the limit :)
I haven't heard of Monodraw but it looks very very cool!
That's why I suggested making the time code for human consumption. Just a frame number for people viewing the file, not something that the player uses.
Obviously tools could solve this problem too, which would avoid bloating up the JSON with debug data.
Yeah, I don't think I'd like to bloat up the JSON with this. I mean, this is interesting idea, and thanks for suggesting it. The thing is, we would need to display frame number during playback. It would be more tricky to do for playback in terminal, while pretty straightforward to do for playback in browser. Anyway, it would require some additional work, and I have many more important things to implement for asciinema on my plate right now :)
:-) Ok
@absorber @jasper- you can now now use <
and >
keys to change playback speed. There's no visual feedback when changing this yet but I'll be adding some indicator to the player's UI.
Can one reprocess an already-existing asciicast file like https://s3-eu-west-1.amazonaws.com/asciinema-bb-eu/uploads/asciicast/file/218612/ascii.cast?response-content-disposition=attachment%3B%20filename%3D218612.cast&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJBUMR4677QX6BM7Q%2F20190118%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20190118T225531Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=ce0119ead137774b0e5ab4efc51a0c9934cc9a3b8ab57e3884ad8ffc301e4455 to contain less pauses?
is there any way I can help with the implementation of an annotation system? I believe this is a great tool and I plan to use it to create tutorials: right now my "annotations" are echo commands, but you can imagine that's not really optimal
Related:
- https://github.com/asciinema/asciinema/issues/380
- https://github.com/asciinema/asciinema-player/issues/163