From 8c44c66df97c4aaa85738fd12f98691086230334 Mon Sep 17 00:00:00 2001 From: John Edwards Date: Fri, 27 Oct 2023 15:06:02 +0100 Subject: [PATCH] Disable TV by default and adjust TV defaults for best streaming performance --- README.md | 4 ++-- bullseye/Dockerfile | 4 ++-- bullseye/etc/entry.sh | 2 +- bullseye/etc/server.cfg | 3 +-- examples/docker-compose.yml | 6 +++--- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 72cae96..2d5d2cb 100644 --- a/README.md +++ b/README.md @@ -95,12 +95,12 @@ CS2_BOT_QUOTA_MODE="" (fill, competitive) ### CSTV/SourceTV ```dockerfile -TV_ENABLE=1 (0 - disable, 1 - enable) +TV_ENABLE=0 (0 - disable, 1 - enable) TV_PORT=27020 (SourceTV/CSTV port to bind to) TV_AUTORECORD=0 (Automatically record all games as CSTV demos: 0=off, 1=on) TV_PW="changeme" (CSTV password for clients) TV_RELAY_PW="changeme" (CSTV password for relay proxies) -TV_SNAPSHOTRATE=32 (World snapshots to broadcast per second. Affects camera tickrate.) +TV_MAXRATE=0 (Max CSTV spectator bandwidth rate allowed, 0 == unlimited) TV_DELAY=0 (CSTV broadcast delay in seconds) ``` diff --git a/bullseye/Dockerfile b/bullseye/Dockerfile index 05e2a8e..5716aab 100644 --- a/bullseye/Dockerfile +++ b/bullseye/Dockerfile @@ -53,11 +53,11 @@ ENV CS2_SERVERNAME="cs2 private server" \ CS2_GAMEMODE=1 \ CS2_LAN=0 \ TV_AUTORECORD=0 \ - TV_ENABLE=1 \ + TV_ENABLE=0 \ TV_PORT=27020 \ TV_PW="changeme" \ TV_RELAY_PW="changeme" \ - TV_SNAPSHOTRATE=32 \ + TV_MAXRATE=0 \ TV_DELAY=0 \ CS2_ADDITIONAL_ARGS="" diff --git a/bullseye/etc/entry.sh b/bullseye/etc/entry.sh index b12e62f..cd2c14f 100644 --- a/bullseye/etc/entry.sh +++ b/bullseye/etc/entry.sh @@ -23,7 +23,7 @@ sed -i -e "s/{{SERVER_HOSTNAME}}/${CS2_SERVERNAME}/g" \ -e "s/{{TV_AUTORECORD}}/${TV_AUTORECORD}/g" \ -e "s/{{TV_PW}}/${TV_PW}/g" \ -e "s/{{TV_RELAY_PW}}/${TV_RELAY_PW}/g" \ - -e "s/{{TV_SNAPSHOTRATE}}/${TV_SNAPSHOTRATE}/g" \ + -e "s/{{TV_MAXRATE}}/${TV_MAXRATE}/g" \ -e "s/{{TV_DELAY}}/${TV_DELAY}/g" \ "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg diff --git a/bullseye/etc/server.cfg b/bullseye/etc/server.cfg index 5bf7bfe..eea3fd4 100644 --- a/bullseye/etc/server.cfg +++ b/bullseye/etc/server.cfg @@ -24,14 +24,13 @@ 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 CSTV on server: 0=off, 1=on. tv_maxclients 10 // Maximum client number on CSTV server. -tv_maxrate 20000 // Max CSTV spectator bandwidth rate allowed, 0 == unlimited +tv_maxrate {{TV_MAXRATE}} // Max CSTV spectator bandwidth rate allowed, 0 == unlimited tv_name "{{SERVER_HOSTNAME}} CSTV" // CSTV host name tv_overridemaster 0 // Overrides the CSTV master root address. tv_port {{TV_PORT}} // Host SourceTV port tv_password "{{TV_PW}}" // CSTV password for clients tv_relaypassword "{{TV_RELAY_PW}}" // CSTV password for relay proxies tv_relayvoice 1 // Relay voice data: 0=off, 1=on -tv_snapshotrate {{TV_SNAPSHOTRATE}} // Snapshots broadcasted per second tv_timeout 60 // CSTV connection timeout in seconds. tv_title "{{SERVER_HOSTNAME}} CSTV" // Set title for CSTV 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 b8bbbfc..514d009 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -30,12 +30,12 @@ services: - CS2_BOT_QUOTA_MODE # (fill, competitive) # TV - TV_AUTORECORD=0 # Automatically records all games as CSTV demos: 0=off, 1=on. - - TV_ENABLE=1 # Activates CSTV on server: 0=off, 1=on. + - TV_ENABLE=0 # Activates CSTV on server: 0=off, 1=on. - TV_PORT=27020 # Host SourceTV port - TV_PW=changeme # CSTV password for clients - TV_RELAY_PW=changeme # CSTV password for relay proxies - - TV_SNAPSHOTRATE=32 # World snapshots to broadcast per second. Affects camera tickrate. - - TV_DELAY=0 # CSTV broadcast delay in seconds + - TV_MAXRATE=0 # World snapshots to broadcast per second. Affects camera tickrate. + - TV_DELAY=0 # Max CSTV spectator bandwidth rate allowed, 0 == unlimited volumes: - cs2:/home/steam/cs2-dedicated/ # (Change /mnt/cs2 according to your volume location) ports: