PDA

View Full Version : Real-time gameplay video using FRAPS


Pages : [1] 2

MikeC
07-31-04, 09:19 PM
Roderick Maher has done a great job with the ongoing enhancements to the video recording capabilities in FRAPS (http://www.fraps.com). A couple of recent changes that have improved the performance of capturing video are support for the AMD64 platform and DirectX 9.0c.

http://www.nvnews.net/videos/tools/fraps.png

The FRAPS video decompressor is capable of generating high quality audio/video (AVI) files, although the files can become quite large. For example, an uncompressed video from a 20 second recording of Painkiller was close to 150 MB.

However, with the freeware program VirtualDub (http://virtualdub.sourceforge.net) and XviD's MPEG-4 codec (http://www.doom9.org/Soft21/Codecs/XviD-1.0.1-05062004.exe), I compressed the video files down to 7 MB while retaining a good quality.

http://www.nvnews.net/videos/tools/virtual_dub.jpg

Video is an excellent way to demonstrate certain features of a graphics card as we did last year in a review of Creative's 3D Blaster 5 FX5900 Ultra (http://www.nvnews.net/reviews/3dblaster_fx_5900_ultra/page_3.shtml). It is also helpful for demonstrating gameplay scenarios that are used for benchmarking purposes. For example, the following three videos were created from key sections in a gameplay scenerio I've been developing in Painkiller.

I configured FRAPS to record video at half the size of the in-game resolution of 1280x960 at 25 fps. Although in-game graphics options were at their maximum quality, antialiasing and anisotropic filtering were disabled during the recording.

Each video is 512x384 and around 7 MB in size.

XviD MPEG-4 Video 1 (http://www.nvnews.net/videos/painkiller/painkiller_xvid_mpeg-4_01.avi) - 7.76 MB
XviD MPEG-4 Video 2 (http://www.nvnews.net/videos/painkiller/painkiller_xvid_mpeg-4_02.avi) - 6.45 MB
XviD MPEG-4 Video 3 (http://www.nvnews.net/videos/painkiller/painkiller_xvid_mpeg-4_03.avi) - 7.09 MB

You may need to install the XviD MPEG-4 codec (http://www.doom9.org/Soft21/Codecs/XviD-1.0.1-05062004.exe) - 617 KB.

Update:

I used the freeware program TMPGEnc (http://www.tmpgenc.net/e_main.html) to create the following MPEG-1 video clips.

http://www.nvnews.net/videos/tools/tmpg_enc.jpg

Each video is 312x240 and around 2.5 MB in size.

MPEG-1 Video Clip 1 (http://www.nvnews.net/videos/painkiller/painkiller_01.mpg)
MPEG-1 Video Clip 2 (http://www.nvnews.net/videos/painkiller/painkiller_02.mpg)
MPEG-1 Video Clip 3 (http://www.nvnews.net/videos/painkiller/painkiller_03.mpg)

MPEG-1 is a standard codec in Windows Media Player.

Note that the full version of FRAPS is needed to access all of the video capture features!

The information at VideoHelp.com (http://www.videohelp.com/) was very helpful for this project.

Next game: Doom 3!

stncttr908
07-31-04, 11:05 PM
Nice explanation. I'll have to reinstall FRAPS.

SH64
08-01-04, 08:32 AM
Look like you had fun blasting them priest monsters ! :rw: :D

that was a good "show" & info Mike ! :)

You know what ? i think this might be a good concept for the future video cards reviews & benchmarks .. to include a small video clip from the in-game with the framerate on it .. so the reader will see some of the game & at same time witness the video card's playability himself .

Next game: Doom 3!

I'm eager to see that one !

MikeC
08-01-04, 09:02 AM
Look like you had fun blasting them priest monsters ! :rw: :D

that was a good "show" & info Mike ! :)

You know what ? i think this might be a good concept for the future video cards reviews & benchmarks .. to include a small video clip from the in-game with the framerate on it .. so the reader will see some of the game & at same time witness the video card's playability himself .

I've been having a blast with Painkiller. It reminds me very much of the original Quake.

Unfortunately, recording video during gameplay takes a huge strain on the system. Depending on the recording options, areas where I was getting 150 fps drop to 30-40 fps during a recording. In this case, a frame rate counter would be misleading.

SH64
08-01-04, 09:17 AM
Thats right .. i forgot that .
i tried recording before & the framerate numbers goes down & dosent represent the actual fps . (esp when it goes white which indicates recording status)

IGx89
08-01-04, 10:29 AM
Looks good :). I have a few questions though:

Why'd you choose 512x348 as the resolution, instead of the more-standard 640x480? Just for file size considerations?
Why'd you use the legacy (at least 4 years old, if not 5 or 6) MS MPEG-4 V1 codec (which XP computers have by default, but W2K and W2K3 do not)? Why not the much more modern WMV9 codec (two-pass VBR has excellent quality), or even DivX/XviD?
Did you know that the "MPEG-4 Video Clip 1", "MPEG-4 Video Clip 2", and "MPEG-4 Video Clip 3" links all point to the same file? :)

MikeC
08-01-04, 02:30 PM
Looks good :). I have a few questions though:

Why'd you choose 512x348 as the resolution, instead of the more-standard 640x480? Just for file size considerations?
Why'd you use the legacy (at least 4 years old, if not 5 or 6) MS MPEG-4 V1 codec (which XP computers have by default, but W2K and W2K3 do not)? Why not the much more modern WMV9 codec (two-pass VBR has excellent quality), or even DivX/XviD?
Did you know that the "MPEG-4 Video Clip 1", "MPEG-4 Video Clip 2", and "MPEG-4 Video Clip 3" links all point to the same file? :)


Thanks for the feedback. As I mentioned earlier, system performance is a consideration when recording with FRAPS. I found that playing at a resolution of 1024x768 and recording at half-size (512x384) performed well on my system. I'll experiment with the other codecs and report back.

MikeC
08-01-04, 03:01 PM
DivX = Nagware. Everytime I compressed the original video using DivX, I get a popup that asks me if I want to upgrade to the Pro version. Plus, the quality is not as good as the MPEG-4 format at the 7 MB file size.

Bloody
08-01-04, 03:08 PM
DivX VBR 2pass ot XviD give even better results in terms of quality/size ratio.

IGx89
08-01-04, 04:50 PM
I regularly record TV shows using BeyondTV3, to WMV7 6mbps (WMV7 is a lot faster at encoding than WMV9, and 6mbps is about lossless at 640x480). Then, during the night, BTV transcodes the shows to WMV9 VBR 2mbps two-pass, which looks 95% as good as the original to me.

I personally prefer WMV9 over DivX/XviD, partly because then I don't have the whole problem of installing codecs or choosing which codec to use; WMV9 is already on most computers, and if it's not it usually is automatically downloaded when the user tries to play the video. But, I have seen some really, really good quality XviD videos too. Another reason is that it's completely free to encode to WMV9 (plus you get a good encoding app), while DivX costs if you want good quality.

MikeC
08-01-04, 08:15 PM
DivX VBR 2pass ot XviD give even better results in terms of quality/size ratio.

Thanks for mentioning XviD. I used a utility in TMPGEnc to dump bitmap images of each frame to disk. After a comparison, I found that XviD provides slightly better image quality than Microsoft's MPEG-4 codec when the compressed files were a similar size. XviD also has a number of additional options to further enhance video quality.

Microsoft MPEG-4 Video 1 (http://www.nvnews.net/videos/painkiller/painkiller_ms_mpeg-4_01.avi) - 7.75 MB
Microsoft MPEG-4 Video 2 (http://www.nvnews.net/videos/painkiller/painkiller_ms_mpeg-4_02.avi) - 6.56 MB
Microsoft MPEG-4 Video 3 (http://www.nvnews.net/videos/painkiller/painkiller_ms_mpeg-4_03.avi) - 7.06 MB

XviD MPEG-4 Video 1 (http://www.nvnews.net/videos/painkiller/painkiller_xvid_mpeg-4_01.avi) - 7.76 MB
XviD MPEG-4 Video 2 (http://www.nvnews.net/videos/painkiller/painkiller_xvid_mpeg-4_02.avi) - 6.45 MB
XviD MPEG-4 Video 3 (http://www.nvnews.net/videos/painkiller/painkiller_xvid_mpeg-4_03.avi) - 7.09 MB

XviD MPEG-4 codec (http://www.doom9.org/Soft21/Codecs/XviD-1.0.1-05062004.exe) - 617 KB.

The Unofficial XviD FAQ (http://www.vslcatena.nl/~ronald/docs/xvidfaq.html).

MikeC
08-01-04, 08:39 PM
Another reason is that it's completely free to encode to WMV9 (plus you get a good encoding app), while DivX costs if you want good quality.

What software will convert AVI to WMV9?

Clay
08-01-04, 10:27 PM
I'm getting ready to install Doom 3 (finally, been a long busy day/evening). I will upload some gameplay footage here later tonight. I've not done much video encoding but I think I've learned a bit so far from this thread. :)

Clay
08-01-04, 11:58 PM
Here's my first video from Doom 3.

This is not a spoiler. It's just of some cool piston movement in a totally non-vital part of a room...shows the attention to detail that was put into this game.

- Original AVI file from FRAPS was ~17MB
- Compressed with XviD down to ~240KB
- 400x300 (50% of 800x600)
- FRAPS set to record at 25fps

http://www.nvnews.net/videos/doom3/pistons.avi

More to come tonight...

Clay
08-02-04, 12:09 AM
Here's a new one...perhaps a bit of a spoiler as it is early in the game when "all Hell breaks loose" for the first time. ;) Same settings as above. I'm going to bump up to a higher res for the next movie.

http://www.nvnews.net/videos/doom3/hell.avi ~ 1.1MB

Clay
08-02-04, 12:42 AM
I'm playing at 1600x1200 now in High Quality mode. So new resolution settings now:

- Compressed with XviD
- 800x600 (50% of 1600x1200)
- FRAPS set to record at 25fps

http://www.nvnews.net/videos/doom3/hell_800x600b.avi ~ 2.4MB
http://www.nvnews.net/videos/doom3/transition2.avi ~ 402KB

mikechai
08-02-04, 12:59 AM
Thank you very much Clay.

At least something for us who can't play Doom3....

peeon
08-02-04, 01:08 AM
What software will convert AVI to WMV9?

Mike, I think this is what you are looking for.
http://www.microsoft.com/windows/windowsmedia/9series/encoder/default.aspx

IGx89
08-02-04, 08:26 AM
Yeah, peeon has the right link; Windows Media Encoder is the tool recommended, though you can find a VFW wrapper if you want to use WMV9 in older apps, like VirtualDub.

Maybe you could try making a WMV9 VBR two-pass clip of comparable bitrate to your XviD clips, and see which one has better quality? That'd be interesting :)

Clay
08-02-04, 10:12 AM
Yeah, peeon has the right link; Windows Media Encoder is the tool recommended, though you can find a VFW wrapper if you want to use WMV9 in older apps, like VirtualDub.

Maybe you could try making a WMV9 VBR two-pass clip of comparable bitrate to your XviD clips, and see which one has better quality? That'd be interesting :)Instead of me Googling, would you mind providing an explanation of two-pass vs. single-pass regarding video encoding? I tried a few two-pass attempts last night with XviD and the resulting file was very small ~18KB compared to single-pass at ~240KB...this two-pass file was basically black so I must not have done something right. Thanks for the other info guys. :thumbsup:

frenchy2k1
08-02-04, 12:02 PM
In a one pass compression, the codec needs to decide how to compress at the time it encounters the image. It has no way to know where to lower the compression or reserve more space.

Imagine you have a movie with just 2 ppl walking in front of a bland backgroung. Very easy to compress hence requirering less information. Next scene is a car chase/combat scene. You need much more information to keep all those fast moves/camera pan. In a one pass compression, the program would allocate the same amount of information to each scene (hence constant bit rate). It will be overkill in the first scene and underwhelming in the second. In a 2 (or even multi) pass compression, the codec first searched through the file for high information passages and allocate more bandwidth to those. It will compress the first scene more (but keep the same amount of quality) and give more space to the seconf scene (hence more quality there).

To do a multi pass encoding, you need to configure your software twice. You need especially to configure the temporary file that will keep the infos of Bandwidth allocation. You first compress using the 2 pass compression, first pass. The avi result will be a black file. Then you compress using the 2 pass compression 2 pass 2nd pass and now the result should be viewable.

SeriousWorm
08-02-04, 04:45 PM
In addition to Frenchy, if you compare the current cutting edge codecs (DivX 5.2, XviD 1.0 and WMV9) you'll find that DivX is beginning to lose its support (mainly due to the release of XviD 1.0 and the nagware in DivX 5.2), and now mostly relies on fame. XviD, on the other hand, is the best codec as of release 1.0, and also the most configurable one (not to mention that it's completely free and open source). WMV9 is also a pretty good codec, but a bit blurrier thann DivX or XviD; however, that's to be expected since it's designed for very low bitrates (up to 400-500kbps) and Internet streaming. It also doesn't support the advanced options like Bidirectionally predicted frames, Global Motion Compensation or Quarter Pixel Motion Compensation, which can help reduce filesize by 20-30 percent (B-frames and GMC) or enhance the sharpness of the image (Qpel).

Sazar
08-02-04, 05:14 PM
nice work you mike/clay...

yer right mike.. .fraps kills frame-rates... I recorded vids for Breakthrough that I had extremely playable frame-rates in and soon as I started recording it became a slideshow :(

nice vids... keep em coming :cool:

-edit-

if we had a rep system I woulda given both of you one each :)

Zetto
08-02-04, 05:18 PM
isn't there a built-in video capture capability in doom3?

Clay
08-02-04, 10:03 PM
To do a multi pass encoding, you need to configure your software twice. You need especially to configure the temporary file that will keep the infos of Bandwidth allocation. You first compress using the 2 pass compression, first pass. The avi result will be a black file. Then you compress using the 2 pass compression 2 pass 2nd pass and now the result should be viewable.Thanks for the info! Especially this last part, that's what I was missing. :thumbsup: