|
|
Subscribe / Log in / New account

Linux screen recording

By Jake Edge
February 1, 2012

Turning an on-screen session into a video is a widely used technique for a number of different uses, but one of its main use-cases is for education. One can find any number of "screencasts" on YouTube or elsewhere that show how to do particular tasks using various tools like Gimp or Blender. Depending on the task, it's generally much easier to show people how to do something rather than to try to explain in words the steps required. There are a few different Linux tools available for doing screen recording.

Perhaps the best-known choice is recordMyDesktop, which is actually a command-line tool that provides a means to turn a region of the desktop into a video—in Ogg-Theora-Vorbis format. As the man page describes, there are lots of different options that can be used to control the area that will be recorded, the video format and frame rate, sound options, and so on. But, since screen recording is an inherently visual task, there are both GTK and Qt front-ends available.

[recordMyDesktop window]

Both of the front-ends are written in Python using either pyGtk or pyQt4, and both, not surprisingly, provide a GUI interface to the recordMyDesktop command line. As one might guess, the front-ends pretty much look and act the same (the Qt version is seen at right). In the simplest case, one simply indicates the region of interest on the preview pane. Once the region is selected, hitting the "Record" button starts the video capture. Amusingly, because the preview pane shows the entire window, including the qt-recordMyDesktop window itself, one gets an "infinite" regression in the pane.

One can also choose a particular window, rather than a region, by using the "Select Window" option. But, in either case, it is really the rectangular region of the visible screen that is being recorded. If another window is moved into the region, or a different virtual desktop is chosen, that's what goes into the video. Depending on the use, that may be exactly what is called for, but, for other uses, like recording an online lecture or webcast, it may require extra care. Popping up an email client or web browser to quickly check something may result in unwanted video artifacts.

Audio can also be recorded, either from the audio that accompanies the content or from a local microphone. For the specific recording I was doing (a Go class lecture on the KGS Go Server), it required switching the sound source in recordMyDesktop from "DEFAULT" to "pulse" and using pavucontrol to change the recording source for the application to the "Monitor" of my sound card. It was a little non-obvious, at least to me, but there were multiple solutions that Google led me to, including this.

[recordMyDesktop Advanced window]

The "Advanced" settings allow changing things like the sound source mentioned above, but also frame rate, on-the-fly encoding, mouse cursor settings, and more. As with video in general, files can get fairly large for a 90-minute class, so reducing the size of the recording area and the frame rate will produce smaller video while still capturing the information needed. A 2 frames per second (fps) setting, for example, may be fine for showing human-initiated screen changes and can make a big reduction in size from the default 30fps.

The recording is stopped from a panel applet (or a signal to the recordMyDesktop process), which will then start the encoding process (unless on-the-fly encoding is chosen). The end result is a out.ogv file that can be played in Totem, Dragon Player, or other video players. Sadly, sharing Ogg format video with much of the rest of the world is difficult, so transcoding to WebM (maybe) or H.264 is probably required. Transmageddon or Arista (for those not running the GStreamer bleeding edge) fit the transcoding bill nicely.

Another option for recording is Istanbul, which has a minimal "GUI" via the menu from its panel applet. It lacks many of the advanced features of recordMyDesktop, including the ability to directly record audio. One can use a separate audio recorder and try to synchronize the audio and video (as the Fedora wiki suggests), but that may prove somewhat painful. Another option is Byzanz, which is a command-line-only tool that also lacks audio support (and, seemingly, a home page).

From discussions with other students who use OS X or Windows, the choices there are more varied, but generally not free (in either sense of the term). I found recordMyDesktop to be more than adequate for the task at hand, and it would seem that lots of others are using it as well. If audio is not required (or can be recorded separately, perhaps by narrating while watching the video for example), Istanbul or Byzanz may suit as well. Foolishly, I set out on this task thinking that Linux options might be difficult to find or use—video applications for Linux have had that reputation in the past—but was happily surprised to find that it wasn't the case.



to post comments

Linux screen recording

Posted Feb 2, 2012 4:20 UTC (Thu) by pr1268 (guest, #24648) [Link] (2 responses)

Thanks for the write-up; I wasn't aware (prior to reading your article) that free (both meanings) software existed for capturing screen video in Linux.

Curiously, the latest version (0.3.8.1) is over three years old (Dec. 13, 2008). I'm wondering if (hoping that) this software is still actively maintained.

I've noted some issues when running this program via the Qt4 front-end: (1) the "Advanced" button does absolutely nothing, and (2) the resultant Ogg video file plays back at the wrong speed (but maybe that's an MPlayer config option I've got to fiddle with). Thanks again for the article!

Linux screen recording

Posted Feb 3, 2012 3:38 UTC (Fri) by mhelsley (guest, #11324) [Link]

I've had problems with mplayer and ogg format video -- black squares showed up in a semi-random checkerboard pattern. A different movie player seemed to avoid that problem.

Linux screen recording

Posted Feb 10, 2012 13:56 UTC (Fri) by jospoortvliet (guest, #33164) [Link]

Not unprecedented. In my experience, recordmydesktop usually 'just works'. However, when it doesn't, it's incredibly hard to find out what's wrong and fix it...

They did not work for me

Posted Feb 2, 2012 7:58 UTC (Thu) by jmalcolm (subscriber, #8876) [Link] (1 responses)

Sadly, I failed at my first attempt to get usable video out of recordMyDesktop and friends just last month. No amount of Googling turned up a way to get the audio to work. I did try the link you cite as well as a number of tricks with 'pavucontrol'.

I ended up buying a copy of iShowU to run on a Mac laptop. It was a real shame.

They did not work for me

Posted Feb 2, 2012 17:49 UTC (Thu) by dowdle (subscriber, #659) [Link]

recordMyDesktop works great for me. I use Fedora. I've even had recordMyDesktop work inside of a KVM VM.... yes with sound.

There have been times when I've had to run the graphical PulseAudio Volume Control app to tweek the devices in use. On some computers there is a back mic port and a front mic port... and if it isn't set to the one you are using, it ain't going to work.

There does exist some hardware where the mic doesn't work. I haven't run into any for a while now but I think some are still out there.

Regarding whoever said the "Advanced" button doesn't do anything for them, it works fine for me. It opens up a multi-tabbed dialogue box. I haven't altered any settings in there for a while so I haven't verified if changing something works or not but the last time I tried it, it did.

Linux screen recording

Posted Feb 2, 2012 8:31 UTC (Thu) by Frej (guest, #4165) [Link] (2 responses)

Gnome-shell should record video with just: Control+Shift+Alt+R

Linux screen recording

Posted Feb 3, 2012 1:36 UTC (Fri) by Velmont (guest, #46433) [Link] (1 responses)

Only don't press that on your double HD screen setup. That's 3840x1080 pixels, and it killed my machine. Total crash. :-)

Linux screen recording

Posted Feb 6, 2012 21:14 UTC (Mon) by bronson (subscriber, #4806) [Link]

You use that with Gnome Shell?? What video card?

For me, a similar configuration on a 3 year old Radeon is near unusable.

Linux screen recording

Posted Feb 2, 2012 15:33 UTC (Thu) by marduk (subscriber, #3831) [Link] (1 responses)

I still use a home-brewed ffmpeg-based script. Every time I try one of the others there's always something buggy, missing, or just not good.

Linux screen recording

Posted Feb 9, 2012 9:53 UTC (Thu) by pclouds (guest, #76590) [Link]

Can you share the script?

Linux screen recording

Posted Feb 3, 2012 12:20 UTC (Fri) by angdraug (subscriber, #7487) [Link] (8 responses)

A much more difficult problem for which I haven't yet found any (even non-free) solution is real-time sharing of a Linux desktop. Scenario: I need to run an interactive knowledge transfer session where I receive answers from the audience and I show them how to do things they're asking me about. The only free (as in beer) tool I found that even claims this capability is Skype, and being proprietary PoS that it is it Just Doesn't Work (tm).

Linux screen recording

Posted Feb 3, 2012 12:52 UTC (Fri) by khim (subscriber, #9252) [Link] (4 responses)

Actually Skype is not the one tool with this [claimed] capability. Google+ Hangout also offers this capability - although it can not actually "share" the desktop, it can only show it.

Linux screen recording

Posted Feb 3, 2012 13:34 UTC (Fri) by angdraug (subscriber, #7487) [Link] (1 responses)

You're right, I forgot about G+ Hangout. I summarily removed it from my list of suitable options, because it requires a browser plugin, and non-free at that: Skype is the last bit of proprietary crap I have on my laptop, I look forward to the moment I can afford to ditch it, too. When Hangout works with just HTML5, or when there's a fully-functional free plugin for pidgin or somesuch, I'll give it another try.

Linux screen recording

Posted Feb 3, 2012 15:02 UTC (Fri) by khim (subscriber, #9252) [Link]

Well, I'm not sure if Hangout will work with just HTML5 any time soon (HTML5 just recently added a webcam support and it's not yet all that stable across browsers) but the very feature you request will probably always require some kind of plugin: it's just too scary to imagine that you can accidentally give some random website an access to your desktop to spy on you.

Linux screen recording

Posted Feb 10, 2012 13:58 UTC (Fri) by jospoortvliet (guest, #33164) [Link] (1 responses)

I believe KDenlive also has the ability to record screen video but I'm unsure if it's just based on RecordMyDesktop or not...

Linux screen recording

Posted Feb 15, 2012 8:59 UTC (Wed) by anselm (subscriber, #2796) [Link]

When I start KDEnlive it complains that I don't have RecordMyDesktop installed. To me this suggests that its screen-recording facility is based on RecordMyDesktop.

Linux screen recording

Posted Feb 3, 2012 15:46 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

Try TeamViewer.

It's free for non-commercial use and works fine in Linux.

Linux screen recording

Posted Feb 3, 2012 19:58 UTC (Fri) by Klavs (guest, #10563) [Link]

wouldn't vnc fit the bill for that? (it can allow to connect in "view-only" mode as well.

Linux screen recording

Posted Feb 4, 2012 5:05 UTC (Sat) by mathstuf (subscriber, #69389) [Link]

If you're fine with sitting in a terminal, you can set up a tmux session, change the group permissions on the socket for read-only, make a user that triggers attaching to the session read-only on login and you can do a coding demo or something right there. It would require a decent terminal on the client side, but xterm is pretty ubiquitous these days.

Linux screen recording

Posted Feb 4, 2012 1:39 UTC (Sat) by mgedmin (subscriber, #34497) [Link]

There's also Kazam. It has a very nice simple UI and requires less CPU power than RecordMyDesktop, IIRC. It lacked some features (e.g. recording just an area of the screen) back when I last tried it, but was very promising.

Xvidcap

Posted Feb 4, 2012 18:08 UTC (Sat) by pflugstad (subscriber, #224) [Link]

Heh - this article was about two weeks to late for me.

After 5 minutes of google searching, I installed and successfully used Xvidcap (http://xvidcap.sourceforge.net/) to capture a MPG4 video of a window on my screen (under Xubuntu 11.10). Even though the last release was 2006, it's in Debian, so it installed with just an apt-get. The options window was a bit flaky, but it worked just fine and was trivial to use.

Linux screen recording - Istanbul does support audio recording

Posted Feb 9, 2012 23:23 UTC (Thu) by oaubert (guest, #65557) [Link]

The article claims that Istanbul lacks the ability to record audio. This is untrue: I use it regularly, and audio is successfully recorded along the video. Looking at the git history, sound support has been added on 2006-07-01, so it definitely should be present in available versions, regardless of the distribution.

Linux screen recording

Posted Mar 9, 2013 20:00 UTC (Sat) by resplin (guest, #89785) [Link]

Freeseer is another good option.

http://freeseer.github.com/


Copyright © 2012, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds