Encoder Start/Stop command API or .cmd

JeanXeb

Member
Hello,

Is it possible to start or shut down the encoder with an external command ?
API or .cmd or .bat

Cordially
 
There are undocumented getencoder and setencoder commands to control the encoders.

The getencoder command accepts id parameter (starts with 0) and returns XML data for the encoder.

The setencoder command accepts id and data parameters, where data is the XML data for the encoder.
 
Could you give me an example ? URL
http://127.0.0.1:9000/?pass=mqygOYBofZ&action=setencoder&id=1&data=1
 
You should first get the data using the getencoder command, then modify the returned XML to change the values you need, after that use the setencoder command to send it to RadioBOSS.

I suggest using a PHP script for this as using those commands involves XML manipulation. The code could look like this (not tested, you should also add error handling):
Code:
<?php
//get encoder parameters
$s = file_get_contents('http://.../?pass=...&action=getencoder&id=1');
//edit
$xml = simplexml_load_string($s);
$xml->Enabled= 'True'; //'False' to turn off
//send changes 
$url = 'http://.../?pass=...&action=setencoder&id=1&data=' . urlencode($xml->asXML());
file_get_contents($url);

Please note that encoders are indexed from zero, that is, the first encoder in the list has id=0, the second is id=1 and so on.
 
Thank you for your reply !
I misspoke , more simply is it possible to interact with the button (Activate diffusion).
See the capture in attachment.
With a .cmd or .batch or php or other ?
Cordially
 

Attachments

  • Capture.JPG
    Capture.JPG
    11.8 KB · Views: 239
Yes, actually there's a simple way to do so.
Enable:
Code:
http://.../?pass=...&cmd=connect
and disable:
Code:
http://.../?pass=...&cmd=disconnect
 
Yes, actually there's a simple way to do so.
Enable:
Code: [Select]

http://.../?pass=...&cmd=connect

and disable:
Code: [Select]

http://.../?pass=...&cmd=disconnect

I'm brand new to RadioBoss, have been using SAM Broadcaster with the ability to to start and stop the shoutcast encoder at specific times and days. Forgive my ignorance, but is there a way to use the code above to stop and start the RadioBoss encoder at specific times? For example: start at 0700 Mon-Fri, stop at 1300 Mon-Fri, start at 1900 Mon-Fri

Thanks,
Bennie

 
Yes you can schedule the connect and disconnect commands to start and stop encoders when needed: https://manual.djsoft.net/radioboss/en/scheduling_playback.htm

It is also possible to start and stop only specific encoders, please see this page for more information: https://manual.djsoft.net/radioboss/en/scheduler_commands.htm (scroll down to connect and disconnect command descriptions).
 
Back
Top