Recording your 3D Games Made Easy

From the glc website: “glc is an ALSA & OpenGL capture tool for Linux. It consists of a generic video capture, playback and processing library and a set of tools built around that library. glc should be able to capture any application that uses ALSA for sound and OpenGL for drawing. It is still a relatively new project but already has a long list of features.”

The question now is: How do we install glc on our Arch Linux systems? It isn't available on any of the main repositories, but like many useful tools it is on AUR. This, my friends, is the perfect time to introduce you to the yaourt package.

yaourt is a wrapper for pacman that allows you to easily install packages from AUR. But be cautious, packages from AUR are user contributed, you have to make sure the package is from a user you trust and that you have examined the package yourself and trust the code it contains. Otherwise you may end up installing a package that seriously compromises your system.

For the installation of yaourt we need to add the [archlinuxfr] repository to the end of our pacman.conf file:

Now, after syncing our repositories (pacman -Sy) we should be able to install the yaourt package:

# pacman -Sy yaourt

We can now proceed with the installation of glc.

$ yaourt -S glc or, if you like using the latest and greatest:$ yaourt -S glc-git

Yaourt will automatically download the PKGBUILD from AUR, run makepkg, create the package, and install it for you. This is an interactive process; you will be prompted to review the PKGBUILD (to ensure it doesn't contain a shady download link or nefarious command like rm -rf / which will wipe out your entire hard drive), and your sudo password, among other confirmation dialogs.

Thanks kumyco for providing us with these high quality glc PKGBUILDs.

Here are some useful commands that will hopefully get us started with a basic knowledge of what glc does and how. We shall proceed by capturing a 3D application, in this case the Battle for Wesnoth game.

$ glc-capture -o /home/myusername/glc-videos -r 0.5 -s wesnoth

Let us parse the above command to see what all those options stand for. First, we have -o, which stands for output, it specifies the directory in which we want to save the .glc video we are about to capture. Then we have the -r 0.5 option, which resizes the video to half, for example glxgears being a 300x300 size window will be resized to 150x150 on the .glc video. This is very useful if the window size of the application is large. Otherwise we would end up with a very big .glc video file. I once had a video of less than three minutes that was almost a gigabyte in size!

And finally, the -s option tells the application to start recording as soon as Wesnoth is launched. If you don't want this, shift + F8 is the key combination to start and stop glc-capture recording capabilities. However, this won't work if the game has that exact key combination assigned to something else.