Kevin Beason's Homepage > Software > recordMovie


By Kevin Beason

What is recordMovie?

recordMovie is a small shell (tcsh) script that will record an arbitrary size portion of your screen into a Divx4 movie. This movie can then be played back by using a regular movie player.

Here is an example movie. (To play it you will need a DivX-compatible player, such as mplayer. CSIT or SCS linux users may run ~beason/linux/bin/mplayer.)

(2.3M, 1:08s, 24fps)
(Click image to download movie)

recordMovie accomplishes this in two steps:

  1. It uses gvidcap to capture a portion of your screen to a temporary MPEG file.
  2. Then it uses mencoder to encode the MPEG into a Divx4 file, with arbitrary bitrate.


./recordMovie <filename.avi> [ bitrate ]
./recordMovie reencode <filename.avi> [ bitrate ]
./recordMovie thumbnail <filename.avi> <image.jpg>


./recordMovie mymovie.avi

It can also reencode the Divx from the MPEG using a different bitrate if you decide the original bitrate was too high or low:

./recordMovie reencode mymovie.avi 128

It can also create a thumbnail from the movie:

./recordMovie thumbnail mymovie.avi thumb.jpg

When gvidcap (the capturing program) starts up, you have the ability to resize and position the capture window. Note that if you try to capture too large an area of the screen, your video will playback too fast. This is because gvidcap cannot capture fast enough and will drop frames.



This script is miniscule. It just calls the following really powerful programs, which must be installed. If you use a Linux machine at CSIT then you are in luck and don't have to install anything.
  • Linux
  • gvidcap from xvidcap (capturing tool)
  • mencoder from mplayer (Divx encoder)
  • transcode (Divx decoder/encoder, movie (dis)assembler)
    • avifile (for dealing with .avi files)
    • Magick++ from ImageMagick (suite of image manipulation tools)
  • convert from ImageMagick (suite of image manipulation tools)

Why did I write this?

This script could be three lines long. I didn't feel like memorizing (and then having to type out) the long command line arguments to gvidcap, and especially mencoder and transcode. Hopefully this script makes things really easy for everyone (students, professors) at CSIT.

Kevin Beason / kevin.beason [] Home