PDA

View Full Version : Fraps 1.9D Help from Release Notes!



XyZspineZyX
10-14-2003, 09:53 PM
I took the liberty to post the releasenotes for fraps 1.9D as many has already asked questions answered within that.

Hope I don't break any copyright or anything.



<TABLE border="0" width="100%" cellpadding="20" cellspacing="0">
<TR>
<TD align="left" valign="top">
<BASEFONT SIZE="3"><FONT face="Verdana, Arial, Helvetica" POINT-SIZE="12" WEIGHT="100">
<H2><FONT COLOR="#60ff70">FRAPS 1.9D RELEASE NOTES</FONT></H2>
The system requirements for this version of Fraps are:
<MENU>
<LI>DirectX 8.1 or later
<LI>Pentium MMX or later
<LI>Windows 95/98/ME/NT/2K/XP
</MENU>
This version of Fraps has been developed with the 43.45 Detonators for Geforce cards, and the 3.2 Catalysts for Radeon cards.‚ ‚ Please make sure your installed video card drivers are at least these versions!‚ ‚ Earlier drivers may suffer performance problems.


<HR>
<H2><FONT COLOR="#60ff70">Frequently Asked Questions</FONT></H2>


The questions are organised into four sections.‚ ‚ Please choose the appropriate part below:

<A href="#general"></P>
<H2><FONT color=#ffffff>General Questions</FONT></H2></A><A href="#screen">
<H2><FONT color=#ffffff>Screen Capture Questions</FONT></H2></A><A href="#video">
<H2><FONT color=#ffffff>Video Capture Questions</FONT></H2></A><A href="#coders">
<H2><FONT color=#ffffff>Coder Questions</FONT></H2></A>


<CENTER>http://members.chello.se/ven/screen.png </CENTER>



<A name=general>



<H2>General Questions</H2></A><FONT color=#60ff70 size=+1>What do all the options do? </FONT>

The‚ top part of the Fraps dialog is dedicated to the options for the ingame framerate counter.


</P>


The frame rate can be set to continuously update or only update‚ its' value once a‚ second.

The overlay style specifies whether the counter is drawn on top of the game screen (transparent), or is drawn on a black background (opaque). Setting this option to opaque may be useful if you are having trouble distinguishing the text from the game's background.

The overlay corner indicates the region of the screen that the framerate counter will be displayed in. Choose a corner that doesn't obstruct the game's display.</P>


Movie options let you specify the hotkey‚ for recording videos while playing your games.‚ You can also specify the speed of the movie.</P>


The advanced options let you specify a hotkey to take screen captures, as well as a hotkey to save frame rate data to a‚ file.</P>



<FONT color=#60ff70 size=+1>How can I average the framerate between two points? </FONT>

While in the game press the Scroll Lock button. This will mark the start of where averaging is to take place. A green box is displayed to let you know that logging has begun. When you want to stop, press Scroll Lock again. The average framerate will now be displayed in a red box. Full details are also saved in the file FRAPSLOG.TXT in your Fraps folder. Note that it is possible to change the key from Scroll Lock by entering another key in the hotkey box.


<FONT color=#60ff70 size=+1>What is the maximum framerate Fraps will show? </FONT>

Fraps will show a maximum framerate of 999 fps on screen. If you need to know precise framerates above this you must use manual logging and find out the value from FRAPSLOG.TXT.


<FONT color=#60ff70 size=+1>Why doesn't Fraps show above 30fps, 60fps, 75 fps (or any other framerate) in my game? </FONT>

This can be due to several reasons.

Many games have internal limits that prevent them rendering faster than a certain framerate. In some cases this can mean they are locked at a maximum framerate of only 30fps.

Another possibility is that you have Vsync enabled. Vsync is used to synchronise the output of your graphics card with the display of your monitor. When your graphics card has finished rendering the next frame it waits for the monitor to finish displaying the current one before switching to the new one. This means that the maximum framerate you can obtain will be equal to the refresh rate of your monitor (which is usually 60hz, 75hz, 85hz, or 100hz).

If you disable Vsync then your graphics card will continuously render without waiting for the last frame to be displayed in its entirety. With fast graphics cards this means that your monitor may switch to a new frame halfway down the screen. This effect is known as tearing as there appears to be a visible line separating two different halves. Due to this, you should generally leave Vsync enabled except when benchmarking.

Finally, WindowsXP is said to have internal limits of 75fps for DirectX games, and 60fps for OpenGL games. It is possible to download refresh rate fixes to work around this limitation.


<FONT color=#60ff70 size=+1>Does Fraps have a performance impact on the game? </FONT>

There is a small overhead associated with drawing the framerate on screen. This may vary depending on your system configuration, but should remain relatively minimal. The best way to measure it on your own system is to find a game that allows you to benchmark it and compare the results obtained with and without Fraps loaded. </P>


</P>


</P>


When you are recording a movie with Fraps there will be a noticable‚ impact on the game.‚ This is due to all the extra work involved in saving the screen data to disk.


<FONT color=#60ff70 size=+1>Can I put Fraps 1.9 on my webpage or include it with our magazine? </FONT>

Sure. This version is free of any restrictions. Feel free to reverse engineer, decompile, disassemble, alter, duplicate, make copies, create derivative works from, distribute or provide others copies of the software.

<A name=screen>
<H2>Screen Capture Questions</H2></A><FONT color=#60ff70 size=+1>What are the system requirements for screen capture? </FONT>

All PC's can perform screen capture. The only requirement is for the game to be running in 16-bit or 32-bit color mode. Some older games run in 8-bit (256 color) mode and are not supported by this software.


<FONT color=#60ff70 size=+1>How do I take a screenshot while running a game? </FONT>

First make sure you have enabled the screen capture option in the Fraps dialog. Then in the game press the Num Lock button when you want to take a screenshot. The current game screen will be saved as a bitmap (BMP) in your Fraps folder. Note that it is possible to change the key from Num Lock by entering another key in the hotkey box.


<FONT color=#60ff70 size=+1>Where are the screenshots I capture saved? </FONT>

The screenshots are stored in the directory you installed Fraps into. By default, this is C:\FRAPS


<FONT color=#60ff70 size=+1>Why is the filesize of screenshots so large? </FONT>

Fraps saves the screenshots in uncompressed bitmap (BMP) format. This is done so that people can get an exact representation of what's on screen with no loss of detail. If you are intending to place the images on the internet or transfer them to friends, then you should convert them to the lossy JPEG (JPG) format which is much smaller. Conversion is generally done by opening the BMP file in a paint program and saving it as a new image of JPG type. There are also programs that can do batch conversions for a large number of images.

<A name=video>
<H2>Video Capture Questions</H2></A><FONT color=#60ff70 size=+1>What are the system requirements for video capture of games? </FONT>

You need a fast system to make movies of your games in realtime. Below are the minimum specifications required to capture at decent framerates.



</P>
<MENU>
<LI>1 GHz+ CPU
<LI>Windows XP or Windows 2000
<LI>7200 rpm hard drive </MENU>Before capturing, your game should be configured to use the following screen resolution:
<MENU>
<LI>640x480x32bit (for DirectX & OpenGL games) </MENU>


Setting the color mode to 16-bit may improve the capture speed of older DirectX games.</P>Capturing games running in 8-bit (256 color) mode is not supported. You should also disable any form of anti-aliasing to ensure capture speeds are high.


<FONT color=#60ff70 size=+1>When I try to play the AVI file recorded by Fraps, no suitable codec can be found. Where can I find the correct codec? </FONT>

If you play the AVI in Windows Media Player it should connect to the Internet and download the appropriate codec for you. Alternatively you can install the following codec pack from Intel's website:

http://downloadfinder.intel.com/scripts-df/download.asp?url=/2846/eng/codinstl.exe (http://downloadfinder.intel.com/scripts-df/download.asp?url=/2846/eng/codinstl.exe)


<FONT color=#60ff70 size=+1>How do I record a movie while running a game? </FONT>

First make sure you have enabled the video capture option in the Fraps dialog. Then choose the target framerate for the movie, which indicates how many frames will be included in the movie each second. You can currently choose from 10, 15, 20, 25, or 30 fps.

In the game press the F9 button when you want to start recording. Press F9 again to stop recording. You will find the movie is saved as an AVI file in your Fraps folder. Note that it is possible to change the key from the default F9 by entering another key in the hotkey box.


<FONT color=#60ff70 size=+1>Where are the movies I capture saved? </FONT>

The movies are stored in the directory you installed Fraps into. By default, this is C:\FRAPS


<FONT color=#60ff70 size=+1>Why is the AVI movie generated by Fraps so big? How can I reduce the size? </FONT>

The filesize is big because there isn't enough time to encode the movie while the game is running. The movie frames are saved raw, which requires a large amount of disk space. Once you have finished capturing you should convert the saved AVI into one of the popular compressed movie formats such as mpeg or divx. Popular programs for doing this are tmpgenc (Tsunami Mpeg Encoder), and VirtualDub.

Using VirtualDub is quite easy. To create a compressed version of the AVI follow these steps:

<MENU>
<LI>Start VirtualDub
<LI>Select File->Open and choose the AVI in the Fraps directory you wish to compress.
<LI>Select Video->Compression and choose the codec you wish to compress with (usually divx)
<LI>Select File->Save As AVI and specify a filename for the new AVI. </MENU>
<FONT color=#60ff70 size=+1>When I replay the movie, it runs at double speed. How can I fix this? </FONT>

This occurs because Fraps is not able to capture at the speed you indicated and there is no support for frameskipping in the codec. You can try dropping the target framerate in the Fraps dialog to 15fps before starting the movie capture.‚ ‚ You can also try‚ running the game in 16-bit color mode.


<FONT color=#60ff70 size=+1>When I view the AVI movie I only see a quarter of the screen. How can I capture the entire screen area? </FONT>

Fraps can only currently capture at a maximum resolution of 640x480. Make sure that you configure the game to use this resolution before recording a movie. Also disable anti-aliasing if it is currently enabled.


<FONT color=#60ff70 size=+1>My video comes out too dark. How can I brighten it? </FONT>

A few games rely on gamma correction for their images.‚ Fraps will not do any gamma correction on the movie (for performance reasons).

You can use a program like VirtualDub to correct the video when you are compressing it. To do this you need to select Add Filter, and include a Levels filter. Adjusting the range will lighten/darken the image.


<FONT color=#60ff70 size=+1>Why can't you support resolutions greater than 640x480? </FONT>

Currently most AVI codecs support a maximum resolution of 640x480. There are a few which support larger sizes, however these are not suitable for realtime encoding. Work is currently underway for a replacement codec to work around existing limitations. This will be added to a future version of Fraps.


<FONT color=#60ff70 size=+1>My movie is only 2kb and won't play. What's wrong? </FONT>

When the movie capture hasn't worked it's usually because the game is running in 8-bit (256 color) mode. The game has to be running in 16-bit or 32-bit for movies to work. If you still have trouble, try waiting until the game has begun before starting the capture. Sometimes starting recording during the intro/movies can cause problems if the codec used in the film is not recognised by Fraps.


<FONT color=#60ff70 size=+1>My video stops recording at 4 gig. Why? </FONT>

There are file system limits that prevent files growing larger than 4 gigabytes. If you hit this limit the video index will not get written to the end of the file, and the movie won't play.

To avoid this problem, keep clips short. If you keep the recording under 5 minutes (for 30 fps setting), and under 15 minutes (for 10 fps setting) you will not hit the 4 gig limit.


<FONT color=#60ff70 size=+1>Where's the sound in my video? </FONT>

Fraps does not currently record sound. You could try and capture sound at the same time using a program like Total Recorder, and recombine it with the video stream using VirtualDub.


<FONT color=#60ff70 size=+1>How do I stop the frame rate counter being saved on my movies? </FONT>

The frame rate counter isn't saved on your movies.‚ ‚ What you are seeing is just Fraps showing the frame rate of your media player.‚ ‚ Exit Fraps before playing your videos and you should see clean images.

<A name=coders>
<H2>Coder questions</H2></A><FONT color=#60ff70 size=+1>Can I get the source to Fraps? </FONT>

I'm unable to release the source to Fraps as portions are used in commercial applications. However there's nothing to stop you reverse engineering the program yourself, and the tips below may tell you what you want to know.


<FONT color=#60ff70 size=+1>I'm trying to draw on the screen using GDI calls. I can see my text but it flickers badly. How can I fix this? </FONT>

This is a common problem that people encounter. It is quite easy to retrieve a handle to the active window and obtain a device context for the screen. You can then issue standard GDI calls and expect them to be drawn accordingly on the screen.

Unfortunately the flickering problem can't be avoided. The issue is caused by the fact that most games are double-buffered and GDI only supports single-buffered devices. Whenever you issue GDI calls they are always affecting the same buffer. If the game is double buffered you will see your text half the time, if it's triple buffered only a third. As far as I know there is no way to obtain a unique device context for the back buffers.


<FONT color=#60ff70 size=+1>How can I draw my own graphics on the screen? </FONT>

Unfortunately there is no simple way to draw graphics on screen. This part is therefore fairly technical. If you don't understand some of the terms I'd recommend doing a search for the keywords on google.

Fraps works by patching directly into the underlying graphics API. Doing things this way allows Fraps to issue graphics commands as if it were the game itself, avoiding having to do a large amount of setup beforehand. There are two techniques that can be used to hook into the API.

The first method is referred to as "API hooking". Basically you want to obtain the address of the graphics function in memory, and patch this such that your code will get called whenever the game tries to use this function.

The other method is to write a "DLL wrapper". Here you want to write your own DLL that exports the same functions as the graphics DLL. The idea is to rename the original DLL and put your DLL in its place. Then when your DLL is loaded, you proceed to load the original DLL and pass any function that is called through to it. Creating a DLL wrapper for DirectX is reasonably easy because there are only a few functions exported from the DLL. OpenGL however exports ALL of its API calls, which means that it can be very time consuming to build the stubs for all of the functions. If you want to pursue this method it may be easier to download and modify an existing OpenGL wrapper such as GLtrace.

When you have successfully hooked into the graphics API it is simply a matter of saving and restoring the state before and after you have issued your graphics commands. To learn how to draw graphics you should consult the DirectX and OpenGL SDK's.

Other ideas that you might want to pursue if you want something up and running quickly:

If it's only for one game, search through the game code for a function that displays text on screen. Most games have to output text at some stage, so utilising their routine may save you the hassle of implementing your own.

You could also try forcing the game to run in windowed mode. As an example, you could hook the CreateDevice function in DirectX8 and ensure that the Windowed flag is always set TRUE. With the game running in a window, you can draw in your own application alongside.

I have heard (but not verified) that it is possible to use DirectX overlays to draw on top of the game screen. This may be an easy option if performance is not an issue. Overlay documentation can be found in the DirectX SDK.


<FONT color=#60ff70 size=+1>How do I know when a new frame has been drawn? What functions must I hook? </FONT>

Hooking is currently performed on separate functions for DirectDraw, Direct3D8, and OpenGL. These are:

<MENU>
<LI>Flip (for DirectX 7 and earlier - DDRAW.DLL)
<LI>Present (for DirectX 8 - D3D8.DLL)
<LI>wglSwapBuffers (for OpenGL) </MENU>Note that DirectX is class based. This means that Flip and Present are not exported from the DLL directly. You must take the parent class and obtain the function pointers directly from an offset within the class (or subclasses). Consult the header files in the DX SDK in order to determine the offsets of the function pointers.


<FONT color=#60ff70 size=+1>How can I get access to the Fraps data in realtime? </FONT>

Starting with Fraps 1.9C it is possible to retreive realtime statistics such as current FPS and game name.‚ ‚ Fraps maps itself into all processes that use graphics (or have a GUI).

NOTE: Fraps is ONLY present in applications that have a GUI. Make sure you have created a GUI element such as a window or dialog before you try to query Fraps. If you are using a console app you can fake a GUI by issuing a MessageBox call upon startup. Fraps will then be mapped into this process and you can query the data as normal. I have included a MessageBox call in the C code below.

The data is shared in the following structure, where a DWORD is 4 bytes, and char is 1 byte.
<pre class="ip-ubbcode-code-pre">DWORD sizeOfStruct;
DWORD currentFPS;
DWORD totalFrames;
DWORD timeOfLastFrame;
char gameName[32];
</pre>A brief description for each element:

<MENU>
<LI>sizeOfStruct - is the size of this structure in bytes. This may increase in future versions when other variables are added.
<LI>currentFPS - is the current frame rate as displayed on screen by Fraps.
<LI>totalFrames - is the total number of frames rendered since the game began. This value will be reset to 0 when manual framerate logging is used, or when another game is loaded.
<LI>timeOfLastFrame - is the time in milliseconds that the last frame was rendered. This is the value returned by GetTickCount. You can use this value to determine when a game is active or not (by comparing it with the current value of GetTickCount).
<LI>gameName - is the name of the current game executable. </MENU>



All elements should be considered read only since Fraps can update them at any time.

Anyway, onto the samples. Here is C/C++ code to query the shared data.
</P>
<TABLE cellSpacing=2 cellPadding=10 width="100%" bgColor=#4682b4 border=1>
<TBODY>
<TR>
<TD><pre class="ip-ubbcode-code-pre">#include <stdio.h>
#include <windows.h>

struct FRAPS_SHARED_DATA {
DWORD sizeOfStruct;
DWORD currentFPS;
DWORD totalFrames;
DWORD timeOfLastFrame;
char gameName[32];
};

FRAPS_SHARED_DATA *(WINAPI *FrapsSharedData) ();

void main() {
HMODULE frapsDLL;
FRAPS_SHARED_DATA *fsd;

// This MessageBox is for console apps only to fake a GUI
MessageBox(NULL, "Fraps test", "Fraps", MB_OK);

frapsDLL = GetModuleHandle("FRAPS.DLL");
if (!frapsDLL) {
printf("Fraps not running!\r\n");
return;
}

(FARPROC &) FrapsSharedData = GetProcAddress(frapsDLL, "FrapsSharedData");
if (!FrapsSharedData) {
printf("Needs Fraps 1.9C or later!\r\n");
return;
}

printf("Fraps running\r\n");

fsd = FrapsSharedData();

printf("Shared data size: %d\r\n", fsd->sizeOfStruct);

printf("Game name: %s\r\n", fsd->gameName);
printf("Frame rate: %d\r\n", fsd->currentFPS);
printf("Total frames: %d\r\n", fsd->totalFrames);
printf("Time last frame drawn: %d\r\n", fsd->timeOfLastFrame);
printf("Current time: %d\r\n", GetTickCount());
}
</pre></TD></TR></TBODY></TABLE>



Matthew Augier from LCDC (http://www.lcdc.cc/) has kindly provided equivalent Delphi code.</P><pre class="ip-ubbcode-code-pre"><TABLE cellSpacing=2 cellPadding=10 width="100%" bgColor=#4682b4 border=1><TBODY><TR><TD><PRE>Type
tFrapsData = Record
sizeOfStruct : dword;
currentFPS : dword;
totalFrames : dword;
timeOfLastFrame : dword;
gameName : Array[0..29] of Char;
End;
pFrapsData = ^tFrapsData;

Var
frapsDLLBase : tHandle;
frapsDataGet :Function:pFrapsData;StdCall;
x : pFrapsData;

begin
Memo1.Lines.Clear;
frapsDLLbase := GetModuleHandle('FRAPS.DLL');
if (frapsDLLbase = NULL) or (FrapsDLLBase=0) Then Begin
Memo1.Lines.add('Fraps not running!');
Exit;
End;

FrapsDataGet := GetProcAddress(frapsDLLbase,'FrapsSharedData');
If not Assigned(FrapsDataGet) Then Begin
Memo1.Lines.add('Needs Fraps 1.9C or later!');
Exit;
End;

Memo1.Lines.add('Fraps running');
x := FrapsDataGet;
With x^ Do Begin
memo1.Lines.Add('Size:'+IntToStr(sizeOfStruct));
memo1.Lines.Add('FPS:'+IntToStr(currentFPS));
memo1.Lines.Add('Total frames:'+IntToStr(totalFrames));
memo1.Lines.Add('Last time:'+IntToStr(timeOfLastFrame));
memo1.Lines.Add('Name:'+gameName);
End;
End;
</pre></TD></TR></TBODY></TABLE></PRE>



<HR>

</BASEFONT>
</TD>
</TR></TABLE>





http://members.chello.se/ven/milton.jpg

XyZspineZyX
10-14-2003, 09:53 PM
I took the liberty to post the releasenotes for fraps 1.9D as many has already asked questions answered within that.

Hope I don't break any copyright or anything.



<TABLE border="0" width="100%" cellpadding="20" cellspacing="0">
<TR>
<TD align="left" valign="top">
<BASEFONT SIZE="3"><FONT face="Verdana, Arial, Helvetica" POINT-SIZE="12" WEIGHT="100">
<H2><FONT COLOR="#60ff70">FRAPS 1.9D RELEASE NOTES</FONT></H2>
The system requirements for this version of Fraps are:
<MENU>
<LI>DirectX 8.1 or later
<LI>Pentium MMX or later
<LI>Windows 95/98/ME/NT/2K/XP
</MENU>
This version of Fraps has been developed with the 43.45 Detonators for Geforce cards, and the 3.2 Catalysts for Radeon cards.‚ ‚ Please make sure your installed video card drivers are at least these versions!‚ ‚ Earlier drivers may suffer performance problems.


<HR>
<H2><FONT COLOR="#60ff70">Frequently Asked Questions</FONT></H2>


The questions are organised into four sections.‚ ‚ Please choose the appropriate part below:

<A href="#general"></P>
<H2><FONT color=#ffffff>General Questions</FONT></H2></A><A href="#screen">
<H2><FONT color=#ffffff>Screen Capture Questions</FONT></H2></A><A href="#video">
<H2><FONT color=#ffffff>Video Capture Questions</FONT></H2></A><A href="#coders">
<H2><FONT color=#ffffff>Coder Questions</FONT></H2></A>


<CENTER>http://members.chello.se/ven/screen.png </CENTER>



<A name=general>



<H2>General Questions</H2></A><FONT color=#60ff70 size=+1>What do all the options do? </FONT>

The‚ top part of the Fraps dialog is dedicated to the options for the ingame framerate counter.


</P>


The frame rate can be set to continuously update or only update‚ its' value once a‚ second.

The overlay style specifies whether the counter is drawn on top of the game screen (transparent), or is drawn on a black background (opaque). Setting this option to opaque may be useful if you are having trouble distinguishing the text from the game's background.

The overlay corner indicates the region of the screen that the framerate counter will be displayed in. Choose a corner that doesn't obstruct the game's display.</P>


Movie options let you specify the hotkey‚ for recording videos while playing your games.‚ You can also specify the speed of the movie.</P>


The advanced options let you specify a hotkey to take screen captures, as well as a hotkey to save frame rate data to a‚ file.</P>



<FONT color=#60ff70 size=+1>How can I average the framerate between two points? </FONT>

While in the game press the Scroll Lock button. This will mark the start of where averaging is to take place. A green box is displayed to let you know that logging has begun. When you want to stop, press Scroll Lock again. The average framerate will now be displayed in a red box. Full details are also saved in the file FRAPSLOG.TXT in your Fraps folder. Note that it is possible to change the key from Scroll Lock by entering another key in the hotkey box.


<FONT color=#60ff70 size=+1>What is the maximum framerate Fraps will show? </FONT>

Fraps will show a maximum framerate of 999 fps on screen. If you need to know precise framerates above this you must use manual logging and find out the value from FRAPSLOG.TXT.


<FONT color=#60ff70 size=+1>Why doesn't Fraps show above 30fps, 60fps, 75 fps (or any other framerate) in my game? </FONT>

This can be due to several reasons.

Many games have internal limits that prevent them rendering faster than a certain framerate. In some cases this can mean they are locked at a maximum framerate of only 30fps.

Another possibility is that you have Vsync enabled. Vsync is used to synchronise the output of your graphics card with the display of your monitor. When your graphics card has finished rendering the next frame it waits for the monitor to finish displaying the current one before switching to the new one. This means that the maximum framerate you can obtain will be equal to the refresh rate of your monitor (which is usually 60hz, 75hz, 85hz, or 100hz).

If you disable Vsync then your graphics card will continuously render without waiting for the last frame to be displayed in its entirety. With fast graphics cards this means that your monitor may switch to a new frame halfway down the screen. This effect is known as tearing as there appears to be a visible line separating two different halves. Due to this, you should generally leave Vsync enabled except when benchmarking.

Finally, WindowsXP is said to have internal limits of 75fps for DirectX games, and 60fps for OpenGL games. It is possible to download refresh rate fixes to work around this limitation.


<FONT color=#60ff70 size=+1>Does Fraps have a performance impact on the game? </FONT>

There is a small overhead associated with drawing the framerate on screen. This may vary depending on your system configuration, but should remain relatively minimal. The best way to measure it on your own system is to find a game that allows you to benchmark it and compare the results obtained with and without Fraps loaded. </P>


</P>


</P>


When you are recording a movie with Fraps there will be a noticable‚ impact on the game.‚ This is due to all the extra work involved in saving the screen data to disk.


<FONT color=#60ff70 size=+1>Can I put Fraps 1.9 on my webpage or include it with our magazine? </FONT>

Sure. This version is free of any restrictions. Feel free to reverse engineer, decompile, disassemble, alter, duplicate, make copies, create derivative works from, distribute or provide others copies of the software.

<A name=screen>
<H2>Screen Capture Questions</H2></A><FONT color=#60ff70 size=+1>What are the system requirements for screen capture? </FONT>

All PC's can perform screen capture. The only requirement is for the game to be running in 16-bit or 32-bit color mode. Some older games run in 8-bit (256 color) mode and are not supported by this software.


<FONT color=#60ff70 size=+1>How do I take a screenshot while running a game? </FONT>

First make sure you have enabled the screen capture option in the Fraps dialog. Then in the game press the Num Lock button when you want to take a screenshot. The current game screen will be saved as a bitmap (BMP) in your Fraps folder. Note that it is possible to change the key from Num Lock by entering another key in the hotkey box.


<FONT color=#60ff70 size=+1>Where are the screenshots I capture saved? </FONT>

The screenshots are stored in the directory you installed Fraps into. By default, this is C:\FRAPS


<FONT color=#60ff70 size=+1>Why is the filesize of screenshots so large? </FONT>

Fraps saves the screenshots in uncompressed bitmap (BMP) format. This is done so that people can get an exact representation of what's on screen with no loss of detail. If you are intending to place the images on the internet or transfer them to friends, then you should convert them to the lossy JPEG (JPG) format which is much smaller. Conversion is generally done by opening the BMP file in a paint program and saving it as a new image of JPG type. There are also programs that can do batch conversions for a large number of images.

<A name=video>
<H2>Video Capture Questions</H2></A><FONT color=#60ff70 size=+1>What are the system requirements for video capture of games? </FONT>

You need a fast system to make movies of your games in realtime. Below are the minimum specifications required to capture at decent framerates.



</P>
<MENU>
<LI>1 GHz+ CPU
<LI>Windows XP or Windows 2000
<LI>7200 rpm hard drive </MENU>Before capturing, your game should be configured to use the following screen resolution:
<MENU>
<LI>640x480x32bit (for DirectX & OpenGL games) </MENU>


Setting the color mode to 16-bit may improve the capture speed of older DirectX games.</P>Capturing games running in 8-bit (256 color) mode is not supported. You should also disable any form of anti-aliasing to ensure capture speeds are high.


<FONT color=#60ff70 size=+1>When I try to play the AVI file recorded by Fraps, no suitable codec can be found. Where can I find the correct codec? </FONT>

If you play the AVI in Windows Media Player it should connect to the Internet and download the appropriate codec for you. Alternatively you can install the following codec pack from Intel's website:

http://downloadfinder.intel.com/scripts-df/download.asp?url=/2846/eng/codinstl.exe (http://downloadfinder.intel.com/scripts-df/download.asp?url=/2846/eng/codinstl.exe)


<FONT color=#60ff70 size=+1>How do I record a movie while running a game? </FONT>

First make sure you have enabled the video capture option in the Fraps dialog. Then choose the target framerate for the movie, which indicates how many frames will be included in the movie each second. You can currently choose from 10, 15, 20, 25, or 30 fps.

In the game press the F9 button when you want to start recording. Press F9 again to stop recording. You will find the movie is saved as an AVI file in your Fraps folder. Note that it is possible to change the key from the default F9 by entering another key in the hotkey box.


<FONT color=#60ff70 size=+1>Where are the movies I capture saved? </FONT>

The movies are stored in the directory you installed Fraps into. By default, this is C:\FRAPS


<FONT color=#60ff70 size=+1>Why is the AVI movie generated by Fraps so big? How can I reduce the size? </FONT>

The filesize is big because there isn't enough time to encode the movie while the game is running. The movie frames are saved raw, which requires a large amount of disk space. Once you have finished capturing you should convert the saved AVI into one of the popular compressed movie formats such as mpeg or divx. Popular programs for doing this are tmpgenc (Tsunami Mpeg Encoder), and VirtualDub.

Using VirtualDub is quite easy. To create a compressed version of the AVI follow these steps:

<MENU>
<LI>Start VirtualDub
<LI>Select File->Open and choose the AVI in the Fraps directory you wish to compress.
<LI>Select Video->Compression and choose the codec you wish to compress with (usually divx)
<LI>Select File->Save As AVI and specify a filename for the new AVI. </MENU>
<FONT color=#60ff70 size=+1>When I replay the movie, it runs at double speed. How can I fix this? </FONT>

This occurs because Fraps is not able to capture at the speed you indicated and there is no support for frameskipping in the codec. You can try dropping the target framerate in the Fraps dialog to 15fps before starting the movie capture.‚ ‚ You can also try‚ running the game in 16-bit color mode.


<FONT color=#60ff70 size=+1>When I view the AVI movie I only see a quarter of the screen. How can I capture the entire screen area? </FONT>

Fraps can only currently capture at a maximum resolution of 640x480. Make sure that you configure the game to use this resolution before recording a movie. Also disable anti-aliasing if it is currently enabled.


<FONT color=#60ff70 size=+1>My video comes out too dark. How can I brighten it? </FONT>

A few games rely on gamma correction for their images.‚ Fraps will not do any gamma correction on the movie (for performance reasons).

You can use a program like VirtualDub to correct the video when you are compressing it. To do this you need to select Add Filter, and include a Levels filter. Adjusting the range will lighten/darken the image.


<FONT color=#60ff70 size=+1>Why can't you support resolutions greater than 640x480? </FONT>

Currently most AVI codecs support a maximum resolution of 640x480. There are a few which support larger sizes, however these are not suitable for realtime encoding. Work is currently underway for a replacement codec to work around existing limitations. This will be added to a future version of Fraps.


<FONT color=#60ff70 size=+1>My movie is only 2kb and won't play. What's wrong? </FONT>

When the movie capture hasn't worked it's usually because the game is running in 8-bit (256 color) mode. The game has to be running in 16-bit or 32-bit for movies to work. If you still have trouble, try waiting until the game has begun before starting the capture. Sometimes starting recording during the intro/movies can cause problems if the codec used in the film is not recognised by Fraps.


<FONT color=#60ff70 size=+1>My video stops recording at 4 gig. Why? </FONT>

There are file system limits that prevent files growing larger than 4 gigabytes. If you hit this limit the video index will not get written to the end of the file, and the movie won't play.

To avoid this problem, keep clips short. If you keep the recording under 5 minutes (for 30 fps setting), and under 15 minutes (for 10 fps setting) you will not hit the 4 gig limit.


<FONT color=#60ff70 size=+1>Where's the sound in my video? </FONT>

Fraps does not currently record sound. You could try and capture sound at the same time using a program like Total Recorder, and recombine it with the video stream using VirtualDub.


<FONT color=#60ff70 size=+1>How do I stop the frame rate counter being saved on my movies? </FONT>

The frame rate counter isn't saved on your movies.‚ ‚ What you are seeing is just Fraps showing the frame rate of your media player.‚ ‚ Exit Fraps before playing your videos and you should see clean images.

<A name=coders>
<H2>Coder questions</H2></A><FONT color=#60ff70 size=+1>Can I get the source to Fraps? </FONT>

I'm unable to release the source to Fraps as portions are used in commercial applications. However there's nothing to stop you reverse engineering the program yourself, and the tips below may tell you what you want to know.


<FONT color=#60ff70 size=+1>I'm trying to draw on the screen using GDI calls. I can see my text but it flickers badly. How can I fix this? </FONT>

This is a common problem that people encounter. It is quite easy to retrieve a handle to the active window and obtain a device context for the screen. You can then issue standard GDI calls and expect them to be drawn accordingly on the screen.

Unfortunately the flickering problem can't be avoided. The issue is caused by the fact that most games are double-buffered and GDI only supports single-buffered devices. Whenever you issue GDI calls they are always affecting the same buffer. If the game is double buffered you will see your text half the time, if it's triple buffered only a third. As far as I know there is no way to obtain a unique device context for the back buffers.


<FONT color=#60ff70 size=+1>How can I draw my own graphics on the screen? </FONT>

Unfortunately there is no simple way to draw graphics on screen. This part is therefore fairly technical. If you don't understand some of the terms I'd recommend doing a search for the keywords on google.

Fraps works by patching directly into the underlying graphics API. Doing things this way allows Fraps to issue graphics commands as if it were the game itself, avoiding having to do a large amount of setup beforehand. There are two techniques that can be used to hook into the API.

The first method is referred to as "API hooking". Basically you want to obtain the address of the graphics function in memory, and patch this such that your code will get called whenever the game tries to use this function.

The other method is to write a "DLL wrapper". Here you want to write your own DLL that exports the same functions as the graphics DLL. The idea is to rename the original DLL and put your DLL in its place. Then when your DLL is loaded, you proceed to load the original DLL and pass any function that is called through to it. Creating a DLL wrapper for DirectX is reasonably easy because there are only a few functions exported from the DLL. OpenGL however exports ALL of its API calls, which means that it can be very time consuming to build the stubs for all of the functions. If you want to pursue this method it may be easier to download and modify an existing OpenGL wrapper such as GLtrace.

When you have successfully hooked into the graphics API it is simply a matter of saving and restoring the state before and after you have issued your graphics commands. To learn how to draw graphics you should consult the DirectX and OpenGL SDK's.

Other ideas that you might want to pursue if you want something up and running quickly:

If it's only for one game, search through the game code for a function that displays text on screen. Most games have to output text at some stage, so utilising their routine may save you the hassle of implementing your own.

You could also try forcing the game to run in windowed mode. As an example, you could hook the CreateDevice function in DirectX8 and ensure that the Windowed flag is always set TRUE. With the game running in a window, you can draw in your own application alongside.

I have heard (but not verified) that it is possible to use DirectX overlays to draw on top of the game screen. This may be an easy option if performance is not an issue. Overlay documentation can be found in the DirectX SDK.


<FONT color=#60ff70 size=+1>How do I know when a new frame has been drawn? What functions must I hook? </FONT>

Hooking is currently performed on separate functions for DirectDraw, Direct3D8, and OpenGL. These are:

<MENU>
<LI>Flip (for DirectX 7 and earlier - DDRAW.DLL)
<LI>Present (for DirectX 8 - D3D8.DLL)
<LI>wglSwapBuffers (for OpenGL) </MENU>Note that DirectX is class based. This means that Flip and Present are not exported from the DLL directly. You must take the parent class and obtain the function pointers directly from an offset within the class (or subclasses). Consult the header files in the DX SDK in order to determine the offsets of the function pointers.


<FONT color=#60ff70 size=+1>How can I get access to the Fraps data in realtime? </FONT>

Starting with Fraps 1.9C it is possible to retreive realtime statistics such as current FPS and game name.‚ ‚ Fraps maps itself into all processes that use graphics (or have a GUI).

NOTE: Fraps is ONLY present in applications that have a GUI. Make sure you have created a GUI element such as a window or dialog before you try to query Fraps. If you are using a console app you can fake a GUI by issuing a MessageBox call upon startup. Fraps will then be mapped into this process and you can query the data as normal. I have included a MessageBox call in the C code below.

The data is shared in the following structure, where a DWORD is 4 bytes, and char is 1 byte.
<pre class="ip-ubbcode-code-pre">DWORD sizeOfStruct;
DWORD currentFPS;
DWORD totalFrames;
DWORD timeOfLastFrame;
char gameName[32];
</pre>A brief description for each element:

<MENU>
<LI>sizeOfStruct - is the size of this structure in bytes. This may increase in future versions when other variables are added.
<LI>currentFPS - is the current frame rate as displayed on screen by Fraps.
<LI>totalFrames - is the total number of frames rendered since the game began. This value will be reset to 0 when manual framerate logging is used, or when another game is loaded.
<LI>timeOfLastFrame - is the time in milliseconds that the last frame was rendered. This is the value returned by GetTickCount. You can use this value to determine when a game is active or not (by comparing it with the current value of GetTickCount).
<LI>gameName - is the name of the current game executable. </MENU>



All elements should be considered read only since Fraps can update them at any time.

Anyway, onto the samples. Here is C/C++ code to query the shared data.
</P>
<TABLE cellSpacing=2 cellPadding=10 width="100%" bgColor=#4682b4 border=1>
<TBODY>
<TR>
<TD><pre class="ip-ubbcode-code-pre">#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;

struct FRAPS_SHARED_DATA {
DWORD sizeOfStruct;
DWORD currentFPS;
DWORD totalFrames;
DWORD timeOfLastFrame;
char gameName[32];
};

FRAPS_SHARED_DATA *(WINAPI *FrapsSharedData) ();

void main() {
HMODULE frapsDLL;
FRAPS_SHARED_DATA *fsd;

// This MessageBox is for console apps only to fake a GUI
MessageBox(NULL, "Fraps test", "Fraps", MB_OK);

frapsDLL = GetModuleHandle("FRAPS.DLL");
if (!frapsDLL) {
printf("Fraps not running!\r\n");
return;
}

(FARPROC &) FrapsSharedData = GetProcAddress(frapsDLL, "FrapsSharedData");
if (!FrapsSharedData) {
printf("Needs Fraps 1.9C or later!\r\n");
return;
}

printf("Fraps running\r\n");

fsd = FrapsSharedData();

printf("Shared data size: %d\r\n", fsd-&gt;sizeOfStruct);

printf("Game name: %s\r\n", fsd-&gt;gameName);
printf("Frame rate: %d\r\n", fsd-&gt;currentFPS);
printf("Total frames: %d\r\n", fsd-&gt;totalFrames);
printf("Time last frame drawn: %d\r\n", fsd-&gt;timeOfLastFrame);
printf("Current time: %d\r\n", GetTickCount());
}
</pre></TD></TR></TBODY></TABLE>



Matthew Augier from LCDC (http://www.lcdc.cc/) has kindly provided equivalent Delphi code.</P><pre class="ip-ubbcode-code-pre">&lt;TABLE cellSpacing=2 cellPadding=10 width="100%" bgColor=#4682b4 border=1&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE&gt;Type
tFrapsData = Record
sizeOfStruct : dword;
currentFPS : dword;
totalFrames : dword;
timeOfLastFrame : dword;
gameName : Array[0..29] of Char;
End;
pFrapsData = ^tFrapsData;

Var
frapsDLLBase : tHandle;
frapsDataGet :Function:pFrapsData;StdCall;
x : pFrapsData;

begin
Memo1.Lines.Clear;
frapsDLLbase := GetModuleHandle('FRAPS.DLL');
if (frapsDLLbase = NULL) or (FrapsDLLBase=0) Then Begin
Memo1.Lines.add('Fraps not running!');
Exit;
End;

FrapsDataGet := GetProcAddress(frapsDLLbase,'FrapsSharedData');
If not Assigned(FrapsDataGet) Then Begin
Memo1.Lines.add('Needs Fraps 1.9C or later!');
Exit;
End;

Memo1.Lines.add('Fraps running');
x := FrapsDataGet;
With x^ Do Begin
memo1.Lines.Add('Size:'+IntToStr(sizeOfStruct));
memo1.Lines.Add('FPS:'+IntToStr(currentFPS));
memo1.Lines.Add('Total frames:'+IntToStr(totalFrames));
memo1.Lines.Add('Last time:'+IntToStr(timeOfLastFrame));
memo1.Lines.Add('Name:'+gameName);
End;
End;
</pre></TD></TR></TBODY></TABLE></PRE>



<HR>

</BASEFONT>
</TD>
</TR></TABLE>





http://members.chello.se/ven/milton.jpg

XyZspineZyX
10-14-2003, 09:57 PM
Thanks dude... it'll sure save me some time

<center>
http://users.urbi.com.br/leocosta/images/jbkfbsig00.jpg

-= A.K.A. ====> [b]Jambock__16 in HyperLobby =-
ICQ - UIN#13080406



Graphics and Design by: Resev
Personal Avatar by: Kyrodus (Jambock__56)
Senta √° Pua!

1‚¬ļ GAvCaVi: http://www.gavca.com (1st Brazilian Virtual Fighter Sqdr "Senta √ P√¬ļa!")</center>

XyZspineZyX
10-14-2003, 09:59 PM
U lazy. If u got fraps 1.9D installed just launch it and hit the Help button, duh! /i/smilies/16x16_smiley-happy.gif

http://members.chello.se/ven/milton.jpg

XyZspineZyX
10-14-2003, 10:06 PM
guilty as charged...

But I don't remember which version of it I have...

<center>
http://users.urbi.com.br/leocosta/images/jbkfbsig00.jpg

-= A.K.A. ====> [b]Jambock__16 in HyperLobby =-
ICQ - UIN#13080406



Graphics and Design by: Resev
Personal Avatar by: Kyrodus (Jambock__56)
Senta √° Pua!

1‚¬ļ GAvCaVi: http://www.gavca.com (1st Brazilian Virtual Fighter Sqdr "Senta √ P√¬ļa!")</center>

XyZspineZyX
10-24-2003, 07:48 PM
Bump. Hope noone minds.

____________________

Vengeanze