How can I do a screencast (having a video file out from my screen output) without X server? I mean, purely from the tty, no KDE, no LXDE, no Xorg beneath them. Like if I were in single-user mode.
5 Answers
Recordscreen.py
Recordscreen.py
sounds like what you're looking for. You can download and "install" it like so:
$ wget http://www.davidrevoy.com/data/documents/recordscreen_12-04.zip
$ unzip recordscreen_12-04.zip
$ rm recordscreen_12-04.zip
$ chmod +x recordscreen.py
There are a few dependencies that it requires:
$ sudo apt-get install wget libav-tools ffmpeg libavc1394-0 libavformat-extra-53 \
libavfilter2 libavutil-extra-51 mencoder libavahi-common-data
Run it like this:
$ ./recordscreen.py
ttyrec
You can use ttyrec
to also accomplish this.
For example, to record:
$ ttyrec
...
(In the executed shell, do whatever you want and exit)
...
Or this, to record just a command running:
$ ttyrec -e command
...
(command specified by -e option will be executed)
...
You can then use ttyplayback
to play back your recording:
$ ttyplay ttyrecord
There are some sample videos here in this articled titled: ttyrec > script on Linuxaria.

- 369,824
-
-
@JourneymanGeek - I would never steal someone's answer, we were writing it at the same time, I saw your answer come in after I posted my initial answer and came across Gilles answer here: http://unix.stackexchange.com/questions/35279/typescript-terminal-recording-into-video. So I was in the middle of adding
ttyrec
same time as you. I always wait until after I hit save before looking at other people's answers. – slm Jul 22 '13 at 02:36
ttyrec should do the trick - and you might be able to use one of the many playback front ends to convert it to a video - this one looks promising .
TTYrec has a few nice things to it - the recorder is pure CLI, and the protocol is dead simple and implimented in many different clients. It definately works in a pure terminal environment and is widely used in the nethack community - so it should handle near real-time changes in the screen.

- 467
-
-
I'll see about creating and testing it when I have a bit of time. I primarily answered this cause the OP mentioned it on chat – Journeyman Geek Jul 22 '13 at 02:42
Maybe try http://ascii.io/.
You can install it with one command: curl -sL get.ascii.io | bash
Then start recording: asciiio
When you're done press CTRL+D and you'll be asked for uploading it.
The script
command is what you're looking for. If you using the --timing
option, then you'll also want scriptreplay
to get all the timing information included.
This won't generate video, but it will generate a recording of everything that happened in that tty. If you replay that in a terminal window later, you can use X stuff you're used to record that terminal window as video.
script --timing=blah.timing blah
# Now you have a new interactive shell.
# Do what you want and it gets recorded.
exit
# Now you're back in your original shell
Copy those files over to a system with X, then:
scriptreplay --timing=blah.timing --typescript=blah
or, if actually watching your typing is too slow, speed it up with --divisor
:
scriptreplay --timing=blah.timing --typescript=blah --divisor=2

- 225
You can use scriptreplay. I usually prefer script command.Long back ago I wrote a post on this ,I hope this link will be helpful for you.
http://sharadchhetri.com/2012/07/16/terminal-recording-script-scriptreplay-command/

- 49
- 2
ttyrec
same as 2/3 of your answers now. I woudn't get too upset about a duplicate vote, it's my opinion, if 4 others agree it's a duplicate. – slm Jul 22 '13 at 02:46