Home
Discussion Forums
Introduction
Starting Up
Updating
Configuration
Server Hardware
CVARs
Networking
Remote Admin
Voice Compression
Ressource Tweak
Custom Maps
Promoting
Metamod
Admin Mods
Bonus Stuff

Voice Compression

There is a high probability that your server won't be running off a T1 connection, it will probably be running out of business cable which won't have a lot of bandwidth. Without a lot of bandwidth people will lag and eventually leave, so administrators always try to optimize theirs servers as much as possible to use less bandwidth. Voice communications used a lot of bandwidth... Until today!

 

Valve has added the support for the Speex voice encoder. By default, HLDS is set to use the old MILES codec that uses almost 32kbps of your bandwidth compared to the Speex codec that can use from 2.4kbps 15.2kbps (depending on which one you select). Be warned that Speex will use more CPU cycles than MILES... On my 500mhz server, it uses only 2 or 4 percents more CPU!

Enabling Speex is not a difficult task. You enable it with CVARS... First, you need to enable Speex itself by using the sv_voicecodec voice_speex CVAR and then you configure which quality you want by using ONE of these CVARS.
 

CVARQuality (in KBPS)Percent of bandwidth used compared to MILES
sv_voicequality 12.47.5%
sv_voicequality 2618.75%
sv_voicequality 3825%
sv_voicequality 411,235%
sv_voicequality 515,247.5%

And for all the non-geeks out there, here is a simpler version of the table:

CVARQuality
sv_voicequality 1Very bad
sv_voicequality 2Bad
sv_voicequality 3Medium
sv_voicequality 4Good
sv_voicequality 5Crystal-Clear! (Best)

sv_voicequality 2 would be perhaps an excellent choice for a server who has mediocre bandwidth and want good voice quality.

Finnaly, I'm giving you a code example of what you should have in your server.cfg file if you wanted to have the Speex codec enabled at the voice quality 2

sv_voicecodec voice_speex
sv_voicequality 2


Home • About HLDS 101 • email • Contact • Terms Of Service • Legal Credit • Donate • Clan Hosting • Advertising • Paid Support