Hello, I'm interested in a script or serverquery command to modify channel codec to opus voice + codec quality to 10 on all channels.
Thank you.
We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020
Hello, I'm interested in a script or serverquery command to modify channel codec to opus voice + codec quality to 10 on all channels.
Thank you.
Save as somename.php and execute by requesting on a webserver that you upload the script into or if you have php installed: php somename.phpPHP Code:
<?php
require 'TeamSpeak3/TeamSpeak3.php';
$user = 'serveradmin';
$password = 'password';
$ip_query = '1.2.3.4:10011';
$port = 9987;
$ts3 = TeamSpeak3::factory("serverquery://$user:$password@$ip_query/?server_port=$port");
foreach($ts3->channelList() as $channel) {
$properties = array();
if($channel['channel_codec'] != 4) $properties['channel_codec'] = 4;
if($channel['channel_codec_quality'] != 10) $properties['channel_codec_quality'] = 10;
if(!empty($properties)) {
$properties['cid'] = $channel['cid'];
$ts3->execute('channeledit', $properties);
}
}
You need this: http://forum.teamspeak.com/showthrea...-PHP-Framework
(Unzip the content inside libraries folder to the folder where you placed the script.
So that it is the somename.php script and TeamSpeak3 folder in the same place)
Last edited by barricas; March 6th, 2013 at 03:34 AM.
Hey.
Thanks! Working as intended, however you forgot closing php tag.
But that isn't a problem, I really appreciate your work barricas, thank You once again.Code:<?php require 'TeamSpeak3/TeamSpeak3.php'; $user = 'serveradmin'; $password = 'password'; $ip_query = '1.2.3.4:10011'; $port = 9987; $ts3 = TeamSpeak3::factory("serverquery://$user:[email protected]$ip_query/?server_port=$port"); foreach($ts3->channelList() as $channel) { $properties = array(); if($channel['channel_codec'] != 4) $properties['channel_codec'] = 4; if($channel['channel_codec_quality'] != 10) $properties['channel_codec_quality'] = 10; if(!empty($properties)) { $properties['cid'] = $channel['cid']; $ts3->execute('channeledit', $properties); } } ?>
No problem!
Php closing tag is not required unless you have, for example, pure html after that.
I run a server with 100+ channels. Is it possible to update them all at once, or do I have to do it manually?
See this: http://forum.teamspeak.com/showthrea...ify-All-Codecs
it changes all channels to Opus Voice w/ 10 quality.
Hello !
I tested that script it worked excellent, all my channels was edited perfect solution what i looking for.
I apologize for such a late reply to this topic.
The script is geamcht really cool. Also works one way frein.
but I have one more please.
Can one moreover scripten he channel with "opus Music" to ignore.
I was grateful for it.
Hey,
can you upload a script so just new channels get opus music 10 ?
I've created simple Python script to do modify codec and quality of all channels on the server. If interested: ts3-mass-codec-changer.py
I know the thread is 3 years old, but maybe someone will find it(as I did).
There are currently 1 users browsing this thread. (0 members and 1 guests)