Blog Tags: 

Creating a screencast on Linux with xvidcap: a free open source screencasting tool

Yesterday I wrote about my screencast production adventures. For a screencast demo I was working on I explored all the FLOSS screencasting tools I could find including RecordMyDesktop, and Istanbul. They all suck by varying degrees but xvidcap, though it doesn't look like much, definitely sucked the least.

If the binary package for your distribution crashes and burns try building xvidcap from the sources on Sourceforge (not the same as the *.orig tarball from the Ubuntu package for some reason). That usually produces something usable.

How to use xvidcap

For quick and dirty screencasts xvidcap can capture video and audio at the same time, but if you want to go the extra mile I recommend capturing the video and "narrating" it separately. You'll probably do a better job that way because you'll be able to focus on each step separately. Also, this way you can edit the video and cut out cruft, speed up boring parts, etc.

The quick and dirty method is to just shoot your screencast in one take, audio and all, encode to the proper format and you're done.

The higher quality alternative is to shoot the screencast in separate scenes, edit the best takes, stitch them together and then play back the video while recording in audacity.

If you're narrating separately you'll need sync the audio and video. This is achieved by editing in audacity to line up the sound track (according to the timeline/frames) with the video for key scenes and then stiching the video and audio together (than can be done in Avidemux). Usually what this means is you just delete just enough of the silence between the beginning of the recording and when you started playing the video and speaking into your microphone.

Configuring xvidcap

You can configure xvidcap from the command line or via the GUI (right click on the filename and select preferences). I've found a combination works best. I configure the most common parameters such as resolution in the command line (e.g., with a wrapper script) and the rest in the preferences dialog.

It took me a while to figure out which codecs to use for screen capture. xvidcap supports multiple container formats (e.g., AVI, MP4, FLV) and multiple codecs but I didn't really understand at the time what difference it made.

The obvious solution was to capture in the highest possible quality and worry about optimizing bitrates at a later stage. Unfortunately, I couldn't capture the screen at a high FPS with most of lossless options (PNG, XWD, FFV1). I suspect this may be due to a bottleneck somewhere in my system.

After much experimentation I decided to capture with Flash Video Screen (flashsv) and use ffmpeg to re-encode it into a different lossless codec Avidemux could work with. Flash Video Screen is lossless and I could capture at a high FPS for most things (lower FPS with lots of on screen movement).

A good alternative is to capture with MP4 video. It isn't lossless even at 100% quality but it's very good, and there there are no issues with the capture speed.

Related blog posts:

Add new comment