VirtualDub Game Recording Guide

User created game mods, skins, texture packs and camera tools
User avatar
Dem Pyros
Posts: 1060
Joined: 08 Dec 2006, 06:01

VirtualDub Game Recording Guide

Post by Dem Pyros »

That seems like an FPS error of some sort... are you recording to the same drive?
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

eZ`,

Sorry to hear you're having trouble. I'm sure the sample video you posted stutters because your hard drive simply could not keep up with capture demands: full-res, 60fps, Uncompressed video requires an absolutely mammoth datarate. This explains why the game played fine in realtime, but the resulting video came out bad.

-edit- Did some math. If my figures are correct, uncompressed video at 1680x1050 comes to about 5MB per frame. 5MBx60fps=300MB/sec of sustained disk writing. :shock:

With VirtualDub you really don't need to exceed 30fps. Anything greater will begin to seriously bog the system and will probably be frames that you discard in post-processing anyway, so you're just losing performance and disk space.

You mentioned trying different codecs. What settings have you tried with the PicVideo MJPEG codec that I reference in the guide?

The hotkey program should have no affect on the actual recording process. However, it appears you use Vista--which I've never tested--and it's possible that Alt-tabbing from desktop to game screws with the graphics subsystem in a way that borks recording. Try HotkeyP when you can, just to eliminate the variable.

Also, I noticed this:


If this means that the test itself is writing data to disk while recording, then that can also mess up your video. Try capturing regular gameplay or even just your desktop. Since you have 2 hard drives, capture to the one that does not contain your games.
User avatar
g00seberry
Editors
Editors
Posts: 1317
Joined: 24 Sep 2006, 16:57

VirtualDub Game Recording Guide

Post by g00seberry »

However, it appears you use Vista

Well firstly, I don't use Vista its just a skin :P

Sorry to hear you're having trouble. I'm sure the sample video you posted stutters because your hard drive simply could not keep up with capture demands: full-res, 60fps, Uncompressed video requires an absolutely mammoth datarate. This explains why the game played fine in realtime, but the resulting video came out bad.

The drive I'm recording to is a 500GB WD AAKS, its pretty damn fast, and I'm sure that's not the problem, as firstly, I record with fraps with no problem and that spits out the gigabytes. Secondly, I have tried doing it at very low quality DivX on the fly and it's still jerky (using 4core encoding, so the cpu aint slowing it down). And thirdly, I've tried all 3 of my HDDs and the frame rate is the same across them all.

With VirtualDub you really don't need to exceed 30fps. Anything greater will begin to seriously bog the system and will probably be frames that you discard in post-processing anyway, so you're just losing performance and disk space.

I upped the FPS from 30 to 60 just to see if it made any difference as i know some games look really poor at only 30fps, but it looked exactly the same.

You mentioned trying different codecs. What settings have you tried with the PicVideo MJPEG codec that I reference in the guide?

Well, not PicVideo, no. The link you have was going at 5kb/s and I couldn't be bothered to wait, so I .... "found" one called "Morgan Multimedia M-JPEG" which I'm sure is practically identical, just made by someone else. Here's a screenshot...


It shares a lot of the same settings as your one.
Note in VirtualDub on the right it's showing my last test record. 7fps average. This happens in the desktop with no game running, or with a game running, windowed or fullscreen. It never breaks 7fps. The harddrive is hardly being stressed, and neither is my CPU or anything else. So I really don't know. The only thing I can think of is that it doesn't like having 2 screens active. I have to manually put in 1680x1050 rather than "Screen" as it tries to record both screens (2560x1050)........ I've just tried disabling my second monitor and setting it to 'screen' and the frame rate is still the same.

The hotkey program should have no affect on the actual recording process.

I didn't use the hotkey program simply because I couldn't be arsed. No point installing everything to make the task easier, only to find that the task itself doesn't work properly (which is what happened! :P)

And I've tried many more games, not just CSS. But the fact that the frame rate is so low even on the desktop shows its not something that's just being borked by games.

Now I know you're gonna say 'download the codec you linked', but it runs at 5-7fps on ANY game ANY desktop usage with ANY codec at ANY specified frame rate, so I seriously doubt having the PicVideo codec is going to be fine, as you have tried recording to XviD or the Xfire codec and been fine with it, yet mine still fails.
I be stumped! :!:
Formerly eZ`

Follow me on twitter: @theg00seberry and find me on Steam
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

Well firstly, I don't use Vista its just a skin :P

Good, because my next suggestion was going to be roll back your OS. ;) :lol:

The drive I'm recording to is a 500GB WD AAKS, its pretty damn fast, and I'm sure that's not the problem, as firstly, I record with fraps with no problem and that spits out the gigabytes.

I believe you, but double-check my previous post for my edit regarding the datarate for uncompressed video. I have yet to see a HD come close to that speed:
http://techreport.com/articles.x/12673/12

I upped the FPS from 30 to 60 just to see if it made any difference as i know some games look really poor at only 30fps, but it looked exactly the same.

With Fraps a higher fps, like 60, can actually make videos look smoother, because fraps locks the game to the fps. Vdub does no locking, it just lets your game run as fast as possible and records 30fps--as shown by the 200+fps you got in your video (nice rig!)

Well, not PicVideo, no. The link you have was going at 5kb/s and I couldn't be bothered to wait, so I .... "found" one called "Morgan Multimedia M-JPEG" which I'm sure is practically identical, just made by someone else.

The Morgan codec is probably good enough. I haven't used it myself. Was the Afterdawn link the slow one? Maybe I'll host the Showshifter demo elsewhere to help with that.

The only thing I can think of is that it doesn't like having 2 screens active. I have to manually put in 1680x1050 rather than "Screen" as it tries to record both screens (2560x1050)........ I've just tried disabling my second monitor and setting it to 'screen' and the frame rate is still the same.

The dual screens could be an issue, but it looks like you've tested that already.

Now I know you're gonna say 'download the codec you linked', but it runs at 5-7fps on ANY game ANY desktop usage with ANY codec at ANY specified frame rate, so I seriously doubt having the PicVideo codec is going to be fine, as you have tried recording to XviD or the Xfire codec and been fine with it, yet mine still fails.
I be stumped! :!:

Too bad, download the codec I specified!!!! :evil: ;)

Just kidding. You've already got enough evidence to show that the problem is probably not codec-specific. Your rig should be more than capable of awesome, high-res capturing, so that makes me think you've got a gremlin in there.

Have you tried loading a video in Vdub and re-rendering it to a different codec (convert, not capture)? Try Morgan MJPEG. It should convert very fast.

-edit- Have you tried setting Vdub to use just one or 2 cores?
User avatar
g00seberry
Editors
Editors
Posts: 1317
Joined: 24 Sep 2006, 16:57

VirtualDub Game Recording Guide

Post by g00seberry »

Yeah it's fine for converting stuff, I do it quite frequently, into XviD and DivX. Fraps videos and the like.

When i put it to a single core then it locked up and had to be closed.

To be honest, I'd say it's something in the "wonderful" ATI drivers/CCC that's messing it up. It's prob trying to be clever and failing miserably.

Thanks for the help, and I'mna keep looking into it I think because if it works it's a great alternative to use, as some games simply hate FRAPS and destroys your FPS no matter how demanding the game is. (Source games and Pro Evo's I'm looking at you)
Formerly eZ`

Follow me on twitter: @theg00seberry and find me on Steam
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

When i put it to a single core then it locked up and had to be closed.

That's odd. :?

To be honest, I'd say it's something in the "wonderful" ATI drivers/CCC that's messing it up. It's prob trying to be clever and failing miserably.

Ahh. I completely missed the fact that you have an ATI card. I've only used NVIDIA, so I have no experience or advice to offer on that.
..........
Just found this on the VirtualDub site:
Also, ATI appears to be shipping their current devices with a WDM (Windows Driver Model) driver only; this can be used indirectly by VirtualDub through a Microsoft wrapper, but it is crippled in functionality and it also appears that the wrapper is buggy.

The wrapper will show up as "Microsoft WDM Image Capture (Win32)." If it works for you, great.
:(
Don't know how current this information is, but it could be relevant.

I hope you can get it working.

Anyone else capture successfully with an ATI card?
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

Just ran a test using FEAR's timedemo, recorded @ 1440x900-30fps. Results are very good:
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

VirtualDub Game Recording Guide

Post by dopefish »

I use a different method. Mine is far more complicated and I don't really feel like explaining it all, but the quality is unbeatable.

I use a combination of x264 (You cannot beat the quality of H.264), AviSynth, VirtualDub, and others.

The first thing I do is capture games straight to TGA files at 300 FPS. From here, I calculate motion blur based on the motion vectors of the previous, current, and next video frame. Once that is done, I pull every 10th frame. This drops it down to 30 FPS. Then from here, it's just a matter of adding film grain or any other effect you like, and then rendering it to H.264 with x264.

For audio, I record straight to PCM, and then I use neroaacenc to encode to AAC. For video games, I typically use 128kbps for audio. 128kbps AAC is equivalent to 160kbps MP3 or higher, so you can get better quality at a smaller size.

I know these aren't exact steps but they are good for guidance.

Here are some examples:
http://imk.cx/videos/files/CSS_Ace.mp4 (20 MB)
http://imk.cx/videos/files/WiC_A2A_3.mp4 (11 MB)
http://imk.cx/videos/files/WiC_FuelAirBomb.mp4 (9 MB)
http://imk.cx/videos/files/CSS_3xM4HS_2.mp4 (12 MB)
http://imk.cx/videos/files/CSS_1v4.mp4 (27 MB)
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

@Dopefish

That is quite a process you have there. Those WiC vids are nice. :)

One thing I don't understand...capturing TGA files at 300fps. At 1440x900 that would come to 1110MB per second. How in the world do you capture that in realtime? Crazy Uber-RAID?


Question:
You wouldn't happen to know how to disable hardware overlays, would you?
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

VirtualDub Game Recording Guide

Post by dopefish »

Well, I typically make all of my videos for 1280x720 for the greatest compatibility. I either do 720p or 1080p. It uses less space for 1280x720.

As for recording the game, I use in-gamer rendering where possible. World in Conflict, Call of Duty 4, all Source-based games, and others have built-in renderers. You play back a demo and it will dump the frames in non-realtime. :)

And I don't know about hardware overlays.
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

As for recording the game, I use in-gamer rendering where possible. World in Conflict, Call of Duty 4, all Source-based games, and others have built-in renderers. You play back a demo and it will dump the frames in non-realtime. :)

I thought that must be the case. Didn't realize WiC had demo recording/rendering functionality. For the highest quality that is certainly the way to go. Do you participate in the machinima community, by chance?

The Vdub guide I put together was an alternative to Fraps, Xfire, etc--focusing on realtime, on-the-fly recording. In many ways it is superior. For example, if I had recorded the FEAR demo with Fraps, the screenshot above would show 30fps for every stat, since Fraps locks the game to the capture framerate. Vdub doesn't leash the beast any more than necessary. ;)

The one major downside is that hardware overlays frequently cause flickering in fullscreen recordings, hence my question.

And I don't know about hardware overlays.

Thanks anyway. I'll continue the search. ;)
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

VirtualDub Game Recording Guide

Post by dopefish »

I don't participate in any community for videos. I'm more of a technical advisor. ;)



Well, the reason why Fraps limits the game to the recording speed is so that you don't get tearing. It pulls the frames directly out of your video card's framebuffer. Capturing it in other ways may actually capture the tearing. So at least if you're going to record that way, make sure you turn VSync on in the game so that you minimize tearing.
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

I don't participate in any community for videos. I'm more of a technical advisor. ;)

And a good one at that. ;) Someday I'd like to see one of the avisynth scripts you use for video processing.

make sure you turn VSync on in the game so that you minimize tearing.

IIRC, isn't tearing a monitor problem? As in, the whole frames delivered to the monitor by the graphics card are out of sync with the monitor's refresh rate, so the monitor ends up "mixing frames", aka, tearing. Given the broad range of fps reported by the FEAR demo it should be a prime candidate for tearing when Vsync is off. I frame-stepped through the capture I made and didn't find the problem anywhere (and haven't noticed it in other recordings).
User avatar
dopefish
Insiders
Insiders
Posts: 1514
Joined: 14 Apr 2007, 02:13

VirtualDub Game Recording Guide

Post by dopefish »

Tearing doesn't really have anything to do with the display. It has more to do with the refresh rate that you have set.

Your video card renders to framebuffers. When VSync is on, it will sync the drawing to the refresh rate that you set in Windows. However, when VSync is disabled, the video card tries to render as many frames as possible. When it renders a new frame, it will overwrite the old frame.

What happens here is that when the frame leaves the framebuffer to be displayed, it might have pulled a frame that was only partially overwritten. This is the tearing you see.

I hope that makes sense. ;)
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

What happens here is that when the frame leaves the framebuffer to be displayed, it might have pulled a frame that was only partially overwritten. This is the tearing you see.

I hope that makes sense. ;)

Interesting. Well, as long as it doesn't affect my videos I'll be a happy camper. :D

A couple more tests:

HL2 Lost Coast Stress Test (1440x900-30fps):


CSS Stress Test (1440x900-30fps):
aramonkg
Posts: 2
Joined: 06 Jul 2009, 20:29

VirtualDub Game Recording Guide

Post by aramonkg »

Excellent guide, solid instructions, working solution! Thanks a bunch. Now I can send Fraps to /dev/null (I would wish but OS restricts me!)
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

VirtualDub Game Recording Guide

Post by GeneralAdmission »

Excellent guide, solid instructions, working solution! Thanks a bunch. Now I can send Fraps to /dev/null (I would wish but OS restricts me!)

You're welcome. Glad to hear it's working for you. Did you get it working for fullscreen games? If so, what video card, driver, and OS are you using?

I now remember that the guide is in need of an update for a couple things. More stuff for the todo list....
aramonkg
Posts: 2
Joined: 06 Jul 2009, 20:29

VirtualDub Game Recording Guide

Post by aramonkg »


You're welcome. Glad to hear it's working for you. Did you get it working for fullscreen games? If so, what video card, driver, and OS are you using?

I now remember that the guide is in need of an update for a couple things. More stuff for the todo list....

No, no fullscreen for the game I tested it on, Company of Heroes. When I tried FS I just got a black sheet, nothing else. However, the windowed mode is working without an issue.

As for the guide, I guess that update you are talking about is due. Codec options have expanded tremendously and I would like to see some mention of disk i/o optimization and audio/video timing, offered by virtualdub. I had some issues getting the best settings for my disk and when I tried recording overlapping audio, in addition to the in-game audio, I got weird audio re-sampling and had to disable video/audio sync entirely.

Once again, great guide!

Cheers
Xtreme_Rampage
Posts: 13
Joined: 12 Jan 2007, 01:34

Similar problem recording like eZ'

Post by Xtreme_Rampage »

I apologize for posting late...over one year, but I never really have the need for recording, until now :wink:

Anyway, I have similiar problem recording like eZ` (even for desktop) back in my home desktop. However, with this "lite" laptop I am able to record video game smooth and properly.

The irony is that my home desktop was capable and decent enough for games that were released until at least 2008, while this "lite" laptop struggled heavily when attempting to run games like World in Conflict and Oblivion. I had to use the ol' Battlefield 1942 for the purpose of recording with this laptop.

All right, I figure all these chats are worthless without any hardware specs, so here they are:

The Desktop PC (good for gaming):
Intel Pentium 4 2.6 GHz
2 GB RAM
ATI HIS X800 PRO 256 MB
Sound Blaster Audigy
1 HDD with capacity 80 GB (5 GB Free)
Windows XP Professional 32 Bit
Resolution 1280 x 768

The "lite" laptop:
ASUS F9S
Intel Core2 Duo T7500 @ 2.2GHz
3 GB RAM
NVidia GeForce 8400 M G 128 MB
1 HDD with capacity 120 GB (partitioned into two, 55.8 GB and 48 GB, each with over 4 GB free)
Windows Vista Home Premium 32 Bit
Resolution 1280 x 800

I use similar setting as the guide in GeneralAdmision.com site (with 30 fps and codec other than MJPEG) for both. The PC desktop however, lagged heavily as if it was being held by unseen forces (or in other words, failed miserably) to record even the very desktop screen itself! :shock: On the other hand, the laptop could record smoothly even when at the same time I have a Firefox opened with dozens of tabs and more (tray) applications running. It could even then record Battlefield 1942 without any noticeable hiccup.

As for answer to some related questions...
Have you tried setting Vdub to use just one or 2 cores?

My Desktop PC is the ol' one core, but I doubt it has any effect with the slowing VirtualDub, or does it?
Anyone else capture successfully with an ATI card?

As you can see, it failed to "record properly" with an ATI card.

Any clues to what happened and is there any solution?
User avatar
GeneralAdmission
Editors
Editors
Posts: 1560
Joined: 12 Sep 2007, 19:14

Re: Similar problem recording like eZ'

Post by GeneralAdmission »

1 HDD with capacity 80 GB (5 GB Free)

This would be my first guess as the culprit. One drive is handling OS/Game/recordings tasks by itself. More importantly, you have very little free space available for something as demanding as game recording. My guess is that the 5GB free space is probably fragmented, which could easily account for the problem you describe.

Try freeing some more space on the hard drive, at least 10GB free, but more is better. After this run a defrag on the drive and make sure that the free space gets defragged. If Windows' defrag tool doesn't do this, try http://www.defraggler.com for a freeware app. Once the hard drive is in better shape, try a game recording with an older, less-demanding game and see how it goes. Ideally, a second hard drive would be the best option.

What codec are you using? If it is high bitrate--such as a lossless codec--that could be an issue. I'm guessing an 80GB drive is rather old and probably not the fastest on the planet; it may not be able to keep up with the bitrate needed for recording, especially if there is fragmentation. A codec that does interframe (such as Divx/Xvid) or other CPU-intensive encoding could also be a problem. You desktop P4 CPU is old and weak compared to the C2Duo in the laptop--it might be choking on the task of running a game and encoding video at the same time. Aside from the graphics card, your laptop is clearly a superior machine compared to the desktop.

Let me know how things work out.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest