PDA

View Full Version : how to Generate Video



aQ
05-28-2005, 05:20 PM
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

ZbuffeR
05-29-2005, 12:11 AM
Short answer : use FRAPS (http://www.fraps.com/download.php) .

Ehsan Kamrani
05-29-2005, 03:26 AM
Hi zBuffer--I know that it's not your real name ;)
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-

carl_lewis
05-29-2005, 08:06 AM
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 (http://bobyte.com/AviTricks/GetAviTricks.asp) )

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

:)

jide
05-29-2005, 08:41 AM
Originally posted by Ehsan Kamrani:
Hi zBuffer--I know that it's not your real name ;)
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.

aQ
05-29-2005, 05:42 PM
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?