how to Generate Video

I want to record the activity of my OpenGL window,this is record frames to generate movies maybe avi or mpeg
how can I do that

Short answer : use FRAPS .

Hi zBuffer–I know that it’s not your real name :wink:
This is really a good software.But when i want to record the scene, the frame rate is actually decreased.Can you please figure out my problem?
-Ehsan-

it will slow down the program…
extra programs running in the background always slow down the CPU accesses in your app, and this one raids the GPU for screen data which slows rendering down too

there probably isn’t a fix

you could try using glReadPixels(…) to capture each frame to a char array, along with some clever file naming function to generate
frame1.raw
frame2.raw
frame3.raw


and save from the char array with the c function fwrite(…)
<takes a *FILE save location set up for binary write - eg

 *FILE file = fopen(filename, "wb"); 

>

then put the files into photoshop (or paint shop pro) and save them as frame[i].bmp and import them into a video creation program (try AVI tricks )

that way you get to control the output frame rate of your video (and add background music and watermarks etc.)

:slight_smile:

Originally posted by Ehsan Kamrani:
Hi zBuffer–I know that it’s not your real name :wink:
This is really a good software.But when i want to record the scene, the frame rate is actually decreased.Can you please figure out my problem?
-Ehsan-

I’m not sure, but it can be because the program does extra functionalities not covered directly by your program. Reading a buffer and write the data takes some amount of cpu and memory usage.

If I’m totally wrong, simply forget me.

thank you for all these answer,
but in fact I need a some code to do that,
from what you all say I found that I should read the buffer then save it into some image format and convert the images into AVI
maybe Now I need some code to convert the image into AVI
any suggestion?