CSTV makes it possible to broadcast games live with a short delay. This means that people who aren't involved in the game can also follow what's happening on the server. This technology is also used at well-known Counter-Strike tournaments so that viewers can watch the action. In addition, broadcasts can be saved automatically so you can watch them again later at any time.
You enable CSTV in ZapX through the startup parameters:
- Open the Configuration tab for your game server and select Startup parameters.
- Turn on Enable CSTV. If you want your server to record every match automatically, also turn on Record CSTV demos.
- Save the settings and restart your server.
tv_enable and tv_autorecord in your server.cfg have no effect. Your server sets these values from the startup parameters each time a map starts, including the CSTV port (tv_port).
You can enter additional CSTV commands in the server.cfg file in the csgo/cfg folder, in the Files tab. For example:
tv_delay 90
tv_advertise_watchable 1
If your game mode's configuration file sets a command itself, its value takes precedence over the value in server.cfg. For example, gamemode_competitive.cfg sets tv_delay. Enter such commands in gamemode_<modus>_server.cfg. For more information, see Configuration.
The following commands are available:
| Command | Description |
|---|---|
| tv_allow_camera_man "0|1" | Allows spectators to take over as camera operators |
| tv_allow_static_shots "0|1" | Uses fixed-position cameras for recordings |
| tv_autoretry "0|1" | Attempts to reconnect after a network timeout |
| tv_chattimelimit "Seconds" | Limits spectators to sending a message only every x seconds |
| tv_debug "0|1" | Displays CSTV debug information |
| tv_delaymapchange "0|1" | Delays the map change until the broadcast is complete |
| tv_maxclients "n" | Maximum number of clients on the CSTV server |
| tv_maxrate "n" | Maximum allowed bandwidth for CSTV spectators, 0 = unlimited |
| tv_msg "Text" | Sends a message to all spectators |
| tv_name "Name" | CSTV hostname. Defines the CSTV name as it appears in the server browser and status bar |
| tv_nochat "0|1" | Enables/disables CSTV chat |
| tv_password "Password" | Protects the CSTV broadcast with a password |
| tv_record "Filename" | Starts recording a CSTV demo |
| tv_stop | Stops the CSTV broadcast |
| tv_stoprecord | Stops recording a CSTV demo |
| tv_title | Defines the name of the CSTV broadcast |
ZapX assigns the CSTV port to your server automatically. You can find it in your game server's Overview, in the Location cell, where it is labeled CSTV. To connect, open the in-game console and enter this command:
connect SERVERIP:CSTVPORT
Replace SERVERIP with your server's IP address and CSTVPORT with the CSTV port.
Your server moves completed demos to the csgo/demos folder, whether they were recorded automatically or using tv_record. You can find and download them in the Files tab. A demo that's currently being recorded will appear there shortly after the recording ends. Alternatively, you can download demos via SFTP. Access via SFTP explains how.
To watch a demo, place it in the game/csgo folder in your CS2 game directory and start it in the console with playdemo <dateiname>.
