Screencasts in Ubuntu, part 1: recordmydesktop

[ Thursday, 29 May 2008, Marcin Seredyński ]


It is said that a picture is worth a thousand words, but no one has ever thought about how much an animation could be worth :) If you really want to examine it yourself, you can try to work with screencasts. Recording them in Ubuntu is really simple. However, making a technically advanced screencast can be quite demanding.

By: Marcin Seredyński

Personally for recording purposes I use recordmydesktop, which is very comfortable in use, performs well and has a graphical frontend which makes the configuration process a breeze. To install it with the graphical frontend, just type:

sudo apt-get install recordmydesktop gtk-recordmydesktop

gtk-recordMyDesktop should appear in the Sound & Video menu after the installation. In the main window of the program we can change the image and sound quality and also, we have access to advanced configurations.

gtk-recordMyDesktop

By default, the program will record the content of the whole screen (or of all the screens), but there is a possibility of recording only a selected fragment of the screen. There are two ways to choose this area: by clicking on the window we want to record (Select Window and after that we select the window), and by choosing the area with our mouse pointer on the preview. More precisely, you need to press the right mouse button while the pointer is on the icon in the notification area, next click Select Area On Screen to select the area directly on the screen. When you are ready to record, click Record, or click on the program icon in the notification area.

By default, the program works in two modes (phases):
- in the first one it records uncompressed frames which are simple screenshots, and saves them in the work folder
- in the second one it encodes and compresses the frames of the animation into the ogg/theora-vorbis format

recordMyDesktop-encoder

The split of this process into two modes guarantees the best use of computer memory during the recording. As a result, the recording will be less corrupted and will have less verves caused by omitted frames, compared to a situation when the operating system would “simply”compress the file during the recording (Encode On The Fly). The default settings have their pros and cons obviously, the highest quality of recording is an advantage, but the high memory use of this process is vice (it is all about the recording of the uncompressed frames on the hard drive). The “smoothness” of the screencast is mostly influenced by the first phase of the recording, and its “quality” by the second.

The program has a possibility of recording sound additionally to the presentation with the use of ALSA or OSS. In order to record sound, we have to be sure that the box near the sound quality bar in the main window of gtk-recordMyDesktop is checked. The advanced options of sound recording are available in the Sound bookmark of the advanced configuration window.

Of course, all of the frontend possibilities are accessible from the command line – recordmydesktop. The frontend however offers an easy way to choose the area of the recording (we choose a window or automatically record the whole screen). If we really want to use the command line, the xwininfo command will give us the work area identification and parameters. The addition of the windows frame to the recording needs can be added by using -frame option. Then after writing this command we chose the window we want to record.

Hints and tips, or how you can compile it:

- The best localisation for the work folder is a partition on a fast drive.
-If we don’t want to show our extra desktop effects, it’s better to turn them off for the recording. This will permit the optimization of recordmydesktop by switching on the Full shots at every frame option. [1]
- The reduction of the quantity of recorded frames per second (Frames Per Second) decreases the risk of omitting one of them. Normally, for screencast, 15 frames per second are sufficient. [2]
- The Encode On The Fly option can be helpful only in case of a slow or small hard drive and a fast CPU. In this situation, the recommended settings are 100% for image and sound, because of the higher compression (lower quality in the end) on the CPU.
-Turning on the option Zero Compression will increase the CPU charge during the recording, but it will reduce the necessary disk space for work files. You can see if you can do this on your PC only by testing.
-The decrease of the quantity of bites per pixel from 24 to 16 will decrease the quantity of data by 1/3, but it will strongly diminish the color quality.
-If you define a place and size of the recorded area, you will permit a decrease of the data necessary to be processed, so you increase the smoothness of the recording. Attention: a once defined area won’t “move” with the window, unless …
-“The golden mean” can be a choice of a recorded area with an simultaneous choice of the Follow Mouse option. When this option is checked, the recorded area will follow the cursor. The cursor will always be in the center of this area.
- To see more clearly which area is recorded at the given time, it is good to turn on the Outline Capture Area On Screen option.
-The use of the Quick Subsampling option will strongly increase the speed of the program, but the losses of quality will be very distinct on screens containing clear and sharp signs, ex. in the terminal or in text editors.
- To reduce the loss of quality during the transcoding of the recording for example through YouTube, it is the best to record a window of the same size as the media-player size (for YouTube it is 320×240 pixels)
- In general, I recommend to record at 100% quality, so afterwards you dispose the best material possible for further processing.
-To record the content of open windows drawed by glx (ex. games, screensavers or windows drawn by compiz) it is necessary to check the Full shots at every frame option.

When you start the program from the command line, you will have access to more precise information about the recording itself:

ms@topaz:~$ recordmydesktop -width 800 -height 600 -fps 60 \\
-o screencast.ogg
Initial recording window is set to:
X:0   Y:0    Width:800    Height:600
Adjusted recording window is set to:
X:0   Y:0    Width:800    Height:608
Your window manager appears to be compiz

Detected 3d compositing window manager.
Reverting to full screen capture at every frame.
To disable this check run with --no-wm-check
(though that is not advised, since it will probably produce faulty results).

Initializing...
Buffer size adjusted to 4096 from 4096 frames.
Opened PCM device hw:0,0
Recording on device hw:0,0 is set to:
1 channels at 22050Hz
Capturing!
Saved 417 frames in a total of 420 requests
Shutting down.....
Encoding started!
This may take several minutes.
Pressing Ctrl-C will cancel the procedure (resuming will not
be possible, but any portion of the video, which is already
encoded won't be deleted).
Please wait...
[98%]
Encoding finished!
Wait a moment please...

Done.
Written 12482454 bytes
(12413303 of which were video data and 69151 audio data)

Cleanning up cache...
Done!!!
Goodbye!
  1. If you use compiz or another program “of this type”, recordmydesktop does not have the possibility to “guess”, wheter the screen should take changes, for example while moving windows, or while moving their inside content. Technically speaking,the windows are drawn only in glx and they don’t generate Damage events (informations about the drawn area of the screen). In this case, the program takes screenshots of the whole screen, which means quite a lot of data to process. For example, one frame of a 1280×1024 resolution with a 24-bit depth of colour needs 3,75 mb of disk space. To record with this resolution with a speed of 20 frames per second we need a hard disk capable of writing data with a speed of 75 mb/s. With a 16-bit depth, the requirements drop to 50MB/s. When the system will not be able to do so, it will omit some of the frames. RAID-0 can help us, but this can be risky ;)
  2. With at least 15 frames per second (Hz), the human eye isn’t disrupted by the smoothness of the animation. We can compare: cinema 24 Hz, PAL television (Europe) = 25 Hz + interlace, NTSC television (North America) = 29.97 + interlace, computer games = normally 60-75 Hz or more. You can learn what is interlace from wikipedia.

Some very detailed documentation is available.

As always, feel free to comment my article, because your opinios are necessary, so I can include these remarks in upcoming part/s. Sooner or later, I’m planing to write something about ffmpeg and the possibilities of transcoding that it offers.

Original article in Polish: Screencasty w Ubuntu, cz. 1. The contents of the original article and this translation is licensed under CC BY-SA 3.0.

Subscribe to RSS feed for this article!

14 Comments

fold this thread Nelson  Thursday, 29 May 2008 o godz. 6:56 pm #  Add karma Subtract karma  error

I had a lot of fun trying to get recordmydesktop to pipe out to a video device so I could put it over skype as a regular webcam. I finally gave up.

(Comments wont nest below this level)
 
fold this thread Brisbane Internet Consultant  Sunday, 10 August 2008 o godz. 1:10 am #  Add karma Subtract karma  +0

I was looking for a Linux replacement for Camtasia. I guess my search is over :) Thanks for the information. I’ll give it a go.

(Comments wont nest below this level)
 
fold this thread Australian Web Directory  Friday, 15 August 2008 o godz. 8:20 am #  Add karma Subtract karma  +0

Camtasia is pretty powerful. I’ll see how recordmydesktop compares. You can’t beat the price :)

(Comments wont nest below this level)
 
fold this thread Marc  Friday, 18 September 2009 o godz. 10:49 pm #  Add karma Subtract karma  +1

Ha, it did the same thing to you – you got an 800 x 608 (added 8 pixels) video when you specified 800 x 600. Any idea why it does this? I have tried specifying 800 x 592, but when I did that, it gave me an 800 x 592 video output! :-D

You can crop in Avidemux, but it’s still a pain.

Thanks for the article.

(Comments wont nest below this level)
 
fold this thread Marc  Saturday, 19 September 2009 o godz. 12:16 am #  Add karma Subtract karma  +0

Ah, I figured it out – 608 is divisible by 32; must be a stipulation of the OGG format or something.

(Comments wont nest below this level)
 
fold this thread watch movies online  Friday, 19 November 2010 o godz. 8:26 am #  Add karma Subtract karma  +0

Sup! Fascinating posting! I am just a usual visitor (much more like addict :P ) of this website however I had a concern. I am definitely not absoluterly certain whether it is the right place to ask, but you have no spam comments. I recieve comments similar to WnEozewatch movies onlinewWOrTMU day after day. Possibly can you help me? Many thanks.

(Comments wont nest below this level)
 
fold this thread Telmi  Wednesday, 30 March 2011 o godz. 7:59 pm #  Add karma Subtract karma  +0

gtk-recordMyDesktop (records video + audio) and gnome-sound-recorder (records audio) can record both the system and the microphone sound. To choose the sound to be recorded open gnome-volume-control (from ALT+F2 for example), click on Hardware, then on Profile and there choose the corresponding option, depending on what will be recorded ..:
+ sound of the system: a) Analog Stereo Output; or b) Digital Stereo Duplex (IEC958)
+ sound from the microphone: a) Analog Stereo Duplex; or b) Digital Stereo (IEC958) Output + Analog Stereo Input

In gnome-volume-control, it may be necessary to choose “Off”, close it, open it again, choose the desired option and close it again.

Some of the other options may work sometimes, but they may record sometimes the system sound and sometimes the mic sound. And other options may record audio but could not permit to listen to the recorded sound. So it’s better not to use those options.

NB: system sound is the sound of what one can hear from the speaker. It can be a .ogg or .mp3, … song played by Totem, or a Flash music video of a web site, …

But gtk-recordMyDesktop has 2 problems:
a) When you click on stop it takes a lot of time to encode the video (in xvidcap you have it in the moment you stop the recording).
b) It uses a lot of space in a folder called more or less /tmp/rMD-session-xxxx. Sometimes is deleted after the encoding but sometimes not (keeps on growing) and you have to delete it before your Linux root partition (/) gets full.

To be able to record the sound with xvidcap (from the mic or of the system) you just need to follow a few steps to install it properly:
http://ubuntuforums.org/showthread.php?t=1714139

(Comments wont nest below this level)
 
fold this thread Tampa Fishing Guide  Thursday, 9 January 2014 o godz. 2:38 pm #  Add karma Subtract karma  +0

Do you have a spam issue on this website; I also am
a blogger, and I was wondering your situation; we have created some nice methods and we are looking to trade solutions with other
folks, why not shoot me an email if interested.

(Comments wont nest below this level)
 
fold this thread duct tape craft ideas for kids  Tuesday, 14 January 2014 o godz. 12:21 pm #  Add karma Subtract karma  +0

I know this site provides quality dependent articles and other information, is there any other site which gives these information in quality?

(Comments wont nest below this level)
 
fold this thread fat burning Food ratio  Friday, 7 March 2014 o godz. 7:45 am #  Add karma Subtract karma  +0

To lose belly fat You should eat smaller amount
of calories, a reduced amount of fat, a lesser amount of carbohydrates
like bread, corn, rice, pasta, sweets, cake and sugary drinks.
Taking oatmeal in the morning is a great idea as it can keep you
feeling full for longer periods of time, so that you will not feel like snacking between breakfast and lunch.
s have to take in a huge amount of calories in order to gain weight.

(Comments wont nest below this level)
 
fold this thread make windows 7 genuine torrent  Friday, 28 March 2014 o godz. 3:25 pm #  Add karma Subtract karma  +0

Hey there! Do you know if they make any plugins to help
with Search Engine Optimization? I’m trying to get my blog to rank
for some targeted keywords but I’m not seeing very good results.
If you know of any please share. Thank you!

(Comments wont nest below this level)
 
fold this thread Fountainhead For Sale  Monday, 14 July 2014 o godz. 10:23 am #  Add karma Subtract karma  +0

It is perfect time to make a few plans for the longer term and
it is time to be happy. I’ve learn this post and if
I may just I wish to suggest you few fascinating issues or tips.
Perhaps you could write next articles referring to this article.
I want to learn more issues about it!

(Comments wont nest below this level)
 
fold this thread Palm Beach Shores Realtors  Friday, 18 July 2014 o godz. 2:37 am #  Add karma Subtract karma  +0

Simply want to say your article is as astonishing. The clearness in your post is simply nice and
i could assume you are an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep up to date with
forthcoming post. Thanks a million and please keep up the rewarding work.

(Comments wont nest below this level)
 
fold this thread domain  Tuesday, 16 September 2014 o godz. 10:24 am #  Add karma Subtract karma  +0

Thanks for any other fantastic post. The place else could anyone get that kind
of info in such an ideal manner of writing? I have
a presentation next week, and I’m at the search for such information.

(Comments wont nest below this level)
 
Name (required)
E-mail (required - never shown publicly)
URI

Adjust field size: shrink | enlarge)


You can use simple HTML in your comments. Some examples are as follows:
  • A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
  • Strong text: <strong>Strong text</strong>,
  • Italic text: <em>italic text</em>,
  • Strike: <strike>strike</strike>,
  • Code: <code>printf("hello world");</code>,
  • Block quote: <blockquote>Block quote</blockquote>

About the Author

Marcin Seredyński

I consider myself a nerd. I use Vista for my day-to-day job, but it's not that exciting as hacking open source systems in the nights. I'm a fan of free software movement and an avid user of Ubuntu. I' (more...)

New AdTaily ads!

Are you a film buff?

film buffs community, movie recommendations and reviews

RSS: Comments

You can follow the comments to this article through a special channel RSS 2.0 .

Related articles: Ubuntu

 more »

PolishLinux Top Content


Become our fan on Facebook!

PolishLinux.org on Facebook

Follow PolishLinux on Twitter!

Follow polishlinux on Twitter

Google Ads