VNCREC
VNCREC
Home page: http://www.sodan.org/~penny/vncrec/
VNCREC has been around for some time, and hasn't really been developed further since its original creation. The key with vncrec is that it can record a vnc session. What this means is that it's possble to record a full desktop running on a remote computer or indeed the local one.
twibright version
There is a fork of the original vncrec (from 2002) on http://ronja.twibright.com/utils/vncrec/ (latest Changelog: 2006-12-20 Karel Kulhavy). Under Ubuntu 9.10, this is what worked for building
sudo apt-get install xutils-dev libxt-dev libxmu-dev libxaw7-dev wget http://ronja.twibright.com/utils/vncrec-twibright.tgz tar xzvf vncrec-twibright.tgz cd vncrec-twibright/ xmkmf make World
There are executables built for 9.10 on http://sourceforge.net/projects/sdaaubckp/files/; if vncrec, vncpasswd, vncconnect are in the same folder, the following commands work:
# record ./vncrec -record sample.vncrec localhost:5921 # ... or a more 'complicated' record: ./vncrec -viewonly -bge233 -depth 8 -encodings "corre hextile copyrect" -record sample.vncrec localhost:5921 # play ./vncrec -play sample.vncrec # transcode # note ffmpeg2theora v.0.27 may be better at this than v.0.24 # also, ffmpeg2theora v.0.27 has a '--noaudio' option instead! ./vncrec -movie sample.vncrec | ./ffmpeg2theora.linux --no-audio -o sample.ogv -
You may want to lower the desktop colors, which requires change of /etc/X11/xorg.conf - in Lucid, that is an empty file by default, so in that case, check change color depth in ubuntu 10.04? - Ubuntu Forums (as well as [ubuntu] Trying to configure xorg.conf file in Lucid... - Ubuntu Forums and [ubuntu] No xorg.conf found in /etc/X11 (Ubuntu 10.04) - Ubuntu Forums)
Note, in above example, ffmpeg2theora is used for transcoding. Also, note that the VNC server in this example is the default one in Ubuntu, which is vino that has default port 5900 (that is, "Remote Desktop Sharing in Ubuntu" -- so no need to install/run vncserver separately as for older versions). Finally, note that in terms of framerate, the vncrec-twibright/README states:
The sample rate of the movie is 10 by default or overriden by VNCREC_MOVIE_FRAMERATE environment variable, or 10 if not specified. Some formats (MPEG) don't have 10 so you must supply some more common number (24, 25,...).
... however, the man page also states: "VNCREC_MOVIE_FRAMERATE - Specifies frame rate of the output movie. Has an effect only in -movie mode. Defaults to 10. Try 24 when your transcoder vomits from 10."
Another note - if you prefer to convert these captures to image sequences, you can use ffmpeg to encode movie to single pictures; however, it may be better that you capture the output of vncrec -movie (which is a yuv420p raw video) to file, and then let ffmpeg work on this file, i.e.
# get vnc recording movie as file # [warning - it is big (5 min ~ 2.2GB)] ./vncrec -movie sample.vncrec > sample.vncrec.raw # use ffmpeg to get video file information # [use it to remember the frames per second] ffmpeg -i sample.vncrec.raw #- Input #0, yuv4mpegpipe, from 'sample.vncrec.raw': #- Duration: N/A, bitrate: N/A #- Stream #0.0: Video: rawvideo, yuv420p, 800x600, 10 fps, 10 tbr, 10 tbn, 10 tbc #- [buffer @ 0x9958d80] w:800 h:600 pixfmt:yuv420p # use ffmpeg to generate image sequence # [note here (5 min ~ 500 MB)] # [mind the expected number of images, and size accordingly, # i.e. %04d for > 1000 and < 9999 images] ffmpeg -i sample.vncrec.raw /path/to/samplimg%03d.png
Installation
VNCREC is not available in the standard Ubuntu repositories so you will need to download it from the home page.
Recording process
Start VNC server.
In Ubuntu this may be integral to the desktop and can be found under System --> Administration --> Remote Desktop which starts a VNC server called 'vino'. This exposes the current desktop over VNC. Be careful not to attach to this local VNC server in the current session because you will end up trying to control the desktop, controlling the desktop, controlling the desktop. The effect is a bit like pointing a video camera at the TV when you're showing the output of the camera on the TV. Quite pretty and amusing for a while but utterly useless unless you're remaking a 1970's pop video.
Alternatively it's possible to start a VNC server manually. The following command line assumes that the vncserver package is installed from the universe repository. The command will start a vncserver in which an X session should be running along with your normal desktop envionment. It will be started on desktop 10 - choose any number other than zero as this is usually used by the built in VNC server (if running) as detailed above. This could be started on the local PC or on any remote machine that you have a network connection to.
vncserver --geometry 1024x76 :10
If it starts correctly you should see something like the following:-
To find out the other command line options for vncserver, use the following command:-
vncserver --help
Start VNCREC
Start the recording software and connect to the vncserver - wherever it is running. If you started the vncserver on the local machine then the following command line will start recording. If you used the built-in vino vncserver then you'll usually need to connect to desktop number 0, not 10 as shown below. If you started the vncserver on a remote machine then replace localhost with the hostname or IP address of the remote computer. Beware that any firewalls between you and the remote machine will need to have port 59xx open - where xx is the two digit desktop number (10 in the case above).
vncrec -record localhost:10
Convert .vnc file
The main page for vncrec claims that transcode (which is in the Ubuntu repository) can convert a .vnc file to other formats.
Tips: If you have only one computer, create a second user under which you will do the demos, and run vncserver from there, but record by running vnrec using your normal user.
ScreenCasts/VNCREC (last edited 2010-12-02 16:25:55 by x1-6-00-0e-a6-3f-d7-8d)