Skip to main content

Recording and serving screencasts

Posted by cayhorstmann on October 2, 2009 at 4:24 PM PDT

I just learned how to make Flash screencasts on my Linux system and deliver them (with GlassFish) on a server that the computer science department received as a donation (thanks Sun!!!).

Why am I doing this? My publisher wants me to develop screencasts for my books, and I thought it could be useful for my students if I record my lectures. I use a smart board for the lectures, and a screencast that records the “smart” pen and voice works tolerably well.

On Windows, you can use Camtasia for making screencasts, and it works very nicely out of the box. In Linux, it is definitely “roll your own”, but you get a bit more control over the process. Here are the details.

  • To record, I use XVidCap. (Many people like gtkRecordMyDesktop, but it produces Ogg files and when I tried it on a lecture, the sound was out of sync with the video after a while.) I record at 1024x768, 10 fps.
  • I use Gromit to write on the screen. This is very nifty—a hot key turns the mouse into annotation mode, and you can circle and annotate stuff. I attached a Bamboo tablet to make it even easier. (You can have the same effect in Compiz, but I found that Compiz occasionally overwhelmed the screen capture software, so I turned if off. On a Windows tablet PC, there is Ink Desktop. If you can install it. On my Windows 7 machine, the installer complained that my laptop vendor didn't pay enough clams to Microsoft...)
  • With the Bamboo tablet, Xournal is pretty nice for doing a quick graph

  • Pulseaudio is both a problem and your friend. Tip #1. Use padsp for programs that use the old-fashioned OSS protocol, such as XVidCap. Tip #2. If you switch microphones (I use different ones on my desk and in the classroom, but never the built-in laptop mike), use the Recording tab in Volume Control, click on the v button next to the recording stream, and select Move stream.
  • To splice out dead parts of video segments, I use Avidemux. For more advanced video editing, Linux doesn't seem to have good choices.
  • To convert MPEG to Flash, I use ffmpeg, followed by Yamdi to inject the metadata that are needed for seeking. Here is my conversion script:
    in=$1
    out=${in/.mpeg/.flv}
    ffmpeg -i $* -f flv -r 10 -s 512x384 -qscale 5 -ar 44100 /tmp/${out}
    yamdi -i /tmp/${out} -o ${out}

Now on to serving the stuff to the public. YouTube isn't a solution for lectures—you can only upload 10 minutes worth of video. So, let's assume you have a server where someone else pays for the bandwidth :-)

  • You need to supply a player. (This came as a suprise to me. I thought that Flash did this automatically, but what do I know...) I used the free JW FLV player. Really, I would like to supply a JavaFX player, being a Java guy, but I didn't have the time to fuss with it. I looked at this post, and the player worked fine on Linux, but it didn't do seeking. (If you move the slider forward, it doesn't jump to a later part of the movie until that part has actually been downloaded. This might be because the movie doesn't have the metadata, or because the player doesn't know how to seek. I'd like to know...) You really, really need seeking for lectures so students can quickly move past the dullest parts.
  • You need to install a script to support seeking on the server, as explained here. I used our donated Sun server on which I run Glassfish. The canonical choice seems to be xmoov-php, but I was in no mood to install Apache just to run a PHP script. (Could I have done that in Glassfish? If so, I'd like to know how.) Fortunately, I found a translation to a servlet here, and now I am all set. Here is a sample screencast for my next book, and here is a sample lecture.

AttachmentSize
lecture.png138.26 KB
xournal.png235.81 KB
Related Topics >>