Video recording your desktop

While preparing one of my two RMLL talks, I wanted to create a video demo of something happening on my screen, to avoid the evil demo effect.

I first tried using vncrec, and then transcode to convert to a video. But the video conversion phase took A LOT of time, because it seems that it starts an external program to write each frame.

I then switched to pyvnc2swf. Besides outputting swf files, it can also output video files (you need pymedia for this, which is packaged in neither Debian nor Ubuntu, but there’s a deb package available from their website). But the .vnc -> .avi conversion was crashing. The solution I found to work was to output .bmp files, to convert them to .png, and then, to create the video with mencoder. It worked without problem for a 8 minutes video, even if it requires quite a lot of disk space for storing all the .bmp and .png files.

Here is what my notes say I typed :

# record to a .vnc file using pyvnc2swf.
# convert to bmp (-r 5 specifies the framerate)
./ -t bmp -o test.bmp -r 5 test.vnc
# convert *.bmp to *.png
for i in *.bmp; do echo $i; convert $i ${i%bmp}png; done
# encode the video
mencoder mf://test-*.png -mf fps=5 -mf type=png -o output.avi -ovc lavc -lavcopts vcodec=mpeg4 -ofps 5

2 thoughts on “Video recording your desktop

  1. For the Gnome user: what about Istanbul & Byzanz? The first one records to OGG/Theora, the latter to GIF.

  2. I have Istanbul a very quick try, but the VNC-based approach is cleaner. I don’t know of Istanbul “records” the desktop, but it feels quite slow. Maybe it is doing screen captures ?

Comments are closed.