SourceTV offers the ability to have an unlimited number of spectators watching online games based on the Source Engine. SourceTV spectators are invisible to players and can't interact with the running game in any way. The camera view in SourceTV is controlled by an auto-director AI or a human camera man. The broadcast is usually delayed by a certain amount of time. This ensures that the playing teams can't use SourceTV to get any usable information about their opponents. SourceTV can also record server-side demos that contain the whole game with all entities and events.
Providing a SourceTV broadcast for only a few spectators is an easy task and only needs a single variable change on the game server. Installing a larger SourceTV network for thousands of spectators needs more planning time and experience about required bandwidth, CPU and RAM demands.
To watch a game via SourceTV, start Steam, and choose Servers from the Steam menu to open the server browser. Click to select the Spectate tab. You can narrow the list of servers by clicking Change filters and selected a specific game. After the list has been updated, double click on a server in the list you want to spectate and you'll be connected.
If game leagues announce upcoming matches to be broadcast on SourceTV, they often provide IP addresses of their SourceTV servers (
IP:Port). Instead of searching them via the server list, you can instead go to the Favorites tab and add the SourceTV address to your server list by pressing the right mouse button and choosing Add server by IP address. Alternatively, you can open the Source console window and use the
connect command to spectate a certain game. For example:
The default SourceTV port number is 27020, but may be changed. It should always be included in the given SourceTV IP address, since commonly this port number is different from the default game server port number 27015.
When spectating a game that is broadcast via SourceTV, the camera position and camera mode is chosen either by the auto-director or a camera man. Spectators can't switch spectator modes or players to follow as they could do HLTV, this feature was removed to reduce network bandwidth significantly. SourceTV demos still allow to switch modes and free roaming while playback.
SourceTV is fully integrated into the Source Engine and not a separate tool like HLTV anymore. To start broadcasting a game, the game server must enable SourceTV before the map is started by setting
tv_enable 1. That will create a SourceTV server instance which can be seen in-game as a bot joining the spectator team. The SourceTV server is living in the same process as the game server and is called the SourceTV master server. The SourceTV master server buffers all game data and events and broadcasts them with a certain delay to prevent cheating. The auto-director is a Mod specific module, that chooses the camera mode and position based on interesting game events (like player killed, bomb exploded etc). Additionally a human spectator can become a camera man and override the auto-director camera with his own view. SourceTV spectators then connect to the same IP address as the game server but using a different port for SourceTV, usually 27020. The port number can be changed with the
tv_port console variable.
This configuration is pretty simple but only works for a small number of spectators, since a single server host is serving all player and all spectator clients. For larger number of spectators, this will quickly exceed the available CPU/bandwidth capacity on this machine. Therefore it is necessary to distribute the needed bandwidth and CPU demands over a system of multiple hosts, that can be expanded with increasing numbers of spectators. This is done by setting up other SourceTV servers that are connected to the SourceTV master server and relaying its game broadcast. These servers are called SourceTV relay proxies where each proxy can serve up to 255 spectators again. SourceTV proxies can also connect to other SourceTV proxies and build an unlimited network of relay stations.
To setup a SourceTV relay proxy, start a Source Dedicated Server process without a running a map. The
tv_relay command connects the relay proxy to another SourceTV server/proxy. Here an example how to create a SourceTV relay:
srcds.exe -game cstrike -console +tv_relay 127.0.0.2:27020
The status of your local proxy can always be checked with the
tv_status command. Here and example output:
--- SourceTV Status --- Online 05:08, FPS 253.8, Version 2841 (Win32) Master "SourceTV", delay 30 Game Time 05:01, Mod "cstrike", Map "de_dust", Players 7 Local IP 255.255.179.38:27020, KB/sec In 0.0, Out 0.0 Local Slots 128, Spectators 8, Proxies 0 Total Slots 128, Spectators 0, Proxies 0
Total slot and spectator numbers are the accumulated numbers from all connected relay proxies. If a relay proxies loses connection to it's server, you can try to reconnect quickly with
tv_retry. To stop broadcasting and disconnect all clients, execute
The camera view in SourceTV is usually controlled by the auto-director module. Also a player, who joined the spectator team on the game server can become a camera man by pressing the USE key (usually 'E'). This will turn on his view as camera view for all spectators. The camera man can choose any spectator mode (First Person, Free Roaming etc), switch to any player or move around freely. The camera can be turned off by pressing USE again and the auto-director will take over again. Camera men should have a good knowledge of the general gameplay and practice camera movement before broadcasting live. A Dead player in spectator mode can't become a camera man.
The SourceTV master can record games without any data loss or network delay. All events and entities are recorded and the demo file can be played back just like a normal client demo (use the
demoui for playback). To start recording a demo file, SourceTV must be enabled before the map was loaded, then execute
tv_record demoname. Demo recording will be stopped next time the map changes or with
tv_stoprecord. To automatically record every single game you can set
tv_autorecord 1. Automatically recorded demo files will be named after the map and date/time when the recording started (
auto-YYYYMMDD-hhmm-map.dem). SourceTV spectators can also record the game using the normal
record command, but as in normal client demos, you can't change tracked player or spectator mode during replay.
Sometimes you might use SourceTV only to record demos and not actually broadcast the game. You can disable broadcasting by setting the maximum number of client slots to zero (
tv_maxclients 0). To enable auto recording on your server, add these lines in your
tv_enable 1 tv_autorecord 1 tv_maxclients 0
How To ...
- Run a Win32 relay proxy without Steam
- In general all you need is to install the Source Dedicated Server package and run a dedicated server executing the "tv_relay" command. But if you try to run for example "srcds.exe -console -game cstrike" without running Steam in background, it will not work since it can't load necessary files out of the game cache files (*.gcf). In order to run scrds.exe you must extract these cache files manually using a tool like GCFScape. For CS:S you have to extract the cache files "source dedicated server.gcf" and "counter-strike source shared.gcf" to the same root folder. This might take a lot of disc space, but if you run only a SourceTV, you can delete all models, maps, materials and sounds files.
- tv_enable <0|1>
- Activates SourceTV on local game server, SourceTV bot will appear as spectator client after next changelevel (master only).
- tv_name <name>
- Sets SourceTV name as it appears in server browser and scoreboard (master only).
- tv_maxclients <0..255>
- Sets maximum client number for local SourceTV server/proxy (default 128).
- Stops broadcasting the game via SourceTV.
- Shows SourceTV specific information.
- Shows a list of all spectator clients connect to local SourceTV server
- tv_msg <text>
- Send a HUD message to all connected SourceTV spectator clients
- Reconnects the SourceTV relay proxy to last known address (relay only).
- tv_autoretry <0|1>
- If enabled, SourceTV relay proxies try to reconnect to last known server after connection was lost.
- tv_timeout <seconds>
- Sets SourceTV relay proxy connection timeout in seconds. If a connection times out, the relay proxy tries to reconnect automatically.
- tv_delay <seconds>
- Source TV broadcast delay in seconds (master only).
- tv_delaymapchange <0|1>
Delays the map change on game server until rest of buffered game has been broadcasted
- tv_port <port>
- Set the SourceTV host port (default 27020). Must be set as srcds start parameter.
- tv_maxrate <bytes>
- Sets the maximum bandwidth spend per client in bytes/second (default 5000)
- tv_snapshotrate <n>
- Sets world snapshots broadcasted per second by SourceTV (master only).
- tv_password <password>
- Sets required password for connecting spectators.
- tv_relaypassword <password>
- Sets required password for connecting relay proxies.
- tv_record <filename>
- Starts a SourceTV demo recording that records all entities & events (master only)
- Stops SourceTV demo recording (master only)
- tv_autorecord <0|1>
- Automatically records every game, demo file name format is auto-YYYYMMDD-hhmm-map.dem
- tv_debug <0|1>
- Shows additional debugging messages
- tv_dispatchmode <0|1|2>
- Sets Source client dispatch mode for connecting clients: 0=never, 1=if appropriate, 2=always
- tv_overrideroot <0|1>
- Overrides the master IP broadcast to spectators with a local IP.
- tv_relayvoice <0|1>
- If enabled, allow player voice chat if broadcasted (master only)
- tv_transmitall <0|1>
- By default entities and events outside of the auto-director view are removed from SourceTV broadcasts to save bandwidth. If tv_transmitall is enabled, the whole game is transmitted and spectators can switch their view to any player they want. This option increases bandwidth requirement per spectator client by factor 2 to 3.
- tv_chattimelimit <seconds>
- Limits spectators to chat only every n seconds
- tv_nochat <0|1>
- Disables other spectators chat lines (client only)
- tv_allow_static_shots <0|1>
- Allows auto-director to choose fixed camera shots (master only)
- tv_allow_camera_man <0|1>
- Allows spectator clients on game server to become SourceTV camera men (master only)
Command Line Parameters
These command line settings can't be changed via console or
rcon. They are useful if you want to restrict SourceTV abilities for rental server.
- Disables all SourceTV features on this game server.
- SourceTV can only serve one client and can't be used as relay proxy.