Recording A Desktop Session

This page includes instructions for using a simple utility for recording desktop sessions.

Note that there are two ways to record your desktop session: the “hard” (command-line) way, or the “easy” (graphical) way. I'll describe both on this page.

Recording From the Command Line

Whether you're doing your recording the easy way or the hard way, you'll be using an application called recordmydesktop. And, luckily for you, even doing it the hard way isn't that hard…

To install it, simply install the recordmydesktop package:

sudo apt-get install recordmydesktop

And to run it, simply type the recordmydesktop command — that's it! It will start recording everything that you do, and, if you have a microphone (and it's not muted), it will even record anything that you say. (It will also record background noise, so you probably don't want to have the TV on in the background, while you do this.) When you're finished recording, go back to your terminal window, and hit Ctrl+C to end the program. It will stop recording, and generate a file named out.ogg in your home directory. (Depending on how long you spent recording, it might take a long time to generate this file.)

If you already have a file named out.ogg, recordmydesktop will create a new file, named out.ogg.1, instead of overwriting the old one. (Or, if there is already an out.ogg.1, then it will create out.ogg.2, etc.)

Parameters

There are a few parameters that you can specify to the application — like telling it to only record certain areas of the desktop, instead of the whole thing, or fiddling with the video or audio options — but you probably don't want to bother fiddling with these, using the command-line. (If you want to do any of this, you'll want to use the graphical version, described below.) One option that you might want to fiddle with is the name of the output file, which you can specify as a parameter.

For example, to create a file called usingcompiz.ogg, simply type:

recordmydesktop usingcompiz.ogg

The file will still be placed in your home directory. If you want to put it somewhere else, specify a full path. For example:

recordmydesktop /home/serna/Desktop/usingcompiz.ogg

would put the file on my desktop (since I'm logged in as serna).

Recording Using the UI

If you don't feel like doing all of this command-line stuff — or if you want to do more complex configuration of the videos you're creating — you will want to do this the graphical way.

For this, you'll need to install two packages. Open Synaptic Package Manager, and install the recordmydesktop and gtk-recordmydesktop packages. (If you've already installed recordmydesktop, above, then you won't need to install it; just the gtk-recordmydesktop package.)

To run it, go to the Applications->Sound & Video->gtk-recordMyDesktop menu. It will open up a small application, which will show a mini preview of your desktop.

recordMyDesktop.png

If you click the Record button, this window will disappear, and recordmydesktop will start recording in the background. You'll also notice that a small “stop” icon will appear in your Notification Area:

stopicon.png

When you click this icon, recordmydesktop will stop recording, and will generate the .ogg file.

Parameters

If you want to adjust any settings, you can do so using the GUI. For example, in the main window, shown above, you can specify a lower setting for the audio or video quality (for smaller file sizes). Or you can even turn off audio altogether (by unchecking the checkbox).

You can also use the Save As button, to choose the name and location of your output file.

If you want to do anything more complex, you can click the Advanced button, do do any of the following:

File Settings

filesettings.png

There's not much you can do here.

If you click the Overwrite Existing Files checkbox — which is not checked, by default — and choose a file name that already exists (or don't choose a file at all, which means that you're choosing out.ogg), then recordmydesktop will not append .1 or .2 to the end of any file, if it finds an existing one. It will simply overwrite it.

As shown, you can also change the temporary directory that recordmydesktop uses for capturing the desktop, although you probably wouldn't need to modify this setting.

Performance Settings

performancesettings.png

You can use these settings to change the way that video is captured.

  • Frames Per Second: As indicated, indicates how many frames per second should be recorded in the video. The default is 15.
  • Encode On the Fly: If this is enabled, the output .ogg file will be continually written, as the recording is happening, instead of being generated at the end. This will make your recording slower, but might be useful if memory and/or disk space are an issue for you.
  • Zero Compression: This will cause the cached image data to be uncompressed. Not 100% on the effect of this setting, although in the screenshot above, I've changed it to enabled (the default is disabled).
  • Quick Subsampling: From the man page: “Do subsampling of the chroma planes by discarding extra pixels.” If that means something to you, then great.
  • Full shots at every frame: By default, recordmydesktop does not take a full screenshot for every frame; instead, it only captures the area of the screen that has changed. If you find your quality is not high enough, you might consider changing this value to enabled, however, it will slow down the application's performance.

Sound Settings

soundsettings.png

Unfortunately, I don't have enough expertise to explain these settings. If it doesn't mean anything to you, either, then you probably don't want to change anything here.

Miscellaneous Settings

miscsettings.png

Again, I don't understand most of these settings, and the ones that I do understand are self-explanatory.

What To Do With Your Video

Once you've finished capturing your desktop session, what do you have? A file with a .ogg extension. In other words, it's video in the Ogg format, which Linux nerds love because it's an open format. (In other words, you won't have to pay any license fees for using it.)

For more information on Ogg, see the Wikipedia page, or the website for Xiph.org, who maintain the format.

Unfortunately, although the format is open and wonderfully efficient and crystal clear, you might not be able to do much with it. For example, you can't upload .ogg files to YouTube, or edit them in Windows Movie Maker, or edit them in Mac movie editing software.

If you want to use the video anywhere other than on Linux, you probably need to conver the video to another format. You can use a program called VLC to do that.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.