This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!


Today's Linux screen capture technology

By Rob Reilly on August 17, 2004 (8:00:00 AM)

Share    Print    Comments   

"I'd like you to help me find out about video screen captures," said one of my editors a while back. "Sure, let me see what's available," I replied. He pointed me to a couple of Web sites to get me started, and here I am a few weeks later ready to share my findings. I'll discuss ways that you can make video clips in Linux, talk about their applications and shortcomings. I'll also cover suitable ways to view your masterpieces once they're recorded.

Video screen captures are useful for jobs like application training, computer instruction, or product demos. An example would be the little one-minute video I set up for my wife. She kept forgetting how to start up Mozilla Mail on her Windows 98 machine. I captured the mouse clicks and screen changes (in real time) as I ran through the process, saving it to a Macromedia Flash file. I then created a little Web page on one of my Apache servers, that described how to start Mozilla Mail and included a link to the Flash file. Instead of asking me how to do it, she can now just click on the video tutorial.

vncrec and vnc2swf

vncrec and vnc2swf are two small programs that run on X11-based Linux machines in conjunction with the popular Virtual Network Computing (VNC) family of remote servers and viewers.

Vncrec produces a native movie file format that can be played back by using the -p option. This setup would work well if you wanted to distribute the video clips along with the vncrec program itself to other Linux users. Vncrec files can also be converted into movie formats like animated GIF, AVI, and MPEG by using such programs as mpeg2enc.

Vnc2swf produces Macromedia Flash formatted movies that can be embedded in a web page. Although the format and player have some licensing restrictions, the players (plug-ins for browsers) are available for a wide variety of platforms, such as Windows, Macs, Linux and Solaris desktops. Here are the links for the file format and player license.

To use the VNC based capturing techniques, you'll need a server machine, perhaps a network connected Windows 98 or Linux desktop, a vncserver program, available from or and a network connected Linux capture machine. The Flash Video Screen Captures With vnc2swf story details the vnc2swf capture process. For example, a vncserver program and the Windows application you want to capture could be started on your Windows machine. A virtual desktop could then be started on the Linux capturing machine, using either vncrec or vnc2swf, where keystrokes/mouse moves are recorded. You could then run through how to use the application, in real time, then simply exit vncrec or vnc2swf to capture your little movie clip.

Capturing how something works on a Linux system is done slightly differently. All that's needed is to start a vncserver program, available in your distribution or from the sources listed above and then the vncrec or vnc2swf program on your Linux capture machine. From there it's simply a matter of running through your process and doing your job. When done, exit the vncxxx program and there's your movie.

There's even a Mac OS version of vncserver.

The VNC-style techniques also work well because you don't need a lot of video or computing horsepower to do your capture. That goes for the server (capturee) and the client (capturer) machines. This is a real plus because some of your clients might need instructional videos created from older machines. Vncrec and vnc2swf give high quality videos with very minimal hardware requirements. Try them and I think you'll like the results.


The other category of video capture program that I found was called xvidcap. It also goes by the name gvidcap, with minor differences in the graphical interface.

Xvidcap is a standalone program that grabs video from your choice of location on the screen. It produces MPEG files that can be viewed using the standard Linux Mplayer program. You can also use Xine if you have the correct video codec installed.

Xvidcap is straightforward to use. Start the program and adjust the red on-screen box to outline your area of capture. Hit the red record button on the menu bar and recording will start. The number of frames captured, frame rate and other settings can be adjusted by left clicking on the file button.

To stop recording, hit the solid square stop button. The MPEG file will be saved in your local directory. Using the default window size, about 150x75 pixels and capturing about 10 seconds worth of video produced a file size of only 28KB. Naturally, you'll probably want to do full screen captures. For that you'll need a decent Pentium 3 or 4 machine with lots of memory. My old 300 MHz, 256 MB laptop was wheezing, but it did work for the above example.

Application Of The Technology

The way you'll use the video is somewhat related to how the video is produced and the file format that is created.

The Flash file created by vncrec and vnc2swf can be dropped right into a Web page and will run on a Flash plug-in equipped browser. Obviously, videos built in Flash would be great for distribution over the Web or from internal servers inside your company. Pay special attention to matching up the window geometry -- making sure the display window is the proper size -- otherwise the image quality in the browser will be poor.

MPEG files, on the other hand, can be viewed via a standalone viewer such as Mplayer. They would be suitable for distribution on a CD, perhaps along with an MPEG player program to view them.


Adding sound to both Flash and MPEG formats seemed to be a challenge; I had very limited success. One of the local Linux super gurus said that he did live audio capture with vnc2swf using named pipes, lame and fifo. He pointed out that it wasn't easy and had a three second delay. When this guy says something in Linux is tricky, it's tricky.

On a better note, I did successfully mate a prerecorded mp3 file to a Flash demo clip using the -soundfile option; it worked without a hitch.

For training videos and demos, an acceptable way to dub in live commentary would be to script the audio on the first pass through your application, using one of the audio recorders available on Linux. Then once the audio has been recorded to an mp3 file, go back through the demo while listening to the mp3 file and at the same time capture the video using vnc2swf. It might take a couple of times to get the hang of it. When you can sync the audio dialog with your mouse movements, use the -soundfile option. Not the best, but it might work for you.

Sound with xvidcap (producing an MPEG file) seemed to be in roughly the same shape as vnc2swf. My editor worked away on trying to get sound capture to work while recording a video with one of his guru friends, and after a week was pretty frustrated. Apparently capturing screen video with xvidcap wasn't too bad, but doing the additional processing of on-the-fly audio required more juice than his Celeron Linux system could put out, even with a gigabyte of RAM. Perhaps it's possible to do post-processing of audio, like what I described for vnc2swf, using some type of an editor that works with MPEG.

Wrap Up

Overall my exploration into the world of video screen capturing under Linux tells me that the video side is fairly mature and that the audio side has a ways to go. If you keep the clips to one or two minutes in length, then demos and tutorials will be productive and useful even without dialog.

Here are a few additional sites that would be helpful:

Dan Washko's video capture page
Flash video screen captures with vnc2swf
SWF Tools home page

Rob Reilly (aka: Dr. Torque) is a professional technology writer and consultant whose articles appear in various Linux media outlets. He offers professional writing and seminar services on Linux desktop applications, portable computing and presentation technology. He's always interested in covering cool Linux stories. Send him a note or visit his Web site at

Share    Print    Comments   


on Today's Linux screen capture technology

Note: Comments are owned by the poster. We are not responsible for their content.

Adding sound for movie files

Posted by: Anonymous Coward on August 18, 2004 02:26 AM
It should be easy to add sound after the fact to movie files. All you should have to do is record the sessions and then play it while you are recording the sound/documentary for it. At that point you will have a separate video and audio files. You can use the transcode package to merge them together. Then you are done.



Posted by: Anonymous Coward on August 18, 2004 02:30 AM
>Naturally, you'll probably want to do full screen captures.
>For that you'll need a decent Pentium 3 or 4 machine with lots of memory

I remember Adobe and Lotus doing full screen captures (for Help/Demo purposes of their products) on 486s. Quality/features was the same as xvidcap's. So, why does Linux need a PIII (or anything above 500 Mhz for that matter), when Windows could do it for so much less, in 1994 already?



Posted by: Anonymous Coward on August 18, 2004 02:51 AM
I have a feeling I've just been trolled, but I'll give you the benefit of the doubt.

He's not talking about 'screen captures', he's talking about 'video screen captures'. That is, capturing a video source (in real-time). To do that in 1994 on Windows (or any other OS), required some *SERIOUSLY* expensive custom hardware.

A screen capture is easy. Capturing a video source is *much* more processor/RAM intensive. Especially if you're simultaniously compressing said video source into a modern video format.



Posted by: Anonymous Coward on August 18, 2004 07:02 AM
YES, I also talk about VIDEO screen capture. Lotus (or was it Adobe?) had the ability to do this on Win95, with machines of the time (using their own format)! They used this kind of technique in order to demo their products, and also to tutorial their users. I know, I have seen these videos (some of them appeared on demo magazine CDs of the time).

They were captured in realtime, in Pentiums or fast 486s or above. And the utility that was doing the capture was actually available for purchase. I just can't remember if that was Adobe or Lotus back then who had that util.

And no, I am NOT trolling. I mean every word I say. I don't see why today it has to be mpeg, or it needs to be a fast P3 to encode it. You can always have your own format, create an executable on the fly (including the playback runtime engine on the file), and voila, it should work on P100 already.



Posted by: Tak_tak on August 18, 2004 11:13 PM
The difference may be in capturing and encoding 1920x1200x32-bit color compared to 640x480x8-bit. Also, things like framerate and compression matter. If you're just dumping 10 uncompressed frames per second to disk, that doesn't take much cpu. If you're encoding 29.97 frames per second to mpeg4 video at 800kbit/s, that's quite a bit different.



Posted by: Anonymous Coward on August 27, 2004 11:18 PM
Yup, plus:
- X11 is so unoptimized in ways
- Lotus Screencan did have its own proprietary

    codec which was esp. tailored to making screencam

    videos. MPEG4 is not really an especially good

    choice for doing that, but it's generally

    available for people to view.


Sound Soon

Posted by: Anonymous Coward on August 18, 2004 05:37 AM
Hopefully, when multichannel audio support is added to the X server protocol (probably via MAS), sound even can be captured much easier with a VNC which supports it.


Recording audio - for MPEG's and making a DVD

Posted by: Anonymous Coward on August 18, 2004 05:05 PM

It depends what audio you want to capture (i.e. via a microphone for voice over or what the PC's actually playing) but anything that dumps the audio as a raw wav file will do. Then use toolame to convert to it to layer 2 audio (mp2 not mp3 -
see <A HREF="" title=""></a> )

Then use mplex to mix the streams together - you can adjust latency / sync

mplex -f 8 -O 500 test1.mp2 -o test.vob

And you have an mpeg2 movie which Xine/mplayer/your favourite mpeg player will play.

If you want to turn this into a DVD:

Build your TOC using dvddirgen and dvdauthor

Then use mkisofs to produce a<nobr> <wbr></nobr>.udf and cut to DVD<nobr> <wbr></nobr>...


Xvicap and sound

Posted by: Anonymous Coward on August 19, 2004 08:16 PM
I have had no problems using xvidcap's sound recording features to capture sound from a mic while creating mpegs. I have a P3 450 with a soundblaster live which is a pretty humble machine. Just make sure that any sound servers you have running are in realtime mode and that your soundcard is capable of and set to full duplex. The last two stipulations I mentioned are typical of apps such as krec and gnome-meeting. From the article I'm guessing that the sound cards used weren't capable of or set to full duplex.


audio capturing is just fine

Posted by: Anonymous Coward on September 06, 2004 02:01 AM

Overall my exploration into the world of video screen capturing under Linux tells me that the video side is fairly mature and that the audio side has a ways to go.

i'd like to disagree with that statement, as it implies that any audio capturing is immature.
this is definetly not so. tools like audacity work just fine even on this 3 years old notebook using an older version of audacity from debian woody.

you are having problems doing both at the same time, which is a different issue.


Record Video and Sound with Microphone

Posted by: Anonymous [ip:] on November 16, 2007 12:37 AM
Great article! Pointed me in the right direction. I'd like to test the possibility of easily recording the sound and video at the same time by using a microphone and putting it next to the computer's speakers. Theoretically this should work.


Today's Linux screen capture technology

Posted by: Anonymous [ip:] on February 16, 2008 05:37 PM
"wink" is freely available and works nicely.


Re: Today's Linux screen capture technology

Posted by: Anonymous [ip:] on February 20, 2008 08:59 AM
wink is really bad


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya