[MiniGuide] Recording & Processing Game Video

User avatar

Topic author
IskatuMesk
Xel'naga World Shaper
Xel'naga World Shaper
Posts: 8783
Joined: Sat Feb 07, 2009 1:40 pm
Location: M͈̙̞͍͞ͅE̹H̨͇̰͈͕͇̫Ì̩̳CO̼̩̤͖͘
Contact:
Status: Offline

[MiniGuide] Recording & Processing Game Video

Postby IskatuMesk » Wed May 09, 2012 9:43 pm

Greetings, comrades! I am a provisioner of fine Belgian home media, and today I'm going to rustle you down on how my jimmies are knotted. Which is to say I'm going to show you the ins and outs of my video productions, how they work, how I deal with problems, and provide a guideline on the elements inbetween. This is how I run the show. The guide can be taken literally or simply as a guideline. I do not intend to provide on the spot support because I simply don't have time to cover any possible issues someone else might run into for some reason. So, hopefully the guide is good enough to stand without any help like that. That said, I don't plan to go very in-depth, e.g. what buttons to push, since many of the programs are very straight forward.

Introduction - Background

I produced private videos for years before the Starcraft 2 closed beta, largely with text-based "casting". The private videos with voiced casting were primarily dev stuff or misc material like the AO videos I made for SEN. When the SC2 closed beta rolled up I decided to take a swing at vocal public casting. This entailed multiple revisions of my production pipeline until I had recording and encoding videos down to a fine art. Above all, I pursue maximum quality in my videos at any reasonable cost. This means I produce videos in 1920x1200 when possible, and I'll use only the best solutions available. Performance, filesize, and other things are worthy sacrifices so long as the end experience is meaningful and profound.

When my Starcraft 2 casting dwindled down I moved primarily into LP productions, which entailed exceptionally lengthy recording times and pursuit of the best hardware solutions. Along the way I learned a thing or two about hardware, software, and how they impact your performance. I record not only PC games but also console games like the Playstation 3, which I'll also cover in this guide.

Goals

Our goal with video media is really quite simple. We want a recording of a game, such as Starcraft 2 or God of War, in a format we can provide to our viewers in top notch quality with good size-to-length ratios. We want to record both game audio and our microphone at once. We want that audio to be reasonably normalized with no problems or sync issues, no very large spikes in volume or whispers. We want the caster to be audible in all circumstances but the game audio cannot be too quiet. We want the video itself to be reasonably high quality, much moreso than the disgusting videos Blizzard releases. We'll be using industry standard formats like x264 and AAC with competitive compression. For the purposes of this guide we are assuming that we are uploading our videos directly to an FTP for DDL distribution. This is because websites like youtube re-encode videos when they are uploaded, massively bloating filesizes and reducing quality. Some of my videos are 40% larger in Youtube's "Original" size type, and youtube's player is also a pile of shit. Also, censorshiplol. Fuck that. So, since we're providing a DDL, we want our sizes and quality to be top notch.

Our video will undergo several stages of production no matter our source.

Recording -> Processing -> Verification -> Release

First we need to set up our recording environment for the best results. This means keeping our microphone in a location we're almost always facing, testing to make sure the game volume is not too loud (I keep sc2's master volume around 15), and making sure we get no pops or disruption. Once we have our video recorded, we'll use either Avisynth Batch Scripter or manually build a script to feed the video/audio into megui for encoding. Once our video is encoded, we'll either rip the audio out with Audition or encode the audio separately and then open it in audition for compression. Using mkvmerge, we'll join the video back with the processed audio and create a release candidate we then verify. Verifying means we watch the video in its entirety to make sure there's no problems. Because there can be any number of problems verification is critical to catching problems BEFORE we release and then have to pull stuff down because something is wrong.

Without further adeu, let'see how we do this.

Getting Acquainted With My Tools

I'll provide both my current set of tools and my previous sets in case you're curious. I'll also provide footnotes on important aspects about the programs, but I'll cover their actual usage later on.

Recording programs "Thou Shalt Google", I'll be providing no assistance in acquiring these.

Fraps - Fraps is the flagship of our show. To record our videos we'll be using Fraps and nothing but. A frenchman told me that Playclaw might be worth trying out, and there's also a Japanese program called Dxtory. But I have yet to try either so I can't vouch for them. Keep in mind a lot of these kinds of programs require "licenses". Let's just say I only put money into hardware. That said, fraps will eek money out of you anyways because you will want the hardware for big-scale HD recording. More on that later.

* Keep the lossless RGB setting off, it fucks up everything.
* Fraps in Windows Vista and 7 lets you record dual audio (Game/mic) but the way it decides the devices is kind of retarded. You'll need to set your mic to your default everything in Windows audio settings. Why not just have a setting to decide the device like every other program? Herp de derp. Test this thoroughly before making a big recording. Fraps usually needs to be restarted to "see" your audio changes.
* Fraps can capture Aero desktop on windows 7. A good replacement for camtasia if you've got it.

Growler Guncam - I used Growler Guncam for Brood War and Age of Wonders 2 back on Windows XP. Could NEVER get it to work properly on Windows 7 retail. If you can, awesome. It's a reasonable program but has some serious issues with games like WoW where it can fuck up the entire video of the computer just by having it open. The way it hooks also causes some stuff to freak out. However, Fraps supports brood war now, so Guncam is deprecated even if you have it working.

* Remember to disable that irritating record sound it makes. Especially if your name is Jack and you have your audio volume at stupidly high levels.
* Remember to set your FPS to 30 and give the program your game's native resolution for best results.
* You can save to a variety of formats in guncam and most old games will look OK with them. It's a decent stand-alone recorder/encoder for simple stuff.
* Guncam can cap the desktop, too.

Camtasia - If for some reason you're forced to use this program or it many clones you're in deep shit. Alas, it's the only thing I currently have that can reliably cap the desktop. That said, Windows quickly freaks out and bitches about performance soon after Camtasia starts recording, and for good reason - Camtasia is fucking terrible. When Guncam gave me shit across the years I always tried alternatives, like Camtasia and Camstudio. Their performance is awful, they can fuck with audio randomly, and they often cause "black" periods of no video in my recordings. No idea why. Versions of this program don't seem to make a damn of a difference.

* Avoid using any lossless codecs for Camtasia recordings, like Lagarith, especially if you plan to run them through Vegas. Trust me, it's a bad idea. The default codec will be fine, but very large.
* Avoid using camtasia for game recordings at all costs unless you have no other options. Though you may get lucky, Camtasia has caused reproduceable problems for me across many different versions of the program, hardware, and operating systems.
* Avoid recording more than 30-50 minutes of desktop at a time unless you enjoy excessively long save periods.

Virtualdub - Virtualdub has recording capabilities but I've never tried them. Instead, I use virtualdub as a hook for my capture card so I can fraps console games. Virtualdub has other uses, like encoding, but we don't need to use those in our setup.

* Set the Vdub capture mode to "Preview" and "Progressive", or the preview will lag/look terrible.
* I have to turn the filter chain on and then off again to get a reliable hook on my card. Don't know why. But it works.

Processing

Megui - Megui is what we'll be using to encode our fraps videos into x264 so they aren't the size of my mom's fingernails anymore. Megui is an avisynth script front-end, so you'll need to make avisynth scripts for it. Don't sweat it, this is easy, even for a braindead Canadian monkey like me. The advantage megui has over several other front-ends I'll be telling you about is that it offers many options for the x264 encode. The downside is that if you want to do cropping, cutting, etc you'll be doing it through the avinsynth script. This is accurate and powerful, but you have no GUI guidelines. If you want serious edits to a video, like text overlays, you'll be looking at using Vegas probably. Megui will also encode your audio for you. This is a free program.

* Megui has caused some very rare artifacting issues in a handful of videos. The verification process is there to catch these. If they happen reliably, try Simple x264 Launcher.

Sony Vegas - While I regard this program with loathing because of its slowness, bugginess, and instability, the simple fact is that I've yet to use a GUI video editor with nearly the ease or functionality as this. I've even used Vegas for editing audio, though it lacks the power of Audition. Azrael recommended me to check out Acid for audio, which is supposedly similar to this. Something to keep in mind. Always export out of Vegas using a lossless or uncompressed encode set to progressive, with no resampling active, and at truecolor. Vegas' 8-bit settings are good for previewing but they have caused major quality loss on my encodes. Also, the resampling ghosts the fuck out of stuff (re: Black Sun), and its encode speeds are insanely slow even with multi-core or GPU encodes active. Vegas also has serious difficulty in producing quality/size at all comparable with a true x264 encode. Thus, see Vegas merely as a gate to getting major edits into a video only if you need them. Stuff like music can be done in Audition. After Effects is incomparable to Vegas when it comes to making timely, simple edits, for the simple fact it is slow, resource intensive, lacks core features like realtime audio preview, and is extremely poorly laid out for our kind of work. Also it crashes a lot. Yay!

* If vegas won't open a video you lack the codec. Many formats it simply doesn't support due to Sony being bitches, though, including x264. Thus, you'll want to ONLY edit raw fraps files or camtasia codec files with this, and encode stuff AFTER.
* If you have issues with random chunks of video not appearing when encoding you need to turn off the option that tells Vegas to unload stuff when out of focus. This is the ONLY way to fix that bug I've yet discovered. This will, however, make vegas use more ram if your project has a lot of files. Good thing everyone's on at least 12gb of ram these days.
* There is extremely little difference from version 9 to version 11 of vegas. Virtually nothing that effects us.
* Vegas can hook capture cards but it's very slow and ineffective. Use virtualdub.

Simple x264 Launcher - An alternative to Megui, SxL takes avisynth scripts, lets you choose a Constant Quality, then gets rolling. It does not handle audio. It's quick and effective if you're not one to monkey with settings. This can in some rare circumstances be faster at encoding than megui. It isn't for me. This is a free program.

* Use megui to encode the baseline audio using the same avs script you use to encode the video with this program. Then mux in mkvmerge. yay.

Staxrip - A program suggested on Teamliquid a time back. Simple, and effective, for basic x264 encodes. It lacks the power, speed, and customization of megui, but if you can't get into the two aforementioned launchers this may be more to your liking. This is a free program.

mkvtoolnix - Primarily, we want mkvmerge out of this. mkvmerge has some unusual bugs in it we hope to catch in our verification process, including the potential to BSOD your computer by crashing the display driver if you're playing the video using DXVA. In other circumstances it may cause videos to stop playing and crash the player for seemingly no reason. This happens entirely randomly and can be "fixed" by re-muxing the videos. Luckily, re-muxing takes only a few seconds even for very large videos since it doesn't encode anything. The bugs, however, seem unavoidable no matter what version of the program you use. I've yet to find a replacement for this program.

Audio

Audition 1.5 - There is no real substitute for Audition except for perhaps Sony Acid, according to Azrael, which I've yet to try. There's only one person I talk to who can do decent work with Audacity, but Audacity still doesn't provide the power Audition does, especially in compression and noise reduction, and to get close you need to find very specific third-party plugins - if they're VST chances are they work with Audition, too. 1.5 is the version you want, no sooner, no later. Audition's only weakness is its multitrack editor is less than stellar on controls. This program isn't free, but finding it for "free" will probably need a bit of luck. If you can get it, you're set for life.

* To get Audition to properly rip AAC audio from mkvs you'll need to do monkey work with haali media splitter and some other shit I forget about. It's an annoying process. But you can always encode your audio separately in megui, it's very easy to do so.
* Installing Sound Forge will give you functional directX plugins to work with as some defaults seem buggy. Be sure to enable them through View > Enable directX filters or whatever.
* Get your hands on AC3Filter and some plugins to handle the various filetypes common today, like flac, ogg, and .aac. Google can dig these up pretty easily.
* All of our audio should be saved as ogg or AAC (mp4) when convenient. Mp3 is awful in comparison.

Sony Vegas - If you're somehow stuck in a shitty situation where you need to constant sync stuff you're probably best off doing it in Vegas. I had to do this for Viking. It sucked. Use fraps and don't end up in that spot.

Misc

Avisynth - You'll need this installed to use .avs files. .avs files are just renamed .txt files. Various launchers require .avs files to know what files to process and how to process them. Avs files can be as simple as pointing to a series of fraps files to string into one file or as complex as cutting those files, changing framerates, and resizing them with various algorithms. There's a wiki about this sort of thing if you're into wikis. This is also free. For megui specifically -> http://mewiki.project357.com

Avisynth Batch Scripter - You can use this program to create a template of many fraps files to then edit or copy paste as you deem fit. Make a directory, stuff the fraps files you want to make a single video out of into it, use this template;

Code: Select all

+AVISource("%PATH%\%CLIP%.%EXT%")

Spits out a text file where ever you told it to. Use that text file, and doctor it to look like this.

Code: Select all

AVISource("E:\manlatcher\VirtualDub 2012-04-12 23-10-41-38.avi")+AVISource("E:\manlatcher\VirtualDub 2012-04-12 23-15-28-55.avi")
ConvertToYV12()

The notable changes to the script are the bottom line and the removal of the + from the very first video. Simple shit, and you've got an encode-ready script. Oh, and the program's free, too.

Jdownloader - Although it doesn't help us in making videos, if you want to rip anything off the internet this is a good program to start with. Great for bypassing annoying file locker wait times amongst many others. Also lets you see just how badly youtube is bloating your online media.

Process Explorer - A monitoring tool more powerful than the Windows performance monitor. See just how much disk activity and other things going on may be effecting your performance.

Hardware and Recording Environment

Here's some tips and info to help you understand hardware and how it effects recording quickly.

- Fraps is above all hard disk intensive, followed loosely by CPU. Above all you want fraps undivided access to a recording drive that is not fragmented. Do not record to the same drive the game or windows is on so there's no competition. Keep the IDE queue clear (no transfers going on elsewhere) for the best performance. Avoid recording to slow externals, especially USB 2 drives, if you're recording HD. Drivespeed is important because of the data transfer rate for building fraps' files as it records. If the drive is very slow it will dramatically impact performance. So, have at least two hard drives in your machine for the best and most controllable results.

- Have at least an i5, preferably an i7, if you want to record. This is so the games perform well with background activity going on. Obviously, the smaller the frame size you're recording the lower the HD/CPU requirements will be. If you're recording without fraps, but something else that compresses in real-time, your cpu requirements will go up. I was able to fraps Crysis on max available settings in windows XP on a Radeon 9800 pro because of my drivespeed. GPU has little bearing here.

- You don't need a good sound card, but you do need a good signal. If your tests yield background noise for your mic this will become a serious hassle later on and annoy your viewers. I recommend sticking to USB mics unless you know your shit, as they'll simplify any potential complications and generally come with their own pre-amp. I recommend this mic, the one I was recommended > http://www.bluemic.com/yeti/#/specs/

- Fraps will help you avoid sync issues. If for some retarded reason you end up recording game and mic audio separately you could easily run into sync problems, especially from a console.

- A lot of emulators have their own recording options but may not be able to capture the mic. If fraps is giving you trouble in emulators try unlocking the FPS (they hate having their fps fucked with).

In summary, if you have a decent machine and two hard drives, you should be capable of recording 1920x1200 no problem. But if you're on ancient hardware, especially being restricted to one HD, problems will quickly arise. You could seek out using an alternate method of recording, like Playclaw or dxtory, and see if their compression gives you any performance boost. But, make no mistake, recording HD video is not for "gaming laptops" or budget craputers from Dell.

Console Hardware & Recording Environment

For console recording I was recommended the Blackmagic Intensity Pro by Totalbiscuit and others, particularly the internal card and not the USB external. It's a good piece of equipment but the software that comes with it lacks the features we need. Following the basic setup instructions will get you started with this card and running in minutes. Key note is to make sure the BM control panel matches your input. So for the Ps3 that will be 720p 59.99 or whatever the fps is. Screw this up and virtualdub won't see shit.

I'm using an optical cable to feed the PS3 directly into my soundcard, while I'm using Component cables and the card's breakout converter to feed 720p to the card. The ps3 doesn't have real HDMI, it has make believe HDMI, so the capture card can't see it. Stupid sony. In normal circumstances you would record the incoming video with the capture card's hooking application, but I find the best and only reliable way to capture this is to use virtualdub to hook it, then fraps the virtualdub window. Otherwise you need to record video and two audio streams entirely separate of each other and this is just a fucking headache at the very best, at worse you get what I got which was desynced audio up the frenchman. Stick to frapsing virtualdub and you can avoid that.

The big problem outside of recording is the input latency. There is very much a short latency, I'd guess around 30-50ms, between you doing something and it registering on the monitor. That latency is likely to increase if you go to 1080i or 1080p. This latency doesn't effect most games, but something incredibly twitchy is likely to bite you in the ass. A particular QTE in God of War 2 took me 2 hours to do because of the speed. I'll get back to you when I do the DMC series. :3

This card will run you around $200 give or take (I had to order from the US since no one in Canada carried it for under $300, faggots), but it is worth the investment if you want to do console LP's. I've successfully tested PS2 recordings too (using Composite in the Component slots), so it's not unthinkable to do vintage consoles.

Full Pipeline

Right, so we've got our shit set up. What does it look like exactly when I record something? Let'say... Starcraft 2.

First, I fraps it. We're either frapsing the pc game or frapsing virtualdub once it sees our console.
Then I stick the fraps files into an empty dedicated folder.
Then I generate a script using avisynth batch scripter for that folder.
Then I grab that text and paste it into a dedicated avs and edit it slightly as mentioned.
Then I encode with megui. I typically use a Constant Quality of around 30 or 28. If you don't know what to do, make a copy of the Blueray - Standard profile and set the constant quality to 30 and try that. I encode the audio to AAC.
Then I send the audio to Audition. I detailed a bit about compression in a video somewhere. Basically you want to apply a Dynamics Processing profile to the audio (particularly if your voice is prone to screams like mine, or is sometimes very quiet). The default Soft Limit -18 profile should work fine in many circumstances (used it for GoW3 and a lot of Conan).
Then I save that edited audio as an AAC/mp4 and re-mux it to the video with mkvmerge.
Then I sit back and watch and make sure everything is OK. This is the verification process, and we're looking out for any kind of quality issues, artifacts, sync problems, or mkvmerge internery.
Then upload to FTP and release if the series is done.

Other than the encoding and verification this process usually takes only a matter of minutes start to finish once you know the ins and outs.

Problem Solving

Making mods, videos, or having sex with grizzly bears is all about problem solving. The pipeline I've forged here is the result of many destructive, often project-killing problems. The reason I stick to fraps so readily, and the reason I use X program instead of Y alternative, is because of performance and reliability. Even so, starting off, you're liable to run into many problems.

"My game audio is too loud"

Directly recording game audio results in a very different sound then what you hear from your speakers. More often than not you'll need to turn down the game's audio very significantly (usually by around 80%) to get a good balance going. Likewise, test to make sure your mic is picking up your voice good enough, and not too loud.

"I get crackling and/or glitches in audio"

To solve potential hardware problems we need to run many tests and ask ourselves a few questions when addressing more complex issues.

Does the crackling occur in the source (fraps) files?
Can you reproduce the crackling/bugs reliably by performing certain actions in the game?
If you record the audio streams in Audition, do you get the same bugs?
Have you tried turning down the game/mic audio?

While these problems are rare they can be indicating many different problems. If the bugs occur after you encode videos/audio you may want to either change codec settings or try an alternate audio codec. If they occur in the source files and are clearly happening when recording the problem becomes considerably more complicated. Changing settings, especially frequencies, in the Windows control panel for audio is a potential place to start. Making sure your sound card's (generally crappy) environmental features aren't active (like reverb or compression) is also a good place to start.

Failing that, if you're running on some crappy built-in audio chipset direct recordings may not work well at all. Try recording only from your microphone.

"My video changes color/darkens when encoded"

This is a very weird problem HKS encountered with megui. Using Simple x264 Launcher, the encodes came out fine. The video card's control panel may be superceding color and brightness settings in your media player, or your media player (if you're not using a standard one like MPC or VLC) may just be terrible. Failing that, we never figured out what the exact cause was.

The darkening effect HKS experienced was very similar to encoding videos out of vegas in 8-bit, which caused a huge quality drop and this odd darkening effect. However, the "8bit" that megui uses seems very different from the setting Vegas has, as I have personally never ran into this bug. If megui causes this, try another front-end.

"My audio desyncs"

Use fraps and don't record the audio separately. Fraps has never desynced the audio for me. I am unsure, but doubt, if the unlocked fps setting causes any kind of sync issues. If fraps still somehow causes audio sync issues this may hint at hardware problems or some extremely unusual internery going on with the way the audio stack for the game is being handled.

"My x264 encodes are very large"

Set the Constant Quality setting to a higher number. 30 is pretty low quality but makes great Starcraft 2 videos. Remember that high motion and color density creates larger videos than low motion. Also, if you're making 60fps videos, they'll be twice as large as 30fps videos for obvious reasons. Some tuning settings, like Grain, result in higher quality but make the filesize larger as well.

Also make sure you are actually using a codec for audio and not dumping it as .wav or something.

"Fraps can't capture X game"

There's a few games fraps still can't hook, most namely Age of Wonders 2. Try one of the alternatives in this case. Fraps should be able to hook Brood War just fine since they patched it a time back to be able to do so, but it won't show the fps counter. In my tests fraps would NOT hook a windowed Brood War from Chaoslauncher.

"I want to add music to my video, but that's it. Do I need vegas?"

Use the multitrack editor in Audition to overlay music as a separate stream, then save to a single file.

"Megui is assigning my encodes incorrect aspect ratios?"

You need to have the preview window open and selecting "Preview DAR" when you press queue/encode. Don't ask me why, this is kind of silly. You can try to force DAR through the AVS too, but this is easier.


This miniguide is not entirely complete, and will likely be polished over time.
Last edited by IskatuMesk on Thu May 10, 2012 4:31 pm, edited 3 times in total.
Image~[Gameproc]~Image
Warning: dialogue contains politically incorrect content. Viewer rearsore may occur.


Gradius
Terran Missile Turret Rotary Tester
Terran Missile Turret Rotary Tester
Posts: 42
Joined: Sat Oct 25, 2008 9:04 am
Status: Offline

Re: [MiniGuide] Recording & Processing Game Video

Postby Gradius » Thu May 10, 2012 3:59 pm

Been using megui since forever. It's the best, especially for youtube.


Return to “The Workshop”

Who is online

Users browsing this forum: No registered users and 1 guest