Revision 23 as of 2007-01-13 23:28:20

Clear message

Screencasting how-to


This is how I make screencasts. They come out fairly well. There are of course other ways to make them, this is just the way that I have found is best. You can see some examples of the screencasts I have made with this procedure at .

All this was done on an Intel Core 2 Duo PC with 2GB of RAM, running Ubuntu Edgy (6.10) or Feisty (7.04). It is of course possible to do this on a lower spec machine but there may be difficulties on very low spec machines.

The basic procedure (which is covered in more detail below) is as follows:-

Dry run

  • Start a virtual machine running the operating system and application which is to be demonstrated
  • Go through the software to be demonstrated

Live recording

  • Start a virtual machine running the operating system and application which is to be demonstrated

{{{ Note: If the demo requires the installation of additional packages then to save time it can be preferable to setup the necessary repositories, download the necessary packages without installing them, then remove the repositories to put the system back to an post-install state. This of course assumes that you want to show how to enable repositories and install software within the screencast. To download packages and not install them use apt-get with the -d option:- apt-get -d packagename1 packagename2 ... }}}

  • Start a recording application to capture the contents of the virtual machine window - with no audio narration recorded
  • Watch the screencast to ensure all is ok
  • Add a 'intro', 'outro' slides to the start and end of the screencast
  • Open an audio recording application and record a narration whilst watching the screencast again
  • Check the audio recording for defects
  • Post-process the audio to clean it up and ensure it's the right duration for the video
  • Combine the audio and video together
  • Check the combined audio/video for errors/glitches/sync problems
  • Encode/compress video to other formats
  • Encode/compress audio to other formats
  • Upload video and audio to hosting provider
  • Upload video to Google

The reason for recording a virtual machine rather than the current desktop is to ensure the screencast is showing what a user would see. Most developers (or even experienced users) have additional software installed (such as the video recording application), have customised their desktop, or are running a version of Ubuntu (such as the current development version) which users might be less likely to use.

It also allows for a "gold" build to be kept in a disk image which can be re-used after a screencast is recorded. This means each screencast starts from the same basic starting point of a fresh (new) installation of Ubuntu. If screencasts are made which assume levels of knowledge or that certain software is already installed then it's possible users will get lost or give up when they see that the screencast doesn't match what they see.


Preparation is the key. Getting the environment setup takes a while, but is worth doing it well because it means the time taken to create each screencast is lower.

Planning a screencast

Subject matter

Pretty much anything is fair game for demonstrating using this method. Some things are tricky, but can be worked around, and these are detailed under "Technical Limitations" below.

It can be beneficial to run through the whole screencast without actually recording it. That way you won't get caught out by screens or options.

Technical Limitations

The following might be issues when recording using the method described here:-

  • Binary video driver installations - QEMU emulates a simple Cirrus Logic or VESA display, so it's not possible to show it running an ATI/NVidia video driver.
    • This could be overcome by using VNC to control a remote machine which does have an ATI/NVidia chipset rather than using a virtual machine.
  • Showing reboots or switching to the console - the QEMU window changes resolution when the video mode changes - which happens when you restart the virtual machine or switch to a virtual console. If you are recording the window and this happens then your video will capture either:-
    • Only a portion of the window - if it has increased in resolution (e.g. during the switch from console to x output in the vm)
    • The console and its window decorations (on the host) - if it has decreased resolution (e.g. during switch from x to virtual console in the vm)
  • Some slow computers will not be able to run an entire host, a virtual machine and the recording software together and will likely end up dropping frames during the recording.
  • Text in a terminal may be difficult to read - especially so when rendered using low bandwidth and highly compressed video. It may be preferable to record console text and scale the video size up using tools such as avidemux. Alternatively for a terminal inside a graphical environment the usual scaling features of the desktop environment might be used - for example in GNOME the text in a terminal can be scaled up with [CTRL]+[+] and [CTRL]+[-].

Tools needed

I have based this how-to around the tools listed below. It is possible to find other drop-in replacements for some of these - for example using vmware instead of QEMU, but this combination worked well for me.

  • One (or more) of (kqemu & QEMU), (kvm & QEMU [if your CPU has VT instructions]), VMWare, Parallels or Xen.

    • This guide suggests using QEMU and optionally kqemu, or kvm (if your CPU support VT)
  • qemu-launcher (optional) if you would rather use a GUI to start qemu than the command line
  • xvidcap (record the session - video only, audio dubbed on later)
  • audacity (record the audio)
  • (for titles)
  • avidemux (for combining video and audio together and re-encoding to some other formats)
  • ffmpeg2theora (convert to ogg/vorbis/theora)
  • oggenc (make an ogg/vorbis version of the audio track)

.. and all their dependents

kqemu & QEMU

Install qemu package from universe repository.

{{{ sudo apt-get install qemu }}}

kqemu is a closed-source kernel based accelerator designed for QEMU. Its author is the main developer behind QEMU itself.

kvm & QEMU

kvm is a kernel based virtual machine. It includes a kernel module and a modified QEMU package. It utilises the VT instructions in modern CPUs to accelerate emulation.

Feisty has kvm in the 2.6.20 kernel.

Other releases need to compile kvm manually from using as a guide.

{{{ Note: From this point on it is assumed that you have either chosen kqemu or kvm or neither and have the necessary kernel module loaded when running QEMU. Alternatively you may use a different virtualisation system such as VMWare, Parallels or Xen, but the use of those tools is documented elsewhere and is beyond the scope of this document. }}}


qemu-launcher is a graphical frontend to QEMU, designed to make it easier to start virtual machines, without having to know the command line options.



{{{ wget sudo dpkg -i xvidcap_1.1.4p1_i386.deb }}}

Should already be installed.


  • Install avidemux package from multiverse repository.

{{{ sudo apt-get install avidemux }}}


  • Install ffmpeg2theora package from universe repository.

{{{ sudo apt-get install ffmpeg2theora }}}


  • Install vorbis-tools from the main repository.

{{{ sudo apt-get install vorbis-tools }}}

Setting up the environment

Download ISO(s) or Obtain CDs

{{{ Note when using an ISO image it can install faster if you put the ISO on a different disk than the hard disk image. It reduces the amount of IO contention. Not essential of course, but can help the install process to proceed quickly }}}

Create a virtual disk

  • qemu-img can be used to create a compressed qcow image of 10GB

{{{ qemu-img create -f qcow dappervm.qcow 10G }}}

"10GB should be enough" - yes, quote me on that in 10 years Smile :)

Boot up and install into VM

Use more memory (-m) if you have it available.

{{{ qemu -hda dappervm.qcow -cdrom dapper.iso -m 256 -boot d -net nic -net user -soundhw all }}}

  • -hda = first hard disk image
  • -cdrom = CDROM ISO image (or use /dev/cdrom or similar to use a physical CDROM media)
  • -m = memory (the more the better, but don't over-allocate and result in the host machine swapping)
  • -boot = c for hard disk, d for CDROM
  • -net nic -net user = setup the virtual machine on a firewalled network which can access the host machines network
  • -soundhw all = switch on support for all emulated sound devices

Follow the usual procedure for installing. When prompted for a user, create a generic username which will be used during the screencasts.

Boot up installed VM

  • Boot qemu

{{{ qemu -hda dappervm.qcow -m 256 -net nic -net user -soundhw all }}}

Add all necessary updates but do not make any further changes, so that this becomes a "golden" image. Backup the image.

Test video recording software

  • Start the vm

The environment variables set below will casue a WAV file to be created which holds all the audio output made by QEMU. This can be mixed later with the narration.

{{{ export QEMU_AUDIO_DRV=wav export QEMU_WAV_PATH=$HOME/capture.wav qemu -hda dapperbase.qcow -m 256 -net nic -net user -soundhw all }}}

  • Start the video recording application.

{{{ xvidcap }}}


  • Set the preferences in xvidcap by right clicking the xvidcap application and choosing preferences from the context menu

attachment:xvidcap2.png attachment:xvidcap3.png

  • Select the window to record by clicking the pipette icon then choose the QEMU window with the crosshair cursor.


  • Start recording in xvidcap using the red record icon. Most of the icons (except stop and pause) will be greyed out.


{{{ Note frame counter should increase and the colour bar in xvidcap shows whether you are hitting your fps target - red is bad, green is good. If you get a few spikes of red it may not be too bad. In the preferences dialog above I set the target at 24fps. You could set the target lower if your PC isn't fast enough to keep up. }}}


  • Pause recording if required

{{{ Note when recording certain activities it may be necessary to pause recording - for example whilst a long download completes - so the user is not forced to watch a lengthy pointless video. In addition you may want to stop recording, move the recorded mpeg out of the way and start a new one. This can be useful if the screen resolution changes in the virtual machine you are recording. The video "scenes" can be resized later to make them all uniform. }}}

  • Stop recording by pressing the stop button. A dialog similar to the one below should appear.


  • Test playback of the resultant video in various players for smooth playback.

Test audio recording software

  • Ensure your microphone is plugged in and the mixer is not muted. Note the microphone options in the mixer dialogs below. Your mixer may look different depending upon hardware and preferences set under Edit->Preferences.


  • Also ensure the mic is not muted under the "Capture" tab.


  • Plug heaphones in to ensure there is no feedback from the speakers to the microphone.
  • Open Audacity. The first time you run it you may see the following dialog. Simply choose a language and click OK.


  • Click the big red "record" button on the toolbar to record your audio track.


  • Once complete, press the "stop" button on the toolbar.


{{{Note: Problems with Audacity are beyond the scope of this page, the Audacity page has more information which can be useful in this regard }}}

Record a screencast


Each screencast will have different requirements. Some might need additional software installing, others will need some additional configuration of the system. Some may need media or data files to be made available to play with during the screencast. All these things will change the base disk image so it is best to do one of the following:-

  • Backup the "gold" disk image before using it, so that you can restore the clean state before recording the next screencast.

or (preferably)

  • Use the QEMU supplied qemu-img to create an image based on the gold disk image. When recording screencasts use the new image which will record only the changes (from the gold image) made to the disk. Any changes made such as software installed will not be recorded into the gold image, but only to the delta image which you can then discard when the screencast is finished. To create a delta image in the current directory where a base image already exists (such as the one created above) use the following command:-

{{{qemu-img create -b dappervm.qcow -f qcow delta.qcow }}}

When using QEMU, reference the delta image with the -hda parameter, not the original gold image.

Recording the Video

Use the same procedure as per the "Test video recording software" above.

{{{ Note: give plenty of time during the recording for explaining the screens you are showing. The explanation will be dubbed on later, so you need to make sure you don't go too fast or you will not be able to squeeze enough audio commentary in. }}}

Recording the Audio

{{{ TO WRITE }}}

  • Within a QEMU virtual machine, open OpenOffice and create or open a header and footer page as separate slides

  • Maximise the presentation of the first (header) slide within the QEMU virtual machine. (run slideshow)
  • Using the method already described for recording the screencast, record approximately 10 seconds of the slide to mpeg video, then stop recording and rename or move the mpeg video.
  • Page down in OpenOffice within the QEMU virtual machine and start recording again for around 5 seconds.

{{{Note: whilst there may be better/faster/more efficient ways to create a static title sequence this method has the advantage that the resulting video will be the same format/size as the main screencast, so will be easier to mix in. }}}

Combining the header, footer, audio and video

Open the video scenes in order.

  • Open avidemux
  • File --> Open

    • Select header created in previous step
  • File --> Append

    • Select mpeg video recorded by xvidcap
  • File --> Append

    • ..continue to append additional scenes in chronological order until once the last has been added
    • Select footer created in previous step

Add the audio track

  • Audio --> Main Track

    • Select "External PCM (Wav)" from the "Audio selector" dialog then click OK


  • Select the WAV file saved from Audacity in the previous step.

Save the master.

  • Using the drop downs on the left of the screen:-
    • Video --> Copy

    • Audio --> FFm MP2

    • Format --> MPEG Video

  • File --> Save As

    • Save the master video

Encoding the video to other formats

Recording the video in xvidcap ensures we can easily convert the content to other formats for playing elsewhere.

Convert to OGG/Theora/Vorbis

{{{ffmpeg2theora recording.mpeg }}}

Encode audio to make an Audio-only version (optional)
  • Convert the wav saved from Audacity to OGG/Vorbis to provide an audio-only version of the screencast (if required)

{{{oggenc audiorecording.wav }}}

Making the video available to others

Upload to Google Video

Upload to

Upload to YouTube