View Full Version : Capturing OpenGL Output to Movie

04-30-2008, 07:24 PM
I need to capture the output of my OpenGL app to a movie.

The solution needs to work on Windows and OS X.

Is there some sample code showing how to do this anywhere?

Also, what video formats are recommended? I'm currently leaning towards Quicktime but I'm open to suggestions.

Seth Hoffert
04-30-2008, 08:33 PM
The way I've created movies from my OpenGL programs in the past is to output each frame to a file (using PBOs and glReadPixels), then compile the frames into a movie using mencoder (http://www.mplayerhq.hu/).

05-01-2008, 06:26 AM

Seth Hoffert
05-01-2008, 11:59 AM
I have a directory called "frames" which contains TGA files, then I run:

mencoder mf://frames/*.tga -mf fps=60 -ofps 60 -o out.mpg -ovc x264 -x264encopts bitrate=5000

This is no programmatic solution, but mencoder is available for multiple platforms...