When you want to show people how to accomplish something on their computers, nothing works better than video. You can capture all the action on any desktop using any of several open source alternatives. We picked four applications that cover a range of users’ needs. FFmpeg, recordMyDesktop, VLC, and CamStudio, between them, offer GUI and command-line usage, run on Linux and Windows, and provide basic or advanced functionality. The one thing they have in common is that they’re all free and open source software.
FFmpegFFmpeg is one of the most powerful multimedia tools in Linux. It allows you to record, convert, and even stream audio and video. However, it lacks a graphical user interface, so you must run it in a terminal window. To record my on-screen activities, I usually use the following command:
In this command,
-f x11grabtells FFmpeg that you want to capture a part of X11 display – that is, it asks FFmpeg to record your screen.
-s 1280x800tells FFmpeg to capture an area of 1280×800 pixels. Instead of specifying the area in pixels, you can use abbreviations for standard screen resolutions, such as xga (1024×768), wxga (1366×768), or hd1080 (1920×1080).
-r 25tells FFmpeg the frame rate in frames per second (fps). The default value is 25, so technically I could have skipped this parameter. You may wish to have different rate for your screencast; 10 is generally enough for video intended to be streamed on the Web. Remember that a high frame rate means a large file and high resource usage during the recording, which can affect the quality of your screencast. Sometimes people record raw files with high frame rates, then reduce them later during editing.
-i :0.0tells FFmpeg the screen you want to grab; in this example it’s screen 0 on display 0. You can also add an offset to the screen area – for example, -i :0.0+30,40, which tells FFmpeg to make the top left corner of the capturing area be 30 pixels to the left and 40 pixels down from the top left corner of the screen.
-sameqtells FFmpeg to record video with the same quality as the original. In our case this will be lossless quality, because we capture the original source – the screen. This parameter makes sense for raw files, because you can reduce quality later in the editing process if necessary. It is always easier to reduce the quality than to increase it.
| Container and codec |
With screencast software, “container” specifies the kind of data organization in the file. It should not be confused with codec, which specifies the audio or video stream compression. The most commonly used codec for an MP4 container is MPEG-4, but, technically speaking, almost any type of compression could be used in an MP4 container, including lossless. You can read more about MP4 containers and the MPEG-4 codec on Wikipedia.
/tmp/screencast.mp4specifies where I want to place my recording, and which file format (container) to use. Here I put the file into /tmp directory, and use an MP4 container. If you use other type of container, make sure you use the proper combination of quality, file type (container), and codec, because not all of them can live together.
When you run the command, the recording begins. It continues until you stop it by pressing the q key.
After your recording is done, you can edit it using software such as Cinelerra, Kino, or Kdenlive, or convert into a different format using FFmpeg itself. For example, if you want to stream your own video using a player like Flowplayer, you should convert the file into Flash Video format. You can do that with a command like:
ffmpeg -i /tmp/screencast.mp4 /tmp/screencast.flvRemember, however, that each conversion may lead to a loss of quality. That’s why conversion to the final file format should be the last step in your process.
While FFmpeg was developed for Unix-like systems, a Windows version also exists, maintained by Zeranoe, but it’s not easy to use FFmpeg to capture screencasts in Windows. Remember the
-f x11grabparameter that told FFmpeg to capture the X11 screen? There is no X11 system in Windows, so this parameter makes no sense.
To solve the problem, you can install additional components, such as Microsoft Visual C++ Redistributable and a tool called screen capture recorder to video windows free. It’s a set of Java-based applications that run on top of FFmpeg to capture a screencast. If you want a pure open source solution, however, this isn’t it, because Microsoft Visual C++ is proprietary software.
As you can see, recording screencasts with FFmpeg is possible but difficult, because you need to remember and set a lot of parameters for the command. Of course you can simplify your life if you use the same parameters all the time. But FFmpeg doesn’t make it easy to do things like record only one window on the screen, which may appear in different areas.
For many users it’s easier to work with graphical tools like freeseer, recordMyDesktop, or VLC. The latter two are widely available in repositories of many Linux distributions. Freeseer is mostly distributed in source files, which you need to compile yourself, although OpenSuSE users can get the compiled binaries. Let’s have a look at options available in recordMyDesktop and VLC.
RecordMyDesktopRecordMyDesktop consists of a command-line-based core and a GUI front end. Separate front ends are available for GNOME and KDE.
Unlike FFmpeg, recordMyDesktop does not have many features. For example, the only available output file format (container) is .ogv, in which the video stream uses the Theora codec and the audio stream is encoded with Vorbis.
You can run recordMyDesktop via the command line and specify the recording parameters. Quite a few are available, although fewer than in FFmpeg. For example, you can specify the quality for audio and video, the offset and dimensions of recorded area, and the sound device, if any. But if you have FFmpeg available, recordMyDesktop provides no compelling reason to choose it for command-line work. Using a GUI front end, however, makes for a bit better experience. I tested the GTK-based GUI.
The recordMyDesktop GUI allows you to specify the audio and video quality, with an option to switch audio recording off. It also allows you to select the window you want to record; otherwise, whole screen is recorded. Finally, you can specify the output directory for the file. These are the only available options, but they’re enough to record a basic screencast.
Once you started recording, the application disappears from the screen, leaving only a white circle in the notification area of your GNOME panel. Click this circle to stop recording and create the screencast file.
RecordMyDesktop’s strengths are ease of use and ease on resources. You can hardly specify wrong parameters in the GUI. As for resources, the application tracks changes that happen on the screen, not whole screen images, so you can record your screencasts with recordMyDesktop even on low-resource hardware.
If you need more power from screencast software with a graphical interface, consider VLC.
VLCVLC, which stands for VideoLAN Client, compares favorably with FFmpeg as a multimedia tool with many available functions, including screencast recording. To get started, run the program; unlike FFmpeg, it has a complete GUI. Open the menu Media –> Open Capture Device. In the new window, select Desktop as your capture mode and specify frame rate you need.
If you want to capture only part of the screen, you need to specify the parameters you want manually in the More options section. You can also specify whether to capture the mouse pointer, which is not active by default.
When all the options are specified, select Convert from the drop-down list.
The next window allows you to specify the parameters of the recorded file, including filename and codecs.
The default codecs are H.264 for video and AAC for audio, which are standard codecs for MP4 conversion. Although everything seems to be standard, it is a good idea to check the profile details, and set up video and audio codec parameters, such as bitrate and frame rate. I usually use a bitrate of 1200kbps for video recordings, but you can experiment with different values. The high bitrate means a bigger file and better quality. Even though you specify the audio codec details here, a known limitation of the software prevents you from recording audio with VLC. You need to record an audio stream separately and add it to your screencast using video editing software.
Once you’ve entered all the parameters, specified the file name, and configured the codecs, press the Start button to begin recording. To finish it, click the Stop button on the main VLC window.
In addition to recording screencasts, VLC can convert files from one format to another.
Unfortunately, my experience with VLC shows that recording does not always go smoothly. Sometimes it simply does not happen, and the resulting file contains only a green background image instead of the recorded screen.
CamStudioOur fourth screencast recording alternative, CamStudio, has a long and windy history. The latest version is 2.6 beta, released in October 2010.
CamStudio lets you record a screencast, together with voice or music, in an AVI or SWF file. You can use either one of standard built-in codecs, or additionally install an external lossless one. The application supports fewer codecs than VLC or FFmpeg.
CamStudio can record the whole screen or a specific window or screen area, and you can choose whether to capture the mouse pointer. You can set audio and video options via the GUI, though the set of options is not as rich as those in VLC and FFmpeg.
If you record your video in AVI format, but later decide you want to use it as Flash Video, you can convert your AVI video into Flash Video, encapsulated in an SWF file, directly from CamStudio.
In addition to these options, which are available in other screencasting tools, CamStudio has some unique features. For example, it allows you to automatically add annotations, timestamps, and watermarks to your recording. You can put your recording on pause, and automatically stop recording after certain period of time.
When you start recording, the CamStudio window can either stay on the screen, or can be automatically minimized. In minimized view, you can click an icon in the notification area to stop or pause the recording. Once you finish recording, you’re offered a chance to review the results in your default media player.
Comparing the AlternativesFFmpeg, RecordMyDesktop, VLC, and CamStudio all allow you to record screencasts, but they differ in important ways, as you can see from this table.
|Command line interface||+||+||+||-|
|Supported codecs and containers||Many||OGV (Theora, Vorbis)||Many, but fewer than FFmpeg||AVI, SWF, lossless (additional)|
|Records mouse pointer||+||+||Not by default, needs manual activation in parameters of recording||Configurable|
|Records single window||-||+||-||+|
|Records part of the screen||Specify offset and size||Specify offset and size, CLI only||Specify cropping||Directly select the area|
|Conversion||+||-||+||Only from AVI to SWF|
|Windows version||Not suitable for video recordings||-||+||+|
RecordMyDesktop is best for Linux users who prefer a graphical interface, and don’t require extra options during the recording.
VLC is suitable for people who use both Windows and Linux, and want to stick to the same application in both systems. VLC can also be used from command line, which gives users more flexible options.
CamStudio is easy to use, yet produces high-quality screencasts. It’s a moderately flexible and intuitive tool for people who need a simple point-and-click interface, and who are not ready to manually tune the application for results.