Sign in to follow this  
Steamworks

Demo Recording/Rendering Guide

Recommended Posts

So...replays are a rarity, but everyone still wants to show off their skills while dunking on nerds (or maybe just show some dodgy shots by others while spectating suspected hackers).

 

If you haven't already, you'll need to enable the Developer Console, which is Advanced Options and/or just add -console to your launch options (-novid is another good launch option to have since it skips the video at startup of the dude with a valve in his head). Once enabled, the ~ key will open the console.

 

To start recording, just enter the following into your console:

 

 
record demoname

You can use anything in place of "demoname". Being kind of descriptive helps here since it'll help later when you're trying to find the one you want. This won't use any extra resources (aside from a tiny bit of HDD space (nearly 2300 demos amounts to roughly 69GB)). However, the .dem files can't be played back in anything other than TF2 itself. If you want your own voice included in the recording, voice_loopback 1 will do it at the cost of you hearing your own voice thrown back in your ears (voice_loopback 0 will turn it off again). Personally, I find that really annoying, so I never use that particular option Playing them back is as simple as putting this in your console

 
playdemo demoname

You can also use shift+F2 or either of the following commands to bring up an interface for demo playback

 
demoui

demoui2

I personally use shift+F2 or the demoui button on the main menu of my HUD to start playback. Plus, all those controls let you jump to certain ticks, speed up/slow down playback, pause, resume, etc. Now that it's playing back, you're probably wanting some way to get it into video form that can be put on the youtubes. Just throw the following into the console

 
startmovie moviename h264

You'll need Quicktime installed, but it'll produce an MP4 file in your /tf folder. Alternatively, you can leave off the h264 part and get a metric shit ton of TGA files and a huge WAV file that you'll have to later stitch together and what-not. If you're not doing anything fancy, the h264 part is probably your best bet. Regardless of which encoding option you use, it's probably gonna take a while, so sit back and eat your ramen or whatever while it records. Also, that MP4 file will be pretty big. To stop recording:

 
endmovie

 

 

I've seen it be a bit buggy if you don't use that command before the demo ends.

 

That's all kind of a lot of work for pretty basic video, right? The TF2 community has you covered when it comes to making much fancier videos with some handy tools.

 

P-REC: https://bitbucket.org/olegko/p-rec/downloads

 

That one will automatically record demos for you. prec_mode 3 will record everything instead of just recording matches in tournament mode. prec_delete_useless_demo 1 will get rid of the worthless ones. prec_min_streak <value> will auto-bookmark demos so they don't get deleted assuming you get at least that many kills. Binding prec_mark will let you manually mark a demo as not worthless.

 

Further reading:http://tfscribbles.wordpress.com/2012/05/01/an-alternative-replay-system-adapting-prec-for-public-servers/

 

Now that you have your demos recorded, let's get them into a form that can get shoved on YouTube.

 

Lawena Recording Tool: http://code.google.com/p/lawenarecordingtool/

 

This basically simplifies the process of using the in-game movie making commands without having to remember a ton of commands and temporarily boosts your graphics settings up to max for recording purposes. Pretty much, choose your video frame rate, choose your fancy movie HUD, and hit play. Load your demo, and then hit P when you get to the part you want to start recording. Hitting P again will stop the recording. It also does some stuff with the thirdperson and doing cool third person crap with the camera.

 

Source Recording Tool: http://teamfortress.tv/forum/thread/15301-source-recording-tool

 

This one's new and does a lot of the same stuff as Lawena, but it does offer a lot more functionality out of the box. The controls look a little intimidating at first, but they're not too complex after you stop freaking out and look at them for a minute. If you throw VirtualDub into the mix, it can even automate turning the recorded footage and crunching it into something a little more manageable.

 

As far as recording settings go, 120fps is gonna look buttery smooth when crunched down to 30fps for YouTube. I tend to use 480fps if I'm gonna do any sort of slow motion stuff. I've also taken to using motion blur, too. I also love using the PLDX particles since they make everything look fancy as buck (but they tend to not show unusual effects, unfortunately).

 

File size...I use the TGA + WAV audio option for 1280x720@480fps, which will fill a 2TB HDD with only 24 minutes of footage. Dropping the frame rate dramatically drops that size, obviously. I haven't messed with SRT's h264 option, so I don't know how big those will be, but I'm guessing it'll still be pretty big.

 

Also, this takes time to render out. My i5-4670k@4.1GHz takes maybe 2 seconds to render out a second of video. My old Phenom II x4 965@3.8GHz would take about 6 seconds to record a second of video with these, so be prepared to wait a little while, and I really can't recommend recording more than clips with these. Longer stuff is much better server by using Open Broadcaster to record it (free and much more manageable file sizes than fraps).

 

I usually import it directly into Adobe Premiere Pro for the basic editing and give it a once over with Adobe After Effects, usually color correction and a little added contrast. Sony Vegas is also pretty decent as far as video editors go. I'm not sure what decent free editors are. The crappy one that comes with Windows is okay enough to stitch videos together, but it's pretty frustrating for anything more advanced than that.

 

Go go gadget laziness. Lucky Luke (the guy behind stuff like Moments of Glory and the Top 10 Plays videos) has this FAQ thing covering quite a few basic questions: http://www.thelozone.com/faq/tf2-movie-making/

 

He also put up this demo smoothing tutorial:

 

If you're really insane and want to make 2160p videos (or you just want to make 1080p video but only have a 720p monitor), SourceRes can hook you up.

Share this post


Link to post
Share on other sites
Sign in to follow this