RecordingScreencasts

Differences between revisions 2 and 3
Revision 2 as of 2007-01-08 14:11:32
Size: 11278
Editor: 84-45-197-14
Comment:
Revision 3 as of 2007-01-08 15:16:11
Size: 11277
Editor: 84-45-197-14
Comment:
Deletions are marked like this. Additions are marked like this.
Line 226: Line 226:
==== Encode audio to make an Audio-only version ===== ==== Encode audio to make an Audio-only version ====

Screencasting how-to

Introduction

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 http://doc.ubuntu.com/screencasts .

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

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

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 suggestions qemu
  • xvidcap (record the session - video only, audio dubbed on later)
  • audacity (record the audio)
  • openoffice.org (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.

https://help.ubuntu.com/community/KQEmu

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 http://kvm.sf.net/ using http://kvm.sourceforge.net/howto.html 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. }}}

xvidcap

Downloadable .deb from http://xvidcap.sf.net/.

{{{ wget http://kent.dl.sourceforge.net/sourceforge/xvidcap/xvidcap_1.1.4p1_i386.deb sudo dpkg -i xvidcap_1.1.4p1_i386.deb }}}

OpenOffice.org

Should already be installed.

avidemux

Install avidemux package from multiverse repository.

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

ffmpeg2theora

Install ffmpeg2theora package from universe repository.

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

oggenc

Install vorbis-tools from the main repository.

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

Setting up the environment

Download ISO(s) or Obtain CDs

Get ISO images of the versions you want to screencast.

Create a virtual disk

{{{ 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 }}}

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

{{{ 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 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 }}}

  • Select the window to record
  • Start recording yourself doing some stuff

Note the colour bar in xvidcap shows whether you are hitting your fps target - red is bad, green is good.

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

Record a screencast

Preparation

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

Recording the Audio

Combining the header, footer, audio and 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

{{{oggenc audiorecording.wav }}}

Making the video available to others

Upload to Google Video

Upload to Archive.org

Upload to YouTube

ScreencastTeam/RecordingScreencasts (last edited 2010-05-04 21:03:01 by ip72-213-131-215)