SDL -> avi

You might look at Fraps (www.fraps.com) for the video capture, if
you’re on a Windows platform. Also, regarding the DVD conversion, I
believe the codec used on most DVD’s is DivX. DVD stands for Digital
Video Disc, and unless the people who wrote the spec don’t know what
“Disc” means, then DVD refers solely to the actual media that your
video will be stored on. The DivX website (www.divx.com) might give
you more (or more accurate) information.

Video DVDs use MPEG-2, not DivX.

Here was my attempt to encode an SDL-based game on Linux to an MPEG-1
stream. Some of it is still relevant:

 http://icculus.org/misc/mpeg.txt

–ryan.

You can use it in straight SDL. Remember, each surface has a height,
width, bpp, and pixel-data fields that can be used to save an image.
All you need to do is pull the information from it and send it to a
screen shot save type funtion.

Richard

Fred Perie wrote:> Richard “The PC Doc” Hancock wrote:

That’s the beauty of it, you don’t actually have to slow it down.
Just do the timing calculations for 1/30 of a sec each frame. And if
you are just taking it from the surface it self, the screensave
SHOULD NOT interfere. But then again, the only way I have done it is
a direct glReadPixels.

Richard

Then I have to dig into SDL an openGL. Might not be so difficult, I
guess. The best would be such an option would be existing in pure SDL.

TH
anks

Fred


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.4 - Release Date: 06-Apr-05

Richard “The PC Doc” Hancock wrote:

You can use it in straight SDL. Remember, each surface has a height,
width, bpp, and pixel-data fields that can be used to save an image.
All you need to do is pull the information from it and send it to a
screen shot save type funtion.

Thanks

Does such a function exists in OpenGL? or do I need another library?
Excuse me, I have little experience in graphics programming
Would you be so kind to give me an example?

Fred

Quoth Fred Perie , on 2005-04-08 15:17:28 +0200:

Does such a function exists in OpenGL?

If you want to pull pixels out of the framebuffer with OpenGL, you can
use glReadPixels. To capture the entire screen into a buffer, you
might use something like:

glPixelStorei(GL_PACK_ROW_LENGTH, 0);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(0, 0, screen_width, screen_height,
GL_RGB, GL_UNSIGNED_BYTE, some_buffer);

where some_buffer has been previously allocated to hold
3screen_widthscreen_height bytes. You can also use other pixel
formats and data types, depending on how you want the output to be
formatted.

Note that glPixelStore parameters are part of the OpenGL state, so if
you have other OpenGL operations that depend on them being other
values, and you have at least OpenGL 1.1, you can wrap the whole thing
with gl*ClientAttrib calls:

glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); {

}; glPopClientAttrib();

The OpenGL documentation can tell you more.

—> Drake Wilson
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050408/f89203a8/attachment.pgp

Thanks Drake,

In fact I dropped the OpenGL solution, which was requiring getting into
it and I found that SDL_SaveBMP was doing the same job nicely

Drake Wilson wrote:>Quoth Fred Perie , on 2005-04-08 15:17:28 +0200:

Does such a function exists in OpenGL?

If you want to pull pixels out of the framebuffer with OpenGL, you can
use glReadPixels. To capture the entire screen into a buffer, you
might use something like:

glPixelStorei(GL_PACK_ROW_LENGTH, 0);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(0, 0, screen_width, screen_height,
GL_RGB, GL_UNSIGNED_BYTE, some_buffer);

where some_buffer has been previously allocated to hold
3screen_widthscreen_height bytes. You can also use other pixel
formats and data types, depending on how you want the output to be
formatted.

Note that glPixelStore parameters are part of the OpenGL state, so if
you have other OpenGL operations that depend on them being other
values, and you have at least OpenGL 1.1, you can wrap the whole thing
with gl*ClientAttrib calls:

glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); {

}; glPopClientAttrib();

The OpenGL documentation can tell you more.

—> Drake Wilson



SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl