PDA

View Full Version : Saving opengl output to video files



pramod_reddy
09-04-2002, 07:36 AM
hi,

i am trying to save my opengl animations as video files in windows. I tried it with avi, but the rendering quality is horrible and it is too slow.

Can anybody suggest me a suggest me a method to encode the opengl animation sequence into a video format which does not compromise much on quality, at the same time having some amount of compression and ease of use.

Thank you.

Leyder Dylan
09-04-2002, 08:00 AM
Hi,

I've tryed this :
http://www.atomixbuttons.com/vsc/

But the program slows my OpenGL program too much ...

nexusone
09-04-2002, 08:41 AM
Are you wanting this done in real time?
Unless you have a really fast CPU, it is going to be slow.
Also from what I understand, is that even if you have 3D hardware on your video card. The card was optimized to have data sent to it not back out. So reading the video buffer from the card will slow's rendering process down thus the frame rate.

If you don't mind waiting, just render to single images files, then use a video editing program to turn the single frame images into a MPG or AVI.


Originally posted by pramod_reddy:
hi,

i am trying to save my opengl animations as video files in windows. I tried it with avi, but the rendering quality is horrible and it is too slow.

Can anybody suggest me a suggest me a method to encode the opengl animation sequence into a video format which does not compromise much on quality, at the same time having some amount of compression and ease of use.

Thank you.

Pa3PyX
09-05-2002, 12:48 AM
glReadPixels()? Using this call, you can read pixels from the video buffer in RGB format, then save them, say, to a sequence of TGA files (raw, uncompressed RGB888 format), and then use an MPEG/AVI/Bink/Smacker/DivX compressor to achieve desired compression... Just have enough disk space - each 640x480 RGB screen is about 900 kilobytes, if your target animation fps is 50, it is about 45 megabytes per second and 2.8 gigabytes per minute.

You will probably have to adjust your code to use a fixed time scale (rather than a variable time scale based on system time), since grabbing and writing each screen will take quite some time.

Gavin
09-05-2002, 07:13 AM
Try the quicktime libs