6

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.

ppp
  • 163
  • 1
    not really, that question involves X server, mind actually reading a question before even proposing it is a duplicate?! – ppp Jul 22 '13 at 02:42
  • I did read the question. Maybe you should read it again. There are answers there that suggest using 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
  • 1
    Well, you are right. But now think about someone googling this, they'll be more likely to go to this question, that explicitely answers their problem, instead of going to that question which is just somewhat similar (when I tried googling, I found that, seems that I didn't read it so deeply though, missed the ttyrec answer). – ppp Jul 22 '13 at 02:49
  • 2
    If you notice I'm still participating in your Q&A even though I flagged it as such. I agree with your logic and that's exactly how the SE sites function. There doesn't have to be a canonical answer for each question, there can be many versions of a question + answers, the duplicate isn't a negative thing to you, it's how the SE sites function. This Q is related to that Q. IMO it's a duplicate. Other times others might include a "possible related" link in comments to a similar though not duplicate Q. Try not to take it in a negative way, I surely didn't mean it that way when I flagged it. – slm Jul 22 '13 at 02:55
  • You are actually right (but in the duplicate instead of related part). Thank you anyway :,) – ppp Jul 22 '13 at 02:56

5 Answers5

3

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.

slm
  • 369,824
  • eh, you either have REALLY good timing or ganked my answer ;p – Journeyman Geek Jul 22 '13 at 02:34
  • @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
2

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.

2

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.

1

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
freiheit
  • 225
0

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/