The TSReader Standard and Professional include a remote control server. This allows other applications to control many TSReader functions using a standard TCP/IP socket. The protocol is very similar to the FTP control channel, POP3 and SMTP protocols.

TSReader sends one or more lines of information starting with a three digit completion code terminated with a carriage-return/line-feed pair. TSReader accepts commands in either upper or lower case and expects parameters to follow a space after the command. If no parameters are supplied, there should be no space after the command. Input commands are terminated with a carriage-return - line-feed characters are ignored.

If you want to experiment with the control server without writing any software, you can use the Windows telnet application to connect. Assuming the control server is enabled, running on port 1399 and TSReader is running, you would simply click Start/Run and type telnet 1399 to get connected.

Port and Registry Settings

TSReader uses a default IP port of 1399 for the control server connection. This port number may be changed by using the Control server settings dialog from TSReader or by using the command-line -c switch. By default, the control server is not enabled - it must be enabled by the user or via the command-line.

If you want to change the control server settings by changing the registry to meet your needs, edit these values:

  DWORD:ControlServerEnabled = 0 to disable control server =1 to enable control server
  DWORD:ControlServerPort = IP port for the control server connection

Only one connection is supported at a time and this is deliberate to prevent more than process attempting TSReader control. If you use multiple profiles in TSReader Professional simply set each profile's Control Server port to a different value.

Sample Code

Here's a sample Perl script that connects to the Control Server and displays a menu of options: Print programs in a mux, Display a graph, switch to a multicast UDP stream, and Play a program via VLC. You'll need to have Perl installed and also download (Google it) and put it into the same folder as the script. The script assumes TSReader is running on the same PC using the default port of 1399, i.e.