If a picture’s worth a thousand words, are moving pictures worth exponentially more, wonders a philosophical Shashank Sharma…
Atechnologically challenged friend called to say they couldn’t get Opera’s VPN feature to work. To suggest desktop sharing was out of the question. Thankfully, Byzanz offered an easy solution – creating a GIF screencast showing the exact steps to using VPN on Opera.
With Byzanz, you can create a screencast of either the entire desktop or of the specified area. You can even set the duration for the screencast and have the nifty little tool save the output as either a GIF image, or as OGG Theora or FLV flash file, if you also want to record audio with the screencast.
Another reason why screencasting may be preferred over desktop sharing as a teaching tool is that the latter requires both users to be at their respective machines at the same time. On the other hand, a screencast can be used at one’s convenience. More importantly, whereas desktop sharing can be a drain on the bandwidth, a 60-second GIF screencast made with Byzanz adds up to only a few MBs.
You’ll find Byzanz in the software repositories for most distributions such as OpenSUSE, Fedora, Ubuntu and others. It also doesn’t have a difficult dependency tree and once again the software repositories will provide whatever few packages that are needed.
Once installed, you can use the byzanz-record command to create the screencast. For each screencast, you must specify the name of the output file, as well as the duration for the screencast, in seconds. To create a 60-second screencast of the entire desktop you must run the byzanz-record -d 60
filename.gif . The output files are stored in the current working directory by default. You must either provide the absolute path and filename, if you want to store them elsewhere or switch to such directory before running the byzanz-record command.
By default, the tool will record the entire desktop, but you can also restrict the recording to a specified portion of the screen. Should you choose the second option, you’ll have to employ trial and error to measure the portion of the screen you wish to record.
Tools like Byzanz can only record either the entire screen, or a rectangular portion of it. The dimensions of the rectangle can be specified using the --height and --width command options. You can also do the same
using -h and -w respectively: byzanz-record -d 60 -x 70 -y 0 -w 850 -h 800 limited-size-screencast.gif . Here, we’ve used various command options to respectively specify the X and Y coordinates of the
screen. You can think of these as the top-left corner of the rectangle. You must also provide the dimensions of the rectangle to record, and this is done using the
--width ( -w ) or the --height ( -h ) command options. This again would require a number of attempts before you get the size of the rectangle right.
Be careful not to use the = sign before providing the values when working with the different command options such as -d , -x and -h . Furthermore, be sure to use a single space between the command option and the value, or Byzanz will report errors: $ byzanz-record -d14 -x 170 -y 0 -w 850 -h 750 -a recorddesktop-another.flv Wrong option: Cannot parse integer value “-x” for -d usage: byzanz-record [OPTIONS] filename
byzanz-record --help $ byzanz-record -d=14 -x 170 -y 0 -w 850 -h 750 -a record-desktop-another.flv Wrong option: Cannot parse integer value “-x” for -d usage: byzanz-record [OPTIONS] filename
byzanz-record --help In the examples above, you’ll see that both the -d14 and -d=14 options resulted in Byzanz reporting an error. Smart screencast As with the size of the rectangle to record, it’s also not always possible to know beforehand the duration of the screencast. One can’t always know beforehand if the task to be recorded in the screencast will take two minutes to accomplish or more. If you don’t get the duration right, your screencast is likely to end before the task is finished. When that happens, you’ll have to run a new instance of byzanz-record and go through the entire process again.
Of course, you can do a timed run the first time around, and then use Byzanz to record the screencast, but this time consuming method is unlikely to appeal to anyone. Thankfully, the tool provides an excellent workaround with the -e (-- exec) command option. You can use this command switch to run a specific command or program, and Byzanz will continue to record the screencast until you close the program.
For example, if you wish to record the steps for enabling VPN on Opera, you can run Opera with Byzanz, using the byzanz-record -e opera testfile.gif command. Here, instead of specifying the duration, or the dimensions of the rectangle to record, we’ve instead used the -e command option to specify the program, in this case Opera. Byzanz will continue to record the desktop until you close Opera. Also note that although you’ve specified a program, Byzanz will record the entire desktop with the above command. If you only want to record a single window with
Byzanz, you can use the xwininfo command to identify its dimensions. From the terminal, run the xwininfo and then click a window such as the browser. The tool will then provide the details such as the upper-left X- and Y-coordinates as well as the width and height. You can use this information with various command options of
Byzanz to restrict the recording to the specified portion. Another option is to use the --delay command option, which can be used to define the delay in seconds, after which Byzanz should begin recording the screen. You can use the intervening time to set up the desktop, and move around icons or launch a program. Other formats Instead of gif, you can also save the screencast as a flv file or as Ogg Theora Video (ogv). While gif animations should suffice for most common purposes, if you don’t like the slight loss of colour with gif, or need to record voice over with the screencast, you should consider one of the other file formats. The command byzanz-record -d 60 -a audio
screencast.ogv can be used to record a OGV screencast, and thanks to the -a command switch,
Byzanz knows to use the default audio input device to record audio as well. While ogv screencast render the video perfectly, unfortunately, despite all the proper codecs installed, ogv videos only record audio for the first five seconds. The rest of the video had no sound, across multiple tests. If in the same command, you change the name of the output file to audio-screencast.
flv, Byzanz will create an FLV screencast instead, and you’ll find that audio works flawlessly with FLV.
Perhaps the limited audio recording explains the different file sizes. A 10-second ogv video was a 2MB file, whereas the same length flv file was nearly 9MB.
If you’d rather not decide the output file beforehand, you can use the .byzanz extension, instead of .flv, .ogv or .gif. The output file in this case can run into hundreds of MB, depending on the task you perform and duration. The project identifies such .byzanz files as debug files. You can then use byzanz-playback to convert .byzanz files to one of the supported formats per your convenience. Unlike ogv and flv output files, however, you can’t use .byzanz to record audio: $ byzanz-record -d 14 -a record-desktop.byzanz Error during recording: This format does not support recording audio. $ byzanz-record -d 14 record-desktop.byzanz $ byzanz-playback record-desktop.byzanz recorddesktop.flv The byzanz-playback command is only useful for converting a byzanz file to another output. You can’t use it to convert a flv file to gif or an ogv to flv. The command expects an input file, which is always a byzanz file, and an output file name, which can be either a gif, flv or ogv, as can be seen from the last command.
Byzanz won’t appeal to those who prefer graphical screen recording tools and there are several such alternatives. However, there are some user-contributed scripts that enhance Byzanz – see the boxout.
Using the xwininfo command, you can quickly ascertain the dimensions of a window, if you don’t wish to screencast the entire desktop.
By default, Byzanz doesn’t produce any output. You must use the -v command option to make it verbose.