I don’t want to play with fancy UIs or manipulate a capture while demonstrating something; that’s what post-processing is for. However, I do want something that will remove all the work of getting a desktop recorded.
I have a dual-monitor setup; both monitors are set to 1080p, and the left one is a little larger than the right one. This is, therefore, my chosen monitor for recording my demonstrations. I’ve tried a number of programs to record desktop, but each seemed to be limited, mainly to what UI elements allowed.
On the other hand, the command line tool avconv can do everything those other tools can do, and much more, especially when it comes to video settings. Of course, I only need a certain collection of options; I don’t need everything under the sun.
Before I explain further, let’s get the command out of the way, shall we?
avconv -f x11grab -s hd1080 -r 30 -i :0.0+0,0 recording-filename.mov
The avconv command is part of libav, a fork of the FFMPEG software, and is used to convert video and audio from one format to another. However, there’s nothing that says that “one format” can’t be the desktop, and that is what “x11grab” is; the desktop format. Of course, in order to use this, we need to force the program to use it, so that’s the reason for the “-f” switch. To find out what formats are available in your system, type “avconv -formats”.
Theoretically, I can add another -f switch to import Jack audio, thereby recording what I’m saying as well, but I prefer to do audio recording later, once the video recording is complete, so I have room to add commentary and insert visual aids in post, as well as chop up the clip to remove slow elements, and mistakes made in the process of completing the demonstration.
The “-s” switch sets the size of the recording area. Now, I want the entire left monitor to be the recording device; this removes the need to keep windows in a specific space. Since I have a 1080p resolution on the monitor, I use the “hd1080″ size. The available sizes are in the manual page for avconv (“man avconv”), and include “vga” (640×480), “svga” (800×600), “xga” (1024×768), “uxga” (1600×1200), “hd480″ (852×480), “hd720″ (1280×720), and “hd1080″ (1920×1024).
The “-r” switch is the frame rate. Since I intend to produce videos at 30 frames per second, it helps to ensure my recordings are similarly paced. The higher the framerate, the smoother the animation; lower values are fine for simple screen recording demonstrations, but for higher-speed processing, such as “Let’s Play” recordings, you might want to use at least 25 fps.
The “-i” switch tells the avconv program the name of the input file. In this case, however, we give it the DISPLAY name of the X server, which is :0.0, rather than a filename. Because the format was set to “x11grab”, this setting works. The “+0,0″ indicates that the top-left corner should be at the top-left corner.
Finally, we give the software the filename to save to.
One thing I want to mention: if you’re doing a screencast, you may want to make the initial recording in Quicktime format; this seems to be the best, since there are none of the artifacts you get with MPEG and AVI recording, and is much better-compressed than lossless formats like HuffyUV.