Replay

“Gotta move that gear up!”This article may contain content that is out of date.You can help improve this article by updating the content as necessary. See the wiki style guide.
The specific instructions are: The list of console commands and variables are out of date.

The Replay tool is a feature introduced in the Replay Update. The Replay tool enables players to record video footage of gameplay in Team Fortress 2 and edit it directly from the game client. The feature was initially added to Team Fortress 2 Beta on March 9, 2011, but was added to the full game on May 5 as the main focus of the Replay Update.

On servers that enable the feature, video replays of a player's life are recorded and saved directly onto the server. After a player dies, they can choose to download these recordings for editing within the game. The editing features enable scenes to be cut from different angles and include a variety of options including field of view and motion blur. After editing, the Replay tool allows for cut videos to be uploaded directly to YouTube.

With the introduction of the Replay tool and the Replay Update, the First Annual Saxxy Awards were announced as a contest to encourage players to create and upload videos recorded with the tool, as well as eight Replay achievements which have been added to the game.

Contents

Recording

HUD notification that appears upon replay download completion.

HUD notification that appears when recording is available.

To record replays, the player must connect to a server that has enabled the feature. A server that supports video replays can be identified by the filmstrip icon () next to the server's name in the browser list. Note that replays cannot be recorded on listen servers, i.e. local servers created through the 'Create Server' option in the main menu.

After the player has died, the recording can be downloaded by pressing F6 (default) or using the console command save_replay. A dialog window will appear to confirm the name of the video (by default, it will contain the map name, the date and time of the recording) and once confirmed, the recording will begin to download directly from the server. After the download has completed,a notification will pop up to inform the player and from there, the player can access the recording from the 'Replays' screen accessed from the main menu.

Replay menu

The Replay menu can be accessed from the button in the main menu. The screen shows all saved replays and movies. Each replay is accompanied by statistics related to that particular life, such as the class played, the player's score and kill count, and the map featured in the video. Replays can also be filtered via the search function in the menu.

Individual replays can be viewed and edited by clicking on the 'Watch / Edit' button. This loads the replay file and enables the Replay tool's editing functions for use. From the menu, the player can also save a selected replay to a movie file (for encoding options in greater detail, see Help:Replay Editor).

Replays can be deleted at any time by the player. Replays, before being encoded into movie files, exist in the Source Engine demo format (with the file extension .dem) under the directory /Steam/steamapps/common/Team Fortress 2/tf/replay/client/replays. The main limitation of replays in this format is that they are likely to become unreadable in the event of a game update. As such, before exiting the game the player is warned by a dialog message to save existing replays as movie files instead. However, once saved as a movie file, the clip cannot be edited unless using external software.

Editing

The Replay tool's editing functions can be accessed by opening the replay and pressing Space (default). The editing HUD contains play, pause, rewind, and fast-forward functions and the first-person, third-person, and free camera viewing angle options. Class icons in the bottom-left corner also allow for quick identification of the whereabouts of particular players at the selected time in the video.

Editing with the Replay tool is done in takes. Each 'take' is a selection of video defined by in and out points. The player can set the in and out points (or 'start' and 'end' points) with the buttons on either side of the Play button. The three viewing angle options (first-person, third-person and free camera) can be manipulated at any time to alter the position of the camera by selecting their respective icons in bottom-right corner.

The sequence of the video between the two points including the angles can be saved as a take by clicking the icon in the top-left corner and selecting 'Save'.

Saving

Whole replays or previously-edited takes can be rendered from replay files (.dem) into movie files. In the Replay menu, the player can select the 'Save to Movie' button to bring up the Save options dialog. The filename, resolution and video quality settings can be selected in the dialog, and filesize and time to render estimates are also provided based on the current settings. Checking the 'Show Advanced Options' box displays further options including video codec, render quality, motion blur quality, and an 'Enable Glow Effect' checkbox.

The save feature supports rendering of replay files with two codecs (H.264 and MJPEG-A) with 5 preset resolutions (480p, 720p, 1080p, Web, and iPhone). Alternatively, the replay file can also be saved to raw files in the form of a .tga sequence and an accompanying .wav file. This method renders each frame in the video to an individual .tga file at maximum quality and renders the audio for the scene to a .wav file. The sequence and the audio file can then be encoded together using a video processing program such as VirtualDub (see Help:Replay Editor for further detail).

Rendered movie files are saved to the /Steam/steamapps/common/Team Fortress 2/tf/replay/client/rendered directory. After rendering, the video can also be uploaded directly from inside the game.

Uploading

The login prompt for YouTube.

Replay movie files can be uploaded directly to YouTube from inside the game. Inside the Replay menu, selecting a rendered movie files appearing in the 'Saved Movies' list and pressing the 'YouTube It' button will open a YouTube login window and prompt the player to login. The player can then edit the video's title and description while it uploads.

Added the ability to specify an output directory from the command line. Running a server with the optional parameter ‘–replayserverdir <dir name>’ will output all replay data to ‘tf/replay/<dir name>’. For anyone running multiple servers out of the same directory, you’ll want to specify a different output directory for each server. This will avoid collisions and potential issues running replay. Look for confirmation on startup – you should see something like this:

Using custom replay dir name: "replay/<dir name>"

For admins who have their server(s) configured to server replay data out of a local Web server: the ‘replay_local_fileserver_path’ bug is now fixed. Even if replay_local_fileserver_path pointed to a valid directory, the server would lie and say the directory was invalid.

Replay publishing system will try to do a rename for local HTTP mode but will manually copy and delete the file if the rename fails, which can happen if the source and destination are on different volumes.

Fixed replay data cleanup system, which cleans up stale data at the end of each round. This asynchronous operation can be explicitly invoked by executing a replay_docleanup command on the server.

Any time replay_fileserver_offload_hostname is modified, the corresponding IP is resolved and cached, if possible. This fixes a crash, as well as failed publishing due to "unresolved hostname" errors.

Added a fileserver IP lookup test to replay publish test

Setting replay_enable to 0 now halts recording and does cleanup automatically, the way replay_stoprecord does. This fixes a crash that would occur when replay_enable was set to 0 and a changelevel was executed.

Replay temp directories automatically cleared on startup on both client and server

It is possible to work around this bug by manually saving an empty .wav file (signed 16 bit, stereo, 44100kHz) named ".mytempwave.wav"to the user /Steam/steamapps/common/Team Fortress 2/tf location with a WAV file editor. The workaround will need to be performed each time a movie needs to be saved.

Some viewmodels may appear incorrect or not appear at all in first-person mode. Some particle effects may also not be rendered.

Replays which take place in maps with more than one light source may appear overlit if the last map played has uniform lighting.

Upon creating, editing, and watching a Replay and then joining a match, no in-game text chat or voice commands will be displayed until the player opens the text chat box.

The Administrator's responses in a Replay treat RED as the ally and BLU as the enemy, regardless of the Replay owner's team.

Ragdolls in a Replay may fall or move differently each time the Replay is viewed and/or edited.

The replay can be uploaded to a YouTube account before the account has an upload channel configured. After the upload finishes, a message indicating a connection problem is displayed.

Kills made by Sentry Guns belonging to the Replay's owner are not counted on its statistics.

Occasionally, if the owner of the Replay uses a Dead Ringer during its length, the Replay will end when their feign death activates.

Sometimes, if you slow down or speed up time and change the view to first person, then change the time again, the speed will stay the same as if the time wasn't changed. Changing the view to third person or freecam usually fixes the problem.

Servers running on Halloween event maps with Replay enabled won't show the Haunted Halloween Gift model or particles when it's received by a player.