Sign in to follow this  
commy2005

Directx screen capture....

Recommended Posts

Hi guys and girls programmers, I was wondering what is the best way to actually capture my directx application and save as mpeg2?I recently finished my directx application of a short game,but I am not sure how to capture the gameplay and save as mpeg format.So I could actually show the gameplay in mpeg (like game trailers).My game is in Directx 9 how to incoperate such mechanism to the capture the gameplay?I was wondering if I could do that with directshow and do I actually need a capture card as well?Thanx in advance..guys/girls...:) TIA, commy2005 [Edited by - commy2005 on September 8, 2005 3:08:58 AM]

Share this post


Link to post
Share on other sites
hi there commy2005,
How are you doing buddy?

The Problem
Capturing video from your game on mpeg/avi..

The Solution
There are a number of ways you could do this but one cool/easy way is to use a program called fraps, It's a nice video capturing program that also has some other cool features like checking the frames per second, etc...

I hope this helps. I am sure you can do it in DirectX but if you just want to capture video for a game clip I would suggest using fraps :)


Take care buddy.

Share this post


Link to post
Share on other sites
Thanx for the tip Armadon.Very much appreciated.But I want to put the capturing mechanism in my directx proggie.So I don't need to run another program to capture it.Hopefully someone could give me more ideas...thanx...

Is this the only way to do it?I believe there are more ways.....thanx again..

TIA,
Commy2005

Share this post


Link to post
Share on other sites
I got another question....

1)How do I do screen capture and save as bitmap(any other files) in my directx application?Are there a function GetFrontBuffer and D3DxSaveSurfaceToFile will do the stuff?Hopefully someone could let me know....

Thanx in advance..

commy2005

Share this post


Link to post
Share on other sites
Hi there commy2005,
How you doing buddy? (once again) :)

The Problem
Capturing screen shots in Direct3D

The Solution
You could run with the following pattern of capturing screenshots

1) IDirect3DDevice9::GetBackBuffer
2) This results in the back buffer being captured to a IDirect3DSurface9
3) You can the use D3DXSaveSurfaceToFile Function to save the surface to a file

I hope this helps.
Take care buddy.

Share this post


Link to post
Share on other sites
Thanx for you steps in it...I hope I could get to the part to convert bitmap to mpeg later.Thanx again.Besides the FRAPS are there any more ways to do so?I hope you could come let mw know some ideas behind this.Could I actually use directshow to convert the bitmaps to mpeg?

in despair,
Commy2005

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this