Ubuntu – How to record an OpenGL game in Ubuntu

multimediaopenglscreencastsoftware-recommendationvideo

I would like to create a short clip of me playing Minecraft, an OpenGL game. The usual screencast recorders do not properly record OpenGL.

What kind of software is available for this purpose?

My experience with the software in the similar (but no longer duplicate) question:

  1. kazam: very low framerate despite setting to 60 FPS, no sound, unity menubar constantly flashing through the fullscreen window.
  2. RecordMyDesktop: max framerate setting is 50 FPS, but the video becomes extremely fast if not using the default 15 FPS.
  3. xvidcap: not available on 12.04
  4. tibesti: not available on 12.04
  5. wink: does not run
  6. ffmpeg: very low quality video and no sound with the recommended settings, might be tunable though (no gui unfortunately).
  7. kdenlive: uses recordmydesktop, and the recorded clip becomes corrupted
  8. aconv: video sped up, often broken image, no sound

Best Answer

GLC is well-suited for this purpose. Unfortunately it is not packaged in the archives. However, I have put it (and its dependencies) in a PPA:

ppa:george-edison55/glc Launchpad logo (Click here for instructions on using PPAs.)

You can add the PPA to your system using the following commands:

sudo apt-add-repository ppa:george-edison55/glc
sudo apt-get update

Then you can install GLC with:

sudo apt-get install glc

Once the tool is installed, you can begin recording an application by running:

glc-capture -o /tmp/capture.glc <application>

This will immediately start the application. You can start and stop the recording in-game by pressing the keyboard shortcut Shift + F8.

When you are done, you will end up with a file /tmp/capture.glc that contains the data captured by the tool. You can immediately playback the recording with:

glc-play /tmp/capture.glc

If you wish to convert the recording to a video, you can do so with:

glc-play /tmp/capture.glc -y 1 -o - | mencoder -demuxer y4m - \
    -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=3000 -o /tmp/capture.avi

This will create an MP4 file named /tmp/capture.avi with a bitrate of 3,000 Kbps.


Sources:

Related Question