asciinema

asciinema ist ein Terminal Session Recorder. Dateien enden auf .cast.

Installation und Konfiguration

dnf -y install asciinema

Verwendung

Aufnahme. Fehlt die Angabe von filename, wird das Video nach Rückfrage auf asciinema.org hochgeladen:

asciinema rec --title='mytitle' [filename]
# do your stuff
exit

Lokale Wiedergabe:

asciinema play filename.cast
asciinema play https://asciinema.org/a/22124.cast

Upload und Wiedergabe

asciinema upload filename.cast

Wer seinen ASCII-Film bearbeiten möchte (Edit, Cut, Change Speed etc.), dem hilft das Golang-Skript asciinema-edit von https://github.com/cirocosta/asciinema-edit.

dnf -y install golang-bin

cd
go get -u -v github.com/cirocosta/asciinema-edit

# maximum delay of 3s for the whole cast
~/go/bin/asciinema-edit quantize --range 3 --out filename-out.cast filename-in.cast

# make only a certain part of the video twice as slow:
~/go/bin/asciinema-edit speed --factor 2 --start 12.231 --end 45.333 --out filename-out.cast filename-in.cast

# cut something
~/go/bin/asciinema-edit cut --start=12.2 --end=15.3 --out filename-out.cast filename-in.cast

ASCIInema to animated GIF:

Built on 2024-04-18