Saturday, June 27, 2009

Team Fortress 2 movie recording guide


pldxtitlerecordingguide2



This guide will explain how to record your demos to video files in Team Fortress 2 with perfect quality. All you need is a few files to make the process a lot easier (movie config and hud files). All these files are included in one zip archieve.



I'll start by saying that the footage you record in TF2 is lossless footage, which means that the file size for the videos is very large. In other words  you will not be able to play the videos that you've recorded, because they seem "laggy". This is just due to the file size and your hard drive not being able to read the file at the required speed. You need to compress the video in order to watch it without the video lagging. However you should keep the lossless video codec if you are editing your movie, so that the finished version of your movie will have the best possible quality.

Step 1.
Download the movie files here. Then extract the files any where you want.
extracted


Then open the PLDXRecordingTool. It will ask you to locate your tf directory which can be found here:

/Steam/steamapps/accountname/team fortress 2/tf

If you have SourceSDK installed, it won't ask for the tf directory.

The recording tool will make a backup of your game files in the moviefiles/tf directory.

This package includes all the required hud files to remove the unnecessary things from the game hud, it also contains the movie config. What is more, the package makes the recording process a lot easier.

NOTE! you don't have to use the recording tool if you don't want to, but it makes the recording process a lot easier not having to copy files back and forth. If you just want to use the config,  then download it here.

Step 2.

Now you should have the recording tool open and it should look something like this:

menu

In the menu you have many options that you can change, like the game launch properties and in-game settings. You can change things like the resolution or change in-game settings like the fps or crosshair. The in-game settings can also be changed in-game :).

the TGA and AVI slots show how many slots you can record to, when they are filled you need to delete all the TGAs and AVIs to record more.

The settings in the recording tool can only be changed when you are NOT in-game.

Press Launch TF2 with Movie-files to launch the game with the movie settings. The tool will move your game files to another directory and launch the game with the movie files. Once you quit TF2, your game files will be placed back in the correct directories.

Step 3.
In this step I will explain how to use the config ingame. When the game started the console should be filled with a menu. All the keys are listed on the left and their functions on the right. So I will list here what the keys do:
consolenew

NOTE! Only the F-keys work when in the menu, all other keys only work in-game.

You can browse through the menu by pressing F1 (UP) and F2 (DOWN) and F3 to select/change settings. The small ">" notes, which setting you are changing. Don't hold down F1 or F2, because this might crash the game. Just press the key and let go...

F11 - this key records your demos to .avis, it also stops the recording, but you have to press F11 twice to stop recording, because for some reason it doesn't stop recording when you press F11 the first time, I will try and fix this. Recorded files can be found in:
/Steam/steamapps/accountname/team fortress 2/tf/

F12 - this key records your demos to .tgas and .wavs. I highly recommend this instead of the previous recording method, because this one actually works. Once you have recorded your movies you need to compile them in virtual dub, which I will explain in this guide. To stop recording just press F12 again. Recorded files can be found here: /Steam/steamapps/accountname/team fortress 2/tf/
reckeys

F7 - With this key you can decrease the recording frame rate
F8 - This key increases the recording framerate.
consolefps

Mousewheel - With this you can control the demo playback speed. If the console is empty after you've changed the playback speed, then press F4.
Enter - If the demo playback speed isn't 100 % then this key will bring the playback speed to 100 %. If the demo playback speed is 100 % then it will pause the demo playback and once the demo is paused you can press enter which brings the demo playback speed back to 100 %.

consolefastfor

B - Enable/disable depth overlay

depthoverlayconsole

Depth overlay off:
depthoverlay2

Depth overlay on:

depthoverlay1

Read more about how to use depth overlay in this tutorial.

, - This key decreases the viewmodel fov
. - This key increases the viewmodel fov

consoleviewmodel

HOME - this key turns all models to wireframe and pressing it again will turn the models back to normal
END - this key toggles different wireframe modes
wireframe

Example of model wireframe:
example_viewmodelwireframe

Example of wireframe:
example_wireframe

INS - change the crosshair type
DEL - Change the crosshair color
PAGE UP - Change crosshair scale
PAGE DOWN - This removes everything from the hud, including the drawviewmodel (player hands).
consolehud1

M - This key might be useful for some movie makers. Because some players keep changing their crosshair type, color, size etc... this key locks the crosshair so that it will not change. Once the crosshair is locked you can't edit the crosshair settings anymore, which means that you will have to restart your game again to edit these settings.
consolehud2

SHIFT - This key turns from firstperson view to thirdperson view. You can move the camera in thirdperson view with the arrow keys and zoom in and out with Z and X. To turn back to firstperson view press shift.
C - Controls the camera speed
V - Lock the camera position. The camera will follow the player, but it won't turn in any direction.


thirpersonkeys

Example of the thirdperson view:
thirdperson

F9 - Applies full graphics (the full graphics are already applied on startup so you don't need to use this)
F5 - High Quality Screenshot (.jpeg)
F6 - High Quality Screenshot (.tga)
F - Opens demoui
G - Opens demoui2
F4 - Refreshes the movie menu.
F10 - Quits the game
lastpart

Compiling Video and Encoding Movie

What you need before using the tools are:

Once you have downloaded these two programs copy the content from the archives to moviefiles/mplayer.

resizedcopy

Now the compile video and encode movie tools work.

Using the tools is pretty simple. Any videos you've recorded in TF2 can be encoded and compiled in the compile video tool.

If you recorded tgas then you can compile them to:

  • Lossless video (HuffYUV) (.avi)

  • h264 encoded video (.mp4)


If you recorded using avi mode:

  • h264 encoded video (.mp4)


All your recorded videos and tgas will show up in the compile movie window and there you can select what you want to do.

compilevideo

I have recorded two clips using the tga mode and three clips using the avi mode.

I'll first explain what you can do with tgas. It is important that you select the correct Input FPS. The input fps is the fps you recorded ingame with, if you select the wrong input fps then your video will playback too fast/slow. I recorded with 120 fps so I have selected 120 fps for the input fps. If you want to compile the video to a lossless avi then you can select whether the audio stream is included in the video or not.

If you want to encode your videos (TGA and AVI) to h264 then you need to take a look at the FPS option in the h264 settings. The FPS defines the output fps. To select a good output fps then the input fps needs to be divisible with the ouput fps. So my input fps is 120 and output fps is 60 and when I divided input with the output fps I get a whole number; 120 / 60 = 2. If you don't get a whole number when you divided the input fps with the output fps, then you need to select a better output fps (if you want a smooth h264 encoded video).

You can select multiple videos and encode them to h264/compile to lossless video.

Encode movie...

encodemovie

The encode movie tool lets you encode any video to h264. If you have finished your movie in Vegas/Adobe and exported it as an uncompressed video then you can use this tool to encode your video to h264. It is very easy to use, just remember to select the correct output fps for your video.

Configuring huffYUV

You might have to configure/install the huffYUV codec on your computer to be able to import videos into your video editing program.

What you need:

  • ffdshow (you most likely have this installed, check in start>all programs and see if you have ffdshow there. If you don't then download it and install it)

  • huffYUV


Once you've installed ffdshow go to start > all programs > ffdshow > Configuration

Select Codecs from the list on the left. Then look for Huffyuv in the codec list and select libavcodec as the decoder for it and press OK.

Then go to start > all programs > ffdshow > VFW Configuration

Select the Decoder tab at the top. After that you need to select Codecs from the list on the left. Again look for Huffyuv and change it libavcodec.

Installing HuffYUV for Windows 7 64-bit/ Vista 64-bit

Download HuffYUV and extract the files to C:\Temp (create the folder if there isn't one)

Then start command prompt as administrator. Type cmd into the start search bar and right click cmd and select "Run as administrator"

Type into command prompt:

cd C:\Windows\SysWOW64

Then type:

rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 0 c:\Temp\huffyuv.inf

Then you should have huffYUV properly installed

Installing HuffYUV for windows XP (and Windows 7 32-bit/Vista 32-bit ??????)

Extract the contents of the huffYUV archive somewhere. Then right click huffyuv.inf and select "Install" and you're done.

Downloads
Full menu versions:
version 0.1
version 0.2
version 0.3
version 0.4
version 0.45
version 0.5
version 0.51
version 0.55


CFG versions:
version 0.1
version 0.2
version 0.3
version 0.4
version 0.45
version 0.5
version 0.51
version 0.55


Movie hud files:
moviehud

Files to disable the default sniper crosshair:
download here

Green screen map:
download here

Special thanks to Aron for creating the GUI!

FAQ
Q: What is the viewmodel and what is the lock viewmodel option?
A: The viewmodel is the hands of the model and the gun model. Some players keep turning their viewmodel off and it affects the demo. So if you lock the viewmodel then it won't disappear if the player turns the viewmodel off.

Q: Why is the video that I recorded lagging/un-watchable?
A: It's because the video is lossless. If you want to watch your video you need to compress it with a video encoding/editing program.

UPDATED: 14.01.2010

No comments:

Post a Comment