The openRTSP.exe utility is a console application without the graphic interface. This utility is used in scripts to check the workability of the RTSP Server module. For more information about this utility, seehttp://www.live555.com/openRTSP/.
The openRTSP.exe file is located in the <Axxon PSIM installation directory>\Tools64 folder.
The example of a script to test the workability of RTSP is given below. This script runs the openRTSP.exe utility by timer, which takes one second of video and checks the status of the RTSP server. If a rejection comes from the RTSP server, the StreamingServer.run process is restarted.
You must create and configure the Timer object for the required check period beforehand—see Creating and using the Timer object. |
function check_cam(addr)
{
var scmd = "./Tools64/openRTSP.exe -V -D 10 -d 1 "+addr;
DebugLogString("run:"+scmd);
var s = run_cmd_timeout(scmd, 10000);
DebugLogString(s);
if(s.indexOf("Receiving streamed data")< 0)
{
DebugLogString("restarting");
var msg = CreateMsg();
msg.StringToMsg("SLAVE|COMP_NAME|EXECUTE|restart<1>,command<streamingserver.run>"); //change COMP_NAME to the name of the computer where the process restarts
DoReact(msg);
}
}
if(Event.SourceType == "LOCAL_TIMER" && Event.SourceId == "TEST_RTSP")
{
check_cam("rtsp://127.0.0.1:5544/1"); //the link is formed as described in the "Configuring the RTSP Server Module" section
check_cam("rtsp://127.0.0.1:5545/4");
} |