Create a Flash video of your screen output

Flash Screencapture with Mac

When you’re trying to demonstrate a technique or idea using computers, I find that things go a lot smoother with a visual walk-through. In a classroom it’s relatively easy, you just go through the motions on a projector. Over the internet, video becomes your friend. There are a variety of techniques for capturing screen activity to video, but I’m going to cover creating flash videos on a Mac (most of the steps are probably applicable to Linux and cygwin on Windows). You may have seen flash videos in actions over at Google Video, or any other number of sites. It’s a relatively ubiquitous format these days.

The easiest way to create a the videos would probably be to download a program that lets you do it with a couple clicks. Screenography from Vertical Moon seems to fit the bill, but it costs $40. Now for the cheap bastards, we’ll move onto the free, yet complicated solution.

Collect Your Tools

The first thing that you’ll need is vnc2swf, the little program that makes all of this possible. There’s a C version (0.5.0) and a Python version (0.8.1). The Python package has more options, but I couldn’t find mac versions of it’s package dependencies. The C version no longer requires ming, so it’s relatively easy to get working. We’ll concentrate on that version for this tutorial. To compile the source, you’ll need a copy of the Apple’s Developer Tools installed (and X11 while you’re at it).

The program also relies on VNC to capture the screen input, so you’ll need some sort of vnc server software. I use OSXvnc, but there are a few other options out there.

Compiling the software

The C version comes packaged as source, rather than binary, so you’ll need to compile it yourself in the terminal window. The steps are:

  1. Change to the directory where you downloaded the file
  2. Type tar xzf vnc2swf-0.5.0.tar.gz
  3. Type cd vnc2swf-0.5.0
  4. Type ./configure
  5. Now compile using the command make
  6. As sudo or root, type make install

That should be about it, hopefully you didn’t encounter any errors. I came across some warnings, but everything seems to be ok.

Taking your movie

You’ll need to have your VNC server running in the background because the vnc2swf uses it to capture the screen data. The program requires the use of X11 rather than the normal terminal window. So, load it up and we’ll get rolling. To start recording type:

vnc2swf -nowindow -startrecording output.swf localhost:0

  • -nowindow prevents the program from displaying itself, so you don’t get an annoying recursive display
  • -startrecording does exactly that, otherwise you need to use F9 to activate the program (which is mapped to Expose functions on mac)
  • output.swf is the filename you want it to save as (also generates an html file)
  • localhost:0 is the screen you want to record

There are also options to control framerate and create a clipping window. To reduce the file size of the video and improve performance, decrease your screen resolution or use screen-resize features if your VNC server supports it.

To stop recording, hit ctrl-c in the x11 window. The program creates some html output that you can use to display the flash video.

Unfortunately, none of the VNC tools available for mac capture the screen cursor (although you can see when buttons are depressed). The python package has some editing tools, and the ability to put a slider onto the video, but it’s likely more complicated to get running. There are probably some other tools out there that can capture the screen to .mov and record the cursor but they probably cost money. Whatever works for you.