From 693f7340ce5bbffef88f4b4ae141855cecc412cb Mon Sep 17 00:00:00 2001 From: John Edwards Date: Thu, 26 Oct 2023 21:32:03 +0100 Subject: [PATCH] Basic SourceTV/GOTV support --- README.md | 9 +++++++++ bullseye/Dockerfile | 4 ++++ bullseye/etc/server.cfg | 29 +++++++++++++++++++++++++++++ examples/docker-compose.yml | 1 + 4 files changed, 43 insertions(+) diff --git a/README.md b/README.md index 4041126..0afd77a 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,15 @@ CS2_BOT_QUOTA="" (Number of bots) CS2_BOT_QUOTA_MODE="" (fill, competitive) ``` +### GOTV/SourceTV + +```dockerfile +TV_ENABLE=1 (0 - disable, 1 - enable) +TV_PORT=27020 (SourceTV/GOTV port to bind to) +TV_AUTORECORD=0 (Automatically record all games as GOTV demos: 0=off, 1=on) +TV_RELAY_PW="changeme" (GOTV password for relay proxies) +``` + # Credits This container leans heavily on the work of [CM2Walki](https://github.com/CM2Walki/), especially his [SteamCMD](https://github.com/CM2Walki/steamcmd) container image. GG! diff --git a/bullseye/Dockerfile b/bullseye/Dockerfile index 15e44f2..058e90a 100644 --- a/bullseye/Dockerfile +++ b/bullseye/Dockerfile @@ -52,6 +52,10 @@ ENV CS2_SERVERNAME="cs2 private server" \ CS2_GAMETYPE=0 \ CS2_GAMEMODE=1 \ CS2_LAN=0 \ + TV_AUTORECORD=0 \ + TV_ENABLE=1 \ + TV_PORT=27020 \ + TV_RELAY_PW="changeme" \ CS2_ADDITIONAL_ARGS="" # Set permissions on STEAMAPPDIR diff --git a/bullseye/etc/server.cfg b/bullseye/etc/server.cfg index 8aa41f3..027070b 100644 --- a/bullseye/etc/server.cfg +++ b/bullseye/etc/server.cfg @@ -7,3 +7,32 @@ sv_lan {{SERVER_LAN}} rcon_password "{{SERVER_RCON_PW}}" sv_password "{{SERVER_PW}}" + +// GOTV + +sv_hibernate_postgame_delay 180 + +sv_hibernate_postgame_delay 180 + +tv_allow_camera_man 1 // Auto director allows spectators to become camera man +tv_allow_static_shots 1 // Auto director uses fixed level cameras for shots +tv_autorecord {{TV_AUTORECORD}} // Automatically records all games as GOTV demos: 0=off, 1=on. +tv_chatgroupsize 0 // Set the default chat group size +tv_chattimelimit 8 // Limits spectators to chat only every n seconds +tv_debug 0 // GOTV debug info. +tv_delay 30 // GOTV broadcast delay in seconds +tv_delaymapchange 1 // Delays map change until broadcast is complete +tv_deltacache 2 // Enable delta entity bit stream cache +tv_dispatchmode 1 // Dispatch clients to relay proxies: 0=never, 1=if appropriate, 2=always +tv_enable {{TV_ENABLE}} // Activates GOTV on server: 0=off, 1=on. +tv_maxclients 10 // Maximum client number on GOTV server. +tv_maxrate 20000 // Max GOTV spectator bandwidth rate allowed, 0 == unlimited +tv_name "{{SERVER_HOSTNAME}}" // GOTV host name +tv_overridemaster 0 // Overrides the GOTV master root address. +tv_port {{TV_PORT}} // Host SourceTV port +tv_relaypassword {{TV_PW}} // GOTV password for relay proxies +tv_relayvoice 1 // Relay voice data: 0=off, 1=on +tv_snapshotrate 24 // Snapshots broadcasted per second +tv_timeout 60 // GOTV connection timeout in seconds. +tv_title "{{SERVER_HOSTNAME}}" // Set title for GOTV spectator UI +tv_transmitall 1 // Transmit all entities (not only director view) diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index 894e81b..b55c621 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -33,5 +33,6 @@ services: ports: - "27015:27015/tcp" # TCP - "27015:27015/udp" # UDP + - "27020:27020/udp" # UDP volumes: cs2: