Benjamin
Benjamin

Reputation: 366

How to record a video from a QGLWidget?

I have a QGLWidget in which I am rendering a dynamic mesh. What I would like to do is to record a video of what I am viewing in this window. I would like to do it with the low-level multimedia libraries of Qt, if possible, or the high-level Phonon.

Many thanks for your ideas!

Upvotes: 0

Views: 669

Answers (1)

Martin Beckett
Martin Beckett

Reputation: 96109

In the latest versions of QT you have a QGLFrameBuffer object, you can render to this offscreen and then simply convert to a QImage.

Then it's reasonably simple to use ffmpeg to ewncode each QImage into a video http://code.google.com/p/qtffmpegwrapper/

Upvotes: 2

Related Questions