Google
 

3/5/08

Screencast Guide: Capure Your Linux Desktop on Video!

Have you ever wanted to record a video of your sleek desktop, with customized icons, taskbar and such? Or have you ever wanted to take a video of some cool XGL/AIGLX effects? Or maybe a video tutorial to teach a friend how to use something or to upload it on your personal webpage for everyone to see it? There are a lot of reasons why one would want to record his desktop and more importantly, there are a lot of ways to do it. However, anyone wanting to record his desktop should know at least a couple of methods so he can use the most suitable one, depending on each task.

In the past, creating a screencast in Linux was based on VNC technology, which often caused problems for inexperienced users. Nowadays, creating a Linux screencast requires only a few clicks.

Method 1: Using xvidcap:

Xvidcap is a rather advanced screen capture tool. It allows you to select the size and position of the rectangular area to capture. The output file can be either mpeg, avi, asf or mov but the output file can also be saved as swf, flv, dv, m1v or m2v. It can also capture an audio stream from /dev/dsp (digital sampling and digital recording device) and add it to the video stream.

To install xvidcap, you'll have to:

- Download the latest version of xvidcap.
- Untar, compile and install it:

CODE

# tar xfz xvidcap-x.x.x.tar.gz
# cd xvidcap-x.x.x
# ./compile
# make
# make install


- To run it, type xvidcap in a terminal.
- Using it is pretty straight-forward and it should be used without problems by both advanced and inexperienced users. The preferences window has some advanced options which can be set to "auto" if you don't know what they're for.

NOTE: From what I've noticed, xvidcap has the tendency to use a lot of resources while recording the desktop video, making the desktop use close to impossible. However, it works pretty well with XGL/AIGLX.

Method 2: Using Istanbul:

Istanbul is a desktop session recorder for Linux. It records your session to an OGG Theora video file. Recording your dekstop session is a very easy process, as it only required clicking the notification area icon to start the recording and clicking that icon again will end the recording process.

Istanbul can most likely be found on most distro's repositories so installing it only requires telling your distro's package manager to install it. For instance, under Fedora, run:

CODE

# yum install istanbul


Alternatively, you can download the source code, compile and install it.

- To run it, simply type istanbul

NOTE: Istanbul uses a little bit less resources during recording so using your desktop while recording it would be a little bit less stressful than when using xvidcap.

Method 3: Using recordMyDesktop

recordMyDesktop is a desktop session recorder which attempts to be very easy to use, yet effective at its primary task. The program is separated in two: a simple command line tool that performs the basic tasks of capturing and encoding and an (optional) interface written in Python, which reveals the program’s functionality in a usable and easy way.

- To install recordMyDesktop, you'll have to download the source package from the project's website.
- You can either download the console version of this program or both the console and the GTK version.
- Uncompress them both, compile and install it with the usual ./configure ; make ; make install.
- Run it with the command recordmydesktop or gtk-recordmydesktop, depending on which files you’ve compiled and installed.
- The console version (if ran without parameters), will save an out.ogg file in $HOME, while the gtk version will open a window through which you can set several configuration options. Each option is explained in detail. The GTK version will also save an out.ogg file in $HOME.

NOTE1: By default, recordMyDesktop first records the desktop capture as an uncompressed video file and when the capture is stopped, it will be compressed with a codec. This way, you can use your desktop more easily while capturing the video. Unfortunately, this method will use a lot more disk space. However, if you want realtime compressing, you can define so in the configuration window.

NOTE2: recordMyDesktop will only produce files using only open formats (theora for video and vorbis for audio).

If the GTK version will output ImportError: from recordMyDesktop import rmdSimple, you should try running the following command and then try running the program again:

CODE

ln -s /usr/local/lib/python2.4/site-packages/recordMyDesktop/ /usr/lib/python2.4/site-packages/recordMyDesktop


Method 4: Using Pyvnc2swf

Pyvnc2swf is a cross-platform application that captures the Desktop and saves it as a ShockWave Flash (swf) format. This is useful when the recording you're about to make will be added to a website. You'll have the ability to choose the framerate, as well as the movie size.

To start using pyvnc2swf, you'll have to:

- Download the latest version of x11vnc.
- Download the latest version of pyvnc2swf.
- Compile and install x11vnc:

CODE

cd download_folder
tar xfz x11vnc-versionnumber.tar.gz
cd x11vnc-versionnumber/
./configure
make
make install


- Uncompress the python version of vnc2swf to the $HOME directory:

CODE

cd $HOME
tar xfz pyvnc2swf-versionnumber.tar.gz


- To start using the program, simply type:

# x11vnc -localhost -viewonly -wait 10 -defer 10 &
# python ~/pyvnc2swf*/vnc2swf.py -o tutorial.swf -N -S localhost:0


- A small window will appear. You can set the capture options from the Options menu and press the Start button to record your desktop activity. Finally, to stop recording and saving the swf file, press the Stop button and go to File / Save as to save the swf file, together with a html file for easy movie viewing through a browser.

By: Mihai Marinof, Linux Editor

No comments: