Guide to Ghetto 60fps Recording
To do the in-game input lag tests described in this thread, you need a video camera that shoots 60 frames per second (720p HD, for instance.) If you don’t have a fancy HD camcorder, it is possible to get by with pretty much any standard-def MiniDV camera. Here’s how to do it…
Introduction
Standard-def MiniDV camcorders store 30 frames per second, but that’s not what they are actually recording. It’s really 60 fields per second. Pairs of fields are weaved together (interlaced) to form the 30 frames.
If you can separate out the individual fields and treat them as whole frames, you effectively have 60 frames/sec video. This is what we’re going to do!
We’ll be using a great video scripting engine called AVISynth, which can manipulate video in all sorts of ways. AVISynth scripts are plain-text files with a .avs extension. They will open in VirtualDub, and some other apps, as if they were video files themselves.
VirtualDub, as described elsewhere, is a great tool for seeking around frame-by-frame in a video file, as well as trimming, converting, extracting still images, etc. It’s just what you need when counting frames for input lag.
Software needed:
VirtualDub
http://www.virtualdub.org/
AVISynth
http://avisynth.org/mediawiki/Main_Page
You may also need to install a DV codec to allow VirtualDub to open AVI files created with a MiniDV camera.
http://www.free-codecs.com/download/panasonic_dv_codec.htm
I’d recommend using Windows XP. Using Vista or 7, especially the 64-bit versions, will probably require extra steps to get everything working.
Procedure
- Shoot your video
Using your camcorder, record your controller button presses and the on-screen responses, as described in the other posts. Zoom in as much as possible; the resolution of individual fields is pretty low, so you need to capture as much detail as you can.
- Transfer the camcorder video to an AVI file on your PC
The exact method will vary – firewire, analog capture card, etc. Firewire (1394a) is usually best, as you get exactly what was recorded on the camera.
- Make sure the AVI file opens in VirtualDub
If the file opens properly in VirtualDub, then AVISynth will also be able to read it. (You may need to install the VfW-compatible Panasonic DV codec listed above.) DO NOT CONTINUE until you have a file that will open in VirtualDub.
If you seek around in the file in VirtualDub, frames with a lot of motion in them should have a jagged lines in them, like teeth on a comb. This is because the objects moved between the times when the individual fields were recorded, which are now interlaced together. If you don’t see these lines, you may not have the raw video from the camera, and you may need to find an alternate way of transferring video from the camera to the PC.
- Create AVISynth Script
Now that we know we have a proper video file, we can create an AVISynth script to process it. Here is a simple two-line script that will bob deinterlace a video clip:
AVISource("yourfile.avi")
Bob()
It’s called “bob” deinterlacing because it tries to compensate for a small vertical jump (or “bobbing”) between fields, which is there to make the interlaced fields line up properly when combined into frames.
Save these lines into a text file with a .avs extension, such as “bobtest.avs”, and replace “yourfile.avi” with the actual name of your AVI file from the camera.
- Examine the results
Open the script file in VirtualDub as if it were an AVI file. Once it’s open, if you go to Video -> Frame Rate, it should say the current rate is 59.940fps.
If all has gone well up to this point, each frame corresponds to one frame of the 720p/1080p video in the game, so you can count frames for moves to determine your input lag.
I hope this works for you. I will update this guide if people run into trouble with any parts of it.