Create a video file (e.g. mpeg) of the 3D Data

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
cr_itm
Posts: 57
Joined: Sun May 01, 2005 10:13 am

Create a video file (e.g. mpeg) of the 3D Data

Post by cr_itm »

Hello,

I can save some 3D information about my screen, where the objects are, the position of the camera and the movement of the objects, so I can load the file and re-play the scene.

Now my question is, how can I create a video file out of it? My program just plays the 3D scene "realtime" and should write every frame to a video file (at best compressed).

Do you have any idea how to do that?

Thanks a lot!
X_for_Extra
Posts: 69
Joined: Mon May 23, 2005 4:42 pm

Post by X_for_Extra »

I've been thinking about that too. An mpeg file writer would be niffty for making demos and stuff.
What I think is the easiest route is to write a series of screen shots, jpegs if possible and then use an external app to convert them into a video clip.

I think FFMpeg has this capabillity.

But a native mpeg exporter would totally rock.

Maybe Directshow has some provisions for this?
Should put something witty here I suppose.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

use fraps and capture your realtime experience!

http://www.fraps.com
cr_itm
Posts: 57
Joined: Sun May 01, 2005 10:13 am

Post by cr_itm »

X_for_Extra wrote:I've been thinking about that too. An mpeg file writer would be niffty for making demos and stuff.
What I think is the easiest route is to write a series of screen shots, jpegs if possible and then use an external app to convert them into a video clip.

I think FFMpeg has this capabillity.

But a native mpeg exporter would totally rock.

Maybe Directshow has some provisions for this?
Yes indeed, a mpeg writer would be great, but for me it is import, that I can just save the pictures, the engine is rendering. Do you have any ideas how to do that? I dont know how I can save one frame of my animation into a file...
hybrid

Post by hybrid »

Using Linux there is always an image generated in every render round. This could be easily captured by some mpeg encoding library. I never used mpeg encoding, but I will have a look in the next days. But need to check version 0.10 before!
cr_itm
Posts: 57
Joined: Sun May 01, 2005 10:13 am

Post by cr_itm »

hybrid wrote:Using Linux there is always an image generated in every render round.
Using Linux? What do you mean... is it linux specific, that there is always an image generated in the render round?

My questions was, how in general can I save an image of the screen to a file? OR in other words, how do I capture a screen (render output of irrlicht)?
hybrid wrote: This could be easily captured by some mpeg encoding library. I never used mpeg encoding, but I will have a look in the next days. But need to check version 0.10 before!
Version 0.10 of what?
hybrid

Post by hybrid »

cr_itm wrote:Using Linux? What do you mean... is it linux specific, that there is always an image generated in the render round?
I only know the Linux side of Irrlicht. But if the image is available on Window as well you can do it there as well. I will give it a try in the next days.
cr_itm wrote:Version 0.10 of what?
Irrlicht :D
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

I did this in my demo simply taking screenshots of every cycle in the loop. Than using virtualdub it's pretty simple to make an avi file.
But beware - 4 minuts of bmp images takes alot of memory, in my machine with 800x600 screenshots it takes me more than 6GB
Guest

Post by Guest »

why don't you use the render to texture feature ?
cr_itm
Posts: 57
Joined: Sun May 01, 2005 10:13 am

Post by cr_itm »

Anonymous wrote:why don't you use the render to texture feature ?
How would render to a texture help to generate a video?
vegeta
Posts: 12
Joined: Fri May 12, 2006 4:56 pm
Location: the netherlands

Post by vegeta »

the render to texture would help makes it flat instead of 3d but then you still need to export it as a video
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

After the render to texture you also have direct memory access to the textures pixle data (look for ITexture->lock() and ITexture->unlock() )...
Maybe you then can save the data to disc...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

i dont think you can lock a render target (yet). you can however grab screen data using either directx or opengl. see here for opengl.
Emil Halim's Magic2d library can record to divx avi, I assume this is using directx and vfw or something
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
turboferret
Posts: 49
Joined: Thu Aug 12, 2004 12:42 pm
Location: Sweden
Contact:

Post by turboferret »

bitplane wrote:i dont think you can lock a render target (yet). you can however grab screen data using either directx or opengl. see here for opengl.
Emil Halim's Magic2d library can record to divx avi, I assume this is using directx and vfw or something
I posted a fix to locking d3d8/d3d9 rendertarget textures some time ago. I guess it hasn't made it into any of the builds after I posted it. Here it is.
This monkey is useless, it only has ONE ass!!!
Post Reply