Intro

In this short howto I'll describe how I record in-game demos while playing Team Fortress 2, as well as how to take the recorded demo and get it onto YouTube without the grainy quality you see frequently. This can also be used for other Source-based games, such as Portal or Counter-Strike: Source.

First I want to get some terminology out of the way - it may be simple, but it'll save some confusion:
Demo: an in-game recording, where everything you see or hear is recorded to a file. Requires a copy of the map played on to be replayed. It's also possible to view your character from a third-person perspective. Must be replayed through TF2.
Video: the moving pictures you'll see on YouTube :)

Let's start off by listing off what you're going to have to download. I'm going to assume you want to put your videos up on YouTube, rather than simply record the demo - if you just want to record the demo and not make a video you can skip these.
FRAPS is a screen recorder that is NOT FREE, but provides nice screen recording capabilities that may be preferable to some over the provided startmovie functionality of TF2. If you absolutely can't do it yourself, have a friend turn your demo into a video for you.

Recording

If you haven't enabled the developer console (simply referred to as console), go ahead and do that.
Main Menu -> Options -> Keyboard -> Advanced -> Enable Developer Console

Go into console (press ` or ~ to the left of the 1 on your keyboard) and type
record

Where would be the name of your demo. For instance, I might record a demo playing 2Fort by typing:
record pyrrhus_2fort_7_1_08

This will start recording the demo to the file "pyrrhus_2fort_7_1_08.dem". You might find it useful to use a similar naming scheme - the important parts being the map name and the date recorded, or some other identifier to let you know what the demo is.

After you've recorded whatever segment of gameplay you want (a few seconds, a round, a whole game, etc), you need to stop recording by typing into console:
stop

Note that if you are disconnected from a game it will also stop recording.

Converting to Video

To play demos, a few options:
demoui
demoui2
playdemo

Refer to http://developer.valvesoftware.com/wiki/Demo_Recording_Tools
for more advanced options for playing demos.

To record the demo to a video, a few options:
startmovie (records as a series of TGA images that can be combined to make a video, along with a WAV audio track that you can add to the video)
FRAPS (records as one AVI)

(INCOMPLETE - more details to come when I get back to this...for now I'll plug in some info from my preliminary notes)
After you record an AVI with FRAPS:
  1. Take huge AVI and open with VirtualDub
  2. Audio Settings
    1. Audio -> Full Processing Mode
    2. Audio -> Compression
    3. MPEG Layer-3 -> 32kBit/s, 22050 Hz, Mono
  3. Video Settings
    1. Video->Full Processing
    2. Video->Filters -> Add -> resize
    3. New Size -> 640x480
      • (640x400 for my video with a 16:10 widescreen...just enter 640 and the height will come out correctly)
    4. Aspect Ratio -> Same as source
    5. Framing Options -> Letterbox to aspect ratio (4:3)
    6. Video -> Compression -> Xvid MPEG-4 Codec
  4. File -> Save as AVI
  5. Wait
  6. Upload to YouTube
Remember, when viewing these videos on YouTube you might still see them as grainy/blocky/low quality at first - just click the "watch in high quality" link, and you're set!

Here's my example. Again, make sure you click "watch in high quality". For this particular video, I turned down the audio settings (for a test), although it turned out it would've been fine with normal audio.

http://www.youtube.com/watch?v=uI3i6hoaLmU