Video file

Started by
9 comments, last by eGamer 14 years, 2 months ago
Hi there, i want to take series of openGL frame buffers and compress them to video file like (avi, ogg, etc...). any help please ?
Advertisement
Copy the frames to a PBO and then glReadPixels() (don't read from the main framebuffer as that will block rendering to it; using a PBO makes this process asynchronous). Use ffmpeg to encode the frames.
"But who prays for Satan? Who, in eighteen centuries, has had the common humanity to pray for the one sinner that needed it most?" --Mark Twain

~~~~~~~~~~~~~~~Looking for a high-performance, easy to use, and lightweight math library? http://www.cmldev.net/ (note: I'm not associated with that project; just a user)
I think I heard somewhere that FBO's were faster.
Well, you could bind it to a texture (as opposed to a renderbuffer) FBO and then glGetTexImage(), but I would try both methods to see which is actually faster.
"But who prays for Satan? Who, in eighteen centuries, has had the common humanity to pray for the one sinner that needed it most?" --Mark Twain

~~~~~~~~~~~~~~~Looking for a high-performance, easy to use, and lightweight math library? http://www.cmldev.net/ (note: I'm not associated with that project; just a user)
i know how to get the frames and store them in array.
my main problem is How can i compress a group of frames to a video file format ?
You could try this http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=35 but I've heard people complaining about some of NEHE tutorials. Some might have memory leaks, not sure about this one though. This also might do http://libmpeg2.sourceforge.net/ I haven't looked at it though so I can't say for sure
Quote:Original post by eGamer
my main problem is How can i compress a group of frames to a video file format

Dude, I told you, use ffmpeg. It probably covers at least 90% of existing video formats and its component libavcodec is the most widely used encoder/decoder library out there.
"But who prays for Satan? Who, in eighteen centuries, has had the common humanity to pray for the one sinner that needed it most?" --Mark Twain

~~~~~~~~~~~~~~~Looking for a high-performance, easy to use, and lightweight math library? http://www.cmldev.net/ (note: I'm not associated with that project; just a user)
Quote:Original post by Prune
Quote:Original post by eGamer
my main problem is How can i compress a group of frames to a video file format

Dude, I told you, use ffmpeg. It probably covers at least 90% of existing video formats and its component libavcodec is the most widely used encoder/decoder library out there.


Can you please give me the link to download(ffmpeg) their source files or lib files ?
ffmpeg
http://www.ffmpeg.org/download.html

This topic is closed to new replies.

Advertisement