ReTox
Member
+100|6728|State of RETOXification
Hello!


Table of Contents -
PreambleOptimizationsCapturingEditing (Brief Intro/Recommendations)Conversion/Compression (The Free Way - AVI Only)Conversion/Compression (With Commercial Tools)Conclusion


Preamble -

I've been seeing a lot of questions about Fraps on the forums and thought it would be good idea to write up a "How-To" for capping and converting (compressing) your game footage.  I've been involved with digital video since the late 80's including 3D, AB Roll, Avid, Chroma-Keying (Greenscreen), etc, etc.  I'll gladly answer any questions you have in regards to Fraps and video in general but hopefully this little tutorial will cover the basics and get you running with Fraps.  So let's get started!

Fraps (http://www.fraps.com) is a type of program called a "hook".  A hook is any program that, without an exposed interface or API, can access data inside another program.  A bad type of hook is a keylogger.  Fraps works by accessing the DirectX frame buffers and copying the front buffer to an AVI stream.  Since most games run > 30 FPS this is a staggeringly huge amount of data to try to squeeze out of free CPU cycles.  There are things we can do to get the best results though.


Optimizations -

Fraps uses a slightly compressed format to save space but the files are still going to be massive.  Full compression of streaming data in real-time is just not possible currently without a hardware device so be sure to have major amounts of free Gigs on your drive.  I have a 200 GB drive I use just for capturing and working with video.  It is also very important to keep your capture drive defragmented.  Best to do a defrag before capturing every time. You don't want to drop frames because of seek times.

Before you actually start capturing you need to identify your target for the final video.  Are you making a web movie for You-Tube or do you plan to make your own DVD?  This is very important because we can increase the quality of our renders if we know the destination format.  Capturing your game footage at full resolution when you're making an iPod video is major overkill and you'll actually get poorer results than using the correct resolution.  Basically, you want to be as close to your destination video size as possible.  To show what I mean look at these two images from UT2004:

https://www.toxic-nation.com/toxicnation/images/ut2K4_maul_1280_resized_to_320.png  https://www.toxic-nation.com/toxicnation/images/ut2K4_maul_640_resized_to_320.png

Both are from the exact same frame but the one on the left is 1280x1024 resized to 320x240, the one on the right is 640x480 resized to 320x240.  The left image has many artifacts and if you look closely at the grass you'll see the jagged edges.  The right image doesn't have this to such an extreme.

You might not care too much because the left image still looks OK but when you get to the compression stage it will matter.  Most encoders work by finding areas that share the same colour values and then it can strip some data out.  Artifacts in areas of the same colour or luminance value take up data that would otherwise be removed.  Since an artifact can exist on every frame you can quickly start to lose efficiency and your resulting file will be bigger than it needs to be.  Or even worse, legitimate data will be sacrificed to make way for the artifact's data.  This is bad.

So we identify our target size and then try to match our game video size to that.  I wouldn't go below 640x480 though if you are capturing live game action.  If your game allows for a Battle-Recorder than I recommend you use it and Fraps the replay.  Input polling for the keyboard and mouse take up CPU cycles and slow Fraps down slightly so there is an advantage to using a Battle-Recorder system.  The other HUGE advantage of a smaller screen size is that you can crank up the eye candy including AA and AF to get the best results.  You will likely also get more frames which, if your PC can do it, will allow for 60 FPS captures instead of 30 FPS.  Doubling the frame rate allows for smoother action when converting/compressing.


Capturing -

Not too much I can really say here, Fraps does the work.  I would recommend you selectively capture your footage instead of trying to grab a whole game in one file.  The files will all be the same format so merging them is really easy and you'll save drive space.

It's also important to go through and find the optimal balance of eye candy vs performance.  You want the get the best results you can and that takes playing with the settings for both Fraps (only a few settings) and the game (lots of settings).  This can take quite some time but once you are comfortable with it you'll be able to find the capturing sweet spot pretty quickly for any game.

One of the major factors to Fraps being able to make good captures is the frame rate at which it scans the DirectX buffers.  I try to capture at 60 FPS but that is mainly so I can perform time-stretching effects more easily and smoothly (more data means it's easier to generate between screens) but don't feel you need to.  If all you want to do is show the game footage then use 30 FPS.

Also, note that Fraps will automatically half size your video captures if your PC can't keep up.  If you find your captures are smaller in width and height than your game settings that is why.  Adjust your game to a lower resolution and try cranking up the anti-aliasing and anisotropic filtering.  Hi res doesn't always equate to better quality.  The goal should be to find the sweet spot, that place where quality and frame rate are optimized for Fraps not for game play.

I also recommend, unless you are dropping frames, to capture the game audio.  Being able to edit the audio to have explosions and gun fire over top of your music can really make a big difference.  You don't want to have all the audio over the music, just the selective stuff that makes the video unique and special.  Games like UT have the game announcer for when you get head-shots, multi-kills, etc.  Those make a game video a lot more fun to watch/listen to.


Editing in Brief -

Editing could EASILY be a whole other topic, likely an entire forum, because there are sooo many things you can do with the right software.  Transitions, effects, etc. can all make or break a video.

One note though, since most game videos are put to music I recommend writing out a timeline of changes in the music (from chorus to refrain, etc).  Click here for a full list of music terms to help you know the transitions.  Identifying the transitions in your music will allow you to make transitions in the video to match.  Thus making your video "pop".


Conversion / Compression - Free AVI Tools

There are some seriously cool free video tools out there.  My personal favourite is a combination of Avery Lee's VirtualDub, a linear video editor, and AviSynth which is a frame serving scripting tool par excellence.  Not everyone can afford the commercial stuff so hopefully this will help those that need to use free tools.  To be honest, I use VirtualDub more than any other video tool I have.

The beauty of these tools is that they are Open-Source and the community is massive so there is always newer and better features being added.  And the existing ones are already impressive so they're really top notch tools.

I'm not going to go into AviSynth much here, the link I gave has tonnes of resources for it and you'll quickly see the power if you read through the wiki.  VirtualDub though I will show.  So download it if you want to go the free route and I will show you how to compress a video file.  VirtualDub has some editing features but it is linear based on a single stream (no transitions between video files).  If you are a VirtualDub master than you know you can get some decent editing done but it takes more time and ingenuity than commercial systems.  If you need to edit a lot I recommend using a commercial program.

Here's Vdub:

https://www.toxic-nation.com/toxicnation/images/vDubMod_small.jpg

The best thing about VirtualDub, imo, is that it allows for multi-pass encoding.  This is a technique of data distribution where an encoder (like Xvid) would run through the video on a first pass to get data on the structure of the video.  The encoder than does other passes to distribute the bitrate as best as possible.  If you have ever watched a video where it is smooth and then you see some fast movement and there is all kinds of blocking and jaggedness then you are watching a poorly encoded video.  Multi-pass encoding helps stop that.

VDub works on the various streams in an AVI file, this includes video, audio, and subtitles.  For this example I am going to take some COD4 footage and compress it as a multi-pass encoded XVID.  Here is VDUB with my COD4 footage:

https://www.toxic-nation.com/toxicnation/images/COD4_001_small.jpg

To load up the encoding options hit CTRL-P.  A list of all the video encoders available (note that this does not include DirectShow based encoders, only VFW).  Select the one you want (I'm using XVID) and click the Configure button:

https://www.toxic-nation.com/toxicnation/images/encoder_selection.jpg

You'll then see the encoder options for the selected encoder.  For XVID I want to use a decent bitrate.  The bitrate determines how much data is available per second.  The larger the bitrate the larger the file and usually the better the quality.  I like a bitrate of around 1000 bps for every 320 pixels width I encode.  320x240 = 1000 bps, 640x480 = 2000 bps, etc.  My video is 640x480 so I will use 2000 bps on the encoder. Since I am doing a two-pass encode I only need the bitrate for the last pass.  The first pass is only a discovery pass the second is the actual encoding pass.

VirtualDub uses a job manager to facilitate the multiple pass encoding.  Each time you set the compression you'll need to save the video file to the manager.  This is done by saving the file but on the save file dialog choosing the check box to run the job later:

https://www.toxic-nation.com/toxicnation/images/save_diag.jpg

As I mentioned, you need to save the file (press F7) for each pass and each save must be a different file name so here are the settings dialogs for Xvid:

https://www.toxic-nation.com/toxicnation/images/xvid_01.jpg  https://www.toxic-nation.com/toxicnation/images/xvid_02.jpg

To open the Job Control press F4.  Then just hit Start and away VirtualDub goes doing it's thing.  When you're done you'll have an AVI about 1/10th the size of the original and the exact same quality.


Conversion / Compression - Commercial

Commercial tools will likely yield the best results unless you are a video master.  There are soo many different programs out there that I couldn't possibly write about them all.  I use Premier but that is for serious video, Pinnacle Studio, Sony Vegas are more affordable and offer great features and quality.

Premiere Pro 2.0 Tutorial coming soon


Conclusion

So there it is.  A basic intro to using and converting Fraps captures.  I hope it helped a bit.



Happy Capping!

ReTox.

Last edited by ReTox (2008-03-02 08:55:45)

.Sup
be nice
+2,646|6682|The Twilight Zone
I also use Virtual Dub. Good effort. +1
https://www.shrani.si/f/3H/7h/45GTw71U/untitled-1.png
Funky_Finny
Banned
+456|6361|Carnoustie, Scotland
Hmm. Makes me want to play UT2004.






brb.
CruZ4dR
Cereal Killer
+145|6885|The View From The Afternoon
well done +1
DefCon-17
Maple Syrup Faggot
+362|6385|Vancouver | Canada
Now I gotta go make a movie..

Nice guide.

Board footer

Privacy Policy - © 2024 Jeff Minard