Differences between revisions 9 and 10
Revision 9 as of 2019-02-12 18:08:28
Size: 3545
Editor: RicardoCosta
Comment: Inserted the link to the Brazilian page.
Revision 10 as of 2019-08-15 20:50:19
Size: 3590
Editor: nodiscc
Comment: add CategoryNetwork CategorySoftware
Deletions are marked like this. Additions are marked like this.
Line 61: Line 61:

-----

CategoryNetwork CategorySoftware

Translation(s): English - Português Brasileiro

How to record and playback an X11 session

A. get vncrec to work

  1. download vncrec sources from http://www.sodan.org/~penny/vncrec/

  2. apt-get install xlibs-dev libxaw7-dev
  3. build vncrec; it won't make it, but it'll make it to build vncrec. Build instructions are in the README: xmkmf; make World
  4. copy /vncrec-0.2/vncrec/vncrec to /usr/local/bin

B. install x11vnc

  1. apt-get install x11vnc
  2. x11vnc -viewonly -localhost

C. record things

  1. vncrec -record /bigpartitionwithfreespace/session.vnc
  2. iconise the window ASAP

D. playback

  1. vncrec -play test.vnc

E. encoding

There are two ways: one is using vncrec to generate frames as single images and then reencode them.

Note that a newer mencoder wants the files specified differently. This worked for me: mencoder "mf://*.png" -fps 10 -o output.avi -ovc divx4

In my case, however this would not work, as mogrify would complain that the XPM files had an invalid header.

Another option is to use transcode, but in my case it did not work: either transcode would quit right away, or it would get stuck.

Frank Gevaerts mailed me this solution:

  • I had the same problem some time ago, but I managed to solve it. What I did was:
    • patch transcode (see attached patch), to make its xpm input faster (by a lot), and to accept xpm files with more colours. I still have to clean up the patch and submit it upstream sometime.

    • start a vncserver with the same colour depth as the one used to record. I had to do this to make vncrec produce correct xpm files.
    • run transcode. I used the following command line (to produce a dvd compatible mpeg2 stream). The vnc-provided X server is :2 DISPLAY=:2 transcode --use_rgb --dvd_access_delay 30 -i vncrecord.vnc -Z 720x576  -y mpeg2enc -F 8 -o mpegfile

F. alternative ways

One alternative way is Istambul, which I tried, but it's so resource-hungry that doesn't leave me anything left to actually do my presentation. People who've done it suggesting reducing the frame until the load gets acceptable (Marcus Bauer reported that 10 frames per second should work acceptably on an AMD 2600Mhz laptop). When Istambul works, it's good because the output is directly usable as a video file; however, p2-mate observes that OGG Theora does inter-frame compression and is thus not a good format if you need to do some post-processing.

Another way is Recording to SWF with vn2swf. I have not tried this. SWF is cute in that it can be put directly in a web page, but as a file format it's evil. It would be nice if it worked with free SWF players.

G. miscellanea

Marcus Bauer reports having seen a nice little tool which shows in a little window the mouse buttons you have pressed, which gives a nice visual feedback if you use the right button.

Another tool useful for highlighting things is gromit, and it's already part of Debian.


Enrico Zini


CategoryNetwork CategorySoftware