Archive for the ‘howto’ Category

Making Game Play Videos

Tuesday, February 17th, 2009

There is a billion and one stupid gameplay videos on Youtube made by kids wanting to show off their 1337 pwning skills. Some of them are made by pointing camcorder at the monitor, but the majority are actual screen captures. I figured that if a 12 year old can make this sort of videos, then it can’t be difficult. So I decided to teach myself the art of making gameplay videos and will share that knowledge with you here.

First let’s talk about platform choice. If you want to make videos of game play, then you are a gamer. If you are a gamer, then probably own a PC with some version of Windows installed somewhere in your house, and that is your main gaming machine. That is the box you will be using for making the videos. I mean yeah, some people do play on Macs but they have a very limited library of games to pick from. Last time I checked, they can choose between World of Warcraft and… World of Warcraft.

If you are playing on Linux under Wine/Cedega then more power to you but that’s way to much hassle than it’s worth. I use my Linux box for serious stuff and my Windows box for gaming. So we will be using windows based tools here.

First thing you need is a screen capture software. I did a little bit of research on this, and the interwebs seem to think that FRAPS is the best tool for the job. Unfortunately it is a proprietary, and costs money. Now it is uncharacteristic for me to recommend non-free software but I downloaded a demo and it worked perfectly for me. It is small, unobtrusive, has almost no noticeable impact on your FPS or performance and worked perfectly for recording clips of Morrowind game play. The demo will only let you record 30 seconds of footage, but the full version has no restrictions.

It’s only $37, you get a lifetime license, free updates and there is no DRM involved. In my book, this is a sound investment. Of course if you are a gamer who scoffs at paying for software, then you probably won’t have to pay for the full version of this tool either. FRAPS is very popular, and thus you will very likely find illicit copies of it through the same channels as you find cracked copies of your games.

The interface is very intuitive and easy to use:

fraps.JPG

Note that if you are planning to capture Morrowind you will need to rebind the video capture key. By default it is set to F9, which by coincidence is “Load Quicksave” in Morrowind. I bound it to F10 and all was well.

You’ll probably want to capture video at half-size because this will reduce the size of the files FRAPS will generate. I recorded 3 minutes of Morrowind footage at full size and ended up with a 1GB avi file. If you are making vids that will end up being posted on Youtube you will have to re-encode these things into something more sensible anyway so capturing at half size shouldn’t really make a difference.

How do you use it? Launch FRAPS, minimize it, start your game and then hit the video capture hot-key (by default F9) when you are ready to start. Hit it again to stop capture. That’s it!

Now as I mentioned, FRAPS output files are HUGE with capital H and capital UGE. What you want to do next, is to load that shit into Windows Movie Maker which should be installed on your machine. If it’s not, you can download it. There are better tools for video editing out there, but you just spent $37 for you capture software so let’s cut our losses. Windows Movie Maker will probably be enough for now.

Open Movie Maker and drag the file generated by FRAPS onto it. On the bottom you should see a timeline where you can select frames and do stuff to them. On the sidebar, you will have options to add titles, captions and credits to your video. It’s all very straightforward and you should be able to figure it out in minutes. If not, there are millions of tutorials on the web that will teach you to use this thing.

croppercapture21.Png

So add a title, credits and whatnot and then hit “Save to My Computer” on the sidebar. It will then ask you what format do you want to save it in:

croppercapture22.Png

If you are planning to upload this video to Youtube or similar service then probably the best choice here is the “Video for Broadband (512 Kbps)”. Anything lower will yield crappy video quality. Anything higher will produce bigger file size which will then be converted to FLV and made look no better than the 512Kbps copy.

This took my 1GB video, and re-encoded it with much lower resolution into a 10MB avi file which was perfect for Youtube.

The end result can be seen here:

I’m pretty happy the way it turned out. I did get a weird stuttering glitch in Suran (you will know what I mean if you watch the video) but for the life of me I could not avoid it. You see that I hesitate for a second before I walk below the two banners just before that glitch hits. I did this run several times and it always glitched at that exact spot or somewhere near it. I could have edited it out, but that made for an ugly cut in the middle of the scene, so I just left it in.

Here is another one:

This time around I took advantage from Movie Makers’ ability to overlay titles and captions over the image frames. It probably took me 3 minutes to do this whole thing - its’ that easy.

Also, if you think I’m moving way to fast, you are right. But I’m not cheating or artificially speeding up the video. I’m wearing Boots of Blinding Speed (fortify speed 200, blind 100%) and Cuirass of the Savior’s Hide (resist magika 60%) and another enchanted trinket that increases my magika resistance so I can use the boots virtually without penalty.

Anyway, that’s how you get it done. Now that I have FRAPS you may expect to see me make more videos to either supplement my game reviews or just for fun.

Create Arbitrary Sized Sparse Files under Windows and Linux

Thursday, September 25th, 2008

Apparently there is something to be said about short blog posts. Allegedly I tend to get long winded sometimes and my posts can run a tad verbose sometimes. I usually tell people to STFU and go read Steve Yegge if they want to see verbose. I’m short, concise and to the point compared to him. But I figured that I’ll try some of that short blog post thing that people seem to be enjoying in other parts of the web. So I’m making a post about a silly little windows command. This is so that I don’t forget it about it next time I need it.

Have you ever needed a file of specific size to test something but you didn’t care what that file was? You know, just a space holder or a space filler kind of a thing? This is what you need to do to create one on Windows XP:

fsutil file createnew file.ext 10000

Naturally file.ext is the desired name of the file you want to create, and the numeric argument is the desired size in bytes. Note that fsutil creates a sparse file which means that this operation will be blindingly fast. For example it took about 3 seconds to create a 10GB file on my elderly windows machine.

Useful trick. I sometimes use it to see how a given app will act when it encounters a file of certain size. To accomplish the same thing in linux you apparently need to do something like:

dd if=/dev/zero of=my-file bs=1 count=0 seek=10G

I messed around with it, and the bs and count are important so don’t just skip them. The seek attribute specifies the desired size of your file, and here you can use human readable units (like 10Gb in the example).

So if you ever need a file of a specific size to test something, here is how you make one. How is that for a short post? What do you mean 350 words is not short? Ah, go to hell then. I tried. Next post will be verbose again. ;)

Using CPAN version of WWW::Mechanize with ActiveState Perl on Windows

Monday, February 25th, 2008

I end up doing this each time I reinstall windows, and every time I forget how I did it, so I figured I’ll archive the process here. Perhaps it will help some of you. And I know, someone will say why don’t you use the PPM repository. Let’s just say i don’t want to. I want to grab the latest WWW::Mechanize package from CPAN and run with it.

Why am I posting it now? Because I needed to reinstall windows once again on my desktop, and now I need to get my blackboard scrips to work again.

This is really a multi step process. I’ll assume you have perl installed already. If not, you can get Activestate Perl which works pretty well on windows. Just grab the MSI package, install it and all the useful tools including perl, cpan and ppm will land in your path. From there follow these 3 easy steps:

Step 1: Get nmake

You will need nmake - the windows version of the make utility to compile most of the CPAN packages. How do you get nmake? There are several ways to do it, but probably easiest one is to grab the Microsoft version of the tool from their knowledge base. Once you download it, dump it somewhere in your path. It doesn’t really matter where it is, but I stuck it in the bin directory of my Perl install.

Step 2: Get YAML from CPAN

You will need YAML to build WWW::Mechanize. What is YAML? Sort answer is: do you care? Long answer: look it up. All you need to know is that you need it. So run cpan from your console and type in:

install YAML

This should cause some streaming text on the screen as the package is fetched and compiled. If it fails, make sure nmake is in your path, and that it is named nmake.exe and not something else.

Step 3: Install WWW::Mechanize

Final step is the easy one - just fetch and install the WWW::Mechanize package using the traditional method:

install WWW::Mechanize

Make sure you do step 1 and 2 before you try this. If you have tried this before you installed YAML the build will fail for some reason. To avoid that, just quit cpan, and run it again. This will clear the local cache and will re-fetch the package for a clean build.

So, there you have it. I know it’s a bit of a dry and uninteresting post for Monday morning. But this is more of a reminder to myself than anything else. I never remember where to grab nmake or what is that other package without which nothing ever builds on windows. Hopefully some of you will find it helpful. :)

Gutsy on Dell Latitude D830

Friday, February 1st, 2008

I got my brand new Dell Latitude D830 laptop today, and the first thing I did with it was installing Gutsy. Dell was nice enough to partition the drive for me so I didn’t have to bother with resizing. This is possibly like the single most useful service they offer in their store. Installation went very smoothly, but configuring the laptop was a bit more rocky than my recent test with Inspiron 600m

New Dell Latitude D830 On my Desk

I’m pleased to report that my Intel PRO/Wireless 3945ABG card worked out of the box without any tweaking. It is listed in the Restricted Drivers section but there was nothing I had to do to enable it. It just popped into action and that was that. I’m very happy about this. As far as I could tell everything else except for the sound card worked. Yes Aplhast, my sound card doesn’t work! I’m blaming you! You jinksed it buddy! ;P

Lshw tells me that I have an Intel 82801H (ICH8 Family) HD Audio Controller. In Ubuntu circles ICH8 is an acronym for “fucking pain in the ass”. It just doesn’t work without major tweaking. Patching and recompiling ALSA might be required. And even then it is not guaranteed that it will work at all.

But there is no way in hell I’m willing to accept “doesn’t work” without at least trying. After some googling I found two possible solutions. First one was very simple - simply add the following line to /etc/modprobe.d/alsa-base:

options snd-hda-intel probe_mask=1 model=3stack

I did just that, rebooted and found out that this doesn’t work. Of course! Why would it. Things can’t be this easy, can they? I left the line in it’s place just in case and moved to the next suggestion which was equally easy. Just install one small package and reboot.

sudo aptitude install linux-backports-modules-generic

I rebooted and heard a faint chime of KDE startup sound. It was a little bit quiet so I mashed the Volume Up button above the keyboard. Gutsy actually knew about this button, and displayed a nice overlay volume bar on my screen. I maxed out the sound, fired up Amarok and played the welcome message. It wasn’t as loud as the sounds in Windows, but for my purposes it was perfectly adequate. So yes, sound is working. All is well!

Just about everything else worked including Bluetooth. Ot at least I think it works because the LDE lights up, and KDE has a nice icon in the taskbar which tells me the MAC adress of my card. Unfortunately I do not have any bluetooth toys that I could test it with. Any suggestions for a bluetooth appliance for this laptop?

The Nvidia Quadro NVS 140M card was red in the restricted driver panel signifying that the proprietary drivers were not installed but are available. Since everything looked fine I decided to leave it be for now. I could always go back and install the driver later. So I messed around with it some more, and then decided to plop it in the place of my regular laptop.

As soon as I connected the laptop to my external monitor and hit Fn+F8 (which is the CRT/LCD switch) everything went to hell. I got incredibly colorful, psychedelic, blinking patterns on both screens and that was it. Killing the X server did nothing - this weird display corruption had to be happening at a lower level. Only thing I could do was to pull the monitor plug and REISUB.

So I figured this was the time to install the nvidia driver. So I went to K-menu, System Settings, Advanced, Restricted Drivers and installed it without ever dropping down to CLI. Neat! Naturally I needed to reboot for the new driver to go into action. Unfortunately I immediately realized that Nvidia decided to take away my Fn+F8 function. I was able to flip back and forward between LCD and CRT during the framebuffer loading screen, but as soon as X started the picture would jump back to the laptop LCD and stay there.

It took me few minutes to figure out the magical spell I needed here:

nvidia-settings

It pops up a very nice config dialog you can use to set up he multi-display stuff:

NVidia Dialog

Once I did that, everything started working just fine. Now I’m running on a beautiful 1280×1024 resolution and enjoying how incredibly fast this hardware seems compared to my old 700 Mhz junker. It is a great machine!

If you are planning to buy a machine for Linux though I would probably recommend the Dell Ubuntu line - this way you avoid the fun I had here with the sound card. And that machine comes with an integrated webcam (kinda like Apple does) which is kinda awesome. I got this one because it was supposed to be a dual boot machine and I kinda needed it to have an XP license attached to it. I’d recommend it but only if you are not afraid of getting your hands dirty messing around with the sound card. You know what… I take that back - it’s just one package and one line in alsa-base file (I don’t know which one did it, and I don’t care at thisp point) - I did the research for you so it should be easy. :mrgreen: