Capture gaming videos with GLC

208

Author: Mayank Sharma

Like any true gaming fan, I like to share my gaming moments of glory — that multifrag shot, and that super smooth drift around the S-bend. But most free and open source games don’t record gameplay videos. Even those that do don’t always make it easy to export videos out of the game. GLC is an audio/video capture tool that can capture videos in a variety of ways, and also encode them so that you can host them on your blog or upload them to video-sharing Web sites.

Installing GLC is well documented and involves grabbing some video and audio libraries, then running the build-script, which downloads, compiles, and installs GLC. During the install, the script gives you the option to use the latest bleeding-edge version of the software, which might be unstable and crash or may not run at all. It’s best to use the latest stable version.

Once the software is installed you can start capturing videos by running your game through GLC. For instance, glc-capture vdrift will launch VDrift, a drift racing simulation application, normally, and gameplay will be no different than outside of GLC, except that now you have the ability to record yourself. To record gameplay while the game is running, press the Shift-F8 key combination. GLC will record audio and video until you press Shift-F8 again to stop recording.

You might notice a lot of disk activity when the video is being recorded, and if you don’t have ample physical resources on your computer (processor, memory, graphics card) the gameplay might become jerky. That’s because GLC writes a lot of data to the disk when capturing videos — enough to stress my 2.0GHz E4400 dual-core machine with 1GB RAM and on-board graphics, though GLC performed better on a 1.8GHz E6300 dual-core machine with 2GB RAM and on-board GMA X3000 graphics.

By default, GLC records and saves video streams under the name of its current process ID, such as pid-6338.glc. If you invoke the record hot key multiple times during gameplay, GLC will append the captured video to the same stream. If you don’t like GLC’s default capture stream naming scheme, you can specify your own file name by invoking glc-capture with the --out option to specify a filename.

Videos captured by GLC are extremely bulky — a two-minute video takes up about 450MB. One option to reduce the size of the capture is to use the --no-sound option to record videos without audio. You can also control the size of a video stream by using the --fps option to increase or decrease the frame capture rate. By default GLC captures videos at 30fps, but you can specify a lower or higher number.

GLC compresses video streams using QuickLZ. With its --compression option you can either use the LZO compression algorithm (--compression=lzo) or no compression at all (--compression=none). While capturing videos, GLC converts videos from the RGB colorspace of the framebuffer to the YV12 ITU-R BT.601 colorspace which, according to the GLC documentation, cuts the video size in half and often results in better compression. But this conversion adds overhead to the capture process, which can further tax your hardware. You can use the --colorspace=bgr option to capture videos straight off the framebuffer. Such capture streams will take up more disk space but the process will result in smoother game play.

The glc-play utlity plays GLC-recorded video streams. Use the glc-play [stream file] -i VERBOSITY-LEVEL command to get details about the video, where VERBOSITY-LEVEL is a number between 1 and 6 with increasing level of detail. For example, glc-play s_bend_drift -i 2 produces the following result:

[ 0.00s] audio stream format message stream id = 1 format = GLC_AUDIO_S16_LE flags = GLC_AUDIO_INTERLEAVED rate = 44100 channels = 2 [ 0.00s] video stream format message stream id = 1 format = GLC_VIDEO_YCBCR_420JPEG flags = width = 800 height = 600 [ 7.74s] end of stream video stream 1 frames = 64 fps = 8.27 bytes = 43.95 MiB bps = 463 B audio stream 1 packets = 690 pps = 89.13 bytes = 1.35 MiB bps = 9 B

GLC bundles a script to encode videos to MP4 format. Look for encode.sh under the glc/scripts/ directory where you initially ran the GLC install script or grab it online. The script requires MEncoder and LAME to encode the video and audio bits from the GLC stream. If you have these installed, ./encode.sh [stream file] -o MyGameVid.mp4 will produce a nice portable MP4 file that is considerably smaller in size than the original stream file. In my case, the script produced a 1.2MB MP4 file from a 37MB GLC file, and a 45MB MP4 file from a 450MB GLC file.

GLC is a small must-have tool for all gaming connoisseurs who want to relive their moments of gaming glory.

Categories:

  • Desktop Software
  • Graphics & Multimedia
  • Reviews