recordmydesktop

recordmydesktop is a great command-line tool for recording your desktop for screencasts. It has a simple command-line interface. There’s also a GUI (gtk-recordmydesktop) available.

Basic usage example:

recordmydesktop -o my_presentation

When you’re done recording, you can type CTRL+c at the command line. This will stop recording and begin processing the video.

This will record a file named my_presentation.ogv. If you use the same name multiple times, it’ll add numbers to the end, so it won’t overwrite the file.

Some useful options:

recordmydesktop --windowid 73400327 -o my_presentation

The --windowid option allows you to record a single window. This is much better than trying to figure out the positions of the pixels of a window (which is possible). The window ID can be acquired using xdotool.

xdotool search --name firefox

This may return multiple results. Usually, the last one is the one you want, but definitely experiment before making a video that’s important or hard to replicate.

Record without sound:

recordmydesktop --no-sound -o my_presentation

When you finish recording, the video will be processed. This can take a while. If you have the processing power, you can ask recordmydesktop to render during recording.

recordmydesktop --on-the-fly-encoding -o my_presentation

If you are trying to record audio but it isn’t working, then you may need to specify your audio device. Use pacmd to list sound cards:

pacmd list-sources

Then you can specify it in the command:

recordmydesktop  -o /tmp/screencast --device=hw:2,0

If you have trouble figuring it out, you can just try the above command, replacing 2 with any small number. Start with 0 and work your way up and hopefully it’ll be easy to find.

You can also select the FPS:

recordmydesktop  --fps=5 -o /tmp/screencast 

If you’re recording a screencast where there isn’t a lot going on, you can make this number very small and the result with be a much smaller file. However, if you’re recording anything that may contain video or a video game, you’ll probably want to use a much higher number, like 60.

I hope this is helpful. Enjoy!