• Diff for "RecordingOpenGLAppsWithGLC"
Differences between revisions 10 and 11
Revision 10 as of 2009-06-26 07:52:46
Size: 3253
Editor: BenCohen
Comment:
Revision 11 as of 2009-06-26 07:53:21
Size: 3245
Editor: BenCohen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 72: Line 72:
You can read about more options [javascript:void(0);/*1246002727849*/ here]. You can read about more options [javascript:void(0);/*1246002798240*/ here].
Line 76: Line 76:



Here's a simple example of recording and encoding the OpenGL window(s) from an application. For more information see http://nullkey.ath.cx/projects/glc/.

TableOfContents(2)

Install glc

Download attachment:glc-build.sh , then run it:

bash glc-build.sh

You'll be asked a series of questions; it's recommended to hit Enter at each prompt, taking the default answer.

You should see some messages indicating installation, e.g.:

info  : Fetching sources...
info  : Unpacking sources...
info  : Building elfhacks...
info  : Building packetstream...
info  : Building glc...
info  : Installing elfhacks...
info  : Installing packetstream...
info  : Installing glc...
info  : Done :)
info  : You may need to add following lines to your .bashrc:
export PATH="${PATH}:/usr/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib"
info  : If you want to remove glc, execute:
sudo rm \
/usr/lib/libglc-core.so* \
/usr/lib/libglc-capture.so* \
/usr/lib/libglc-play.so* \
/usr/lib/libglc-export.so* \
/usr/lib/libglc-hook.so* \
/usr/lib/libelfhacks.so* \
/usr/lib/libpacketstream.so* \
/usr/include/elfhacks.h \
/usr/include/packetstream.h \
/usr/bin/glc-capture \
/usr/bin/glc-play

Use glc to capture

Now, start the application with glc wrapping it:

glc-capture ./bin/nav_view

To start recording, press shift-F8. shift-F8 will also stop recording. GLC will by default record into a file named "application_name-pid-0.glc". Each time you start recording, it will append to that file. shift-F9 will record to a different file each time: "application_name-pid-[0-n].glc"

Use glc to playback

Now you can playback these files with the glc playback tool. If you want to try it:

glc-play <filename>.glc

Use glc to encode

To encode the .glc file to something else, like an mp4, you can use the encode.sh script that came with the glc source that was downloaded during the glc installation step. This script is not installed anywhere, so you'll have to find it in the glc source tree, which was laid down wherever you ran glc-build.sh. E.g., if you ran glc-build.sh from ~/Desktop:

~/Desktop/glc/scripts/encode.sh <filename>.glc -o <output_filename>.mp4

The resulting .mp4 file is playable by various software, including mplayer and vlc (on both Linux and OS X). It is not playable by Apple Quicktime Player.

If your .glc video file has multiple video streams (multiple video windows open up when you play it), you can specify the video stream number that you want to encode with the "-v NUM" option.

Note that you must install lame and mencoder for encoding. On Ubuntu, you can:

sudo apt-get install lame mencoder

Encoding to other formats

You can read about more options [javascript:void(0);/*1246002798240*/ here].

If you have a glc video with two different streams and you want to encode one of the two streams to another video format, you can specify the stream number by usin

There are presumably other ways to invoke glc-play and/or mencoder to produce other video formats. If you figure out useful combinations, please document them here.

Wiki: RecordingOpenGLAppsWithGLC (last edited 2012-12-03 11:00:44 by SebastianHoefer)