Multiple Mobile SDK problems

We are in the process of developing our own web interface for a security system and are attempting to use the xProtect Mobile platform as a basis.

We have however run into some stumbling blocks.

These issues are present on the recording\mobile server (same machine) that has been our benchmark to try to prove that it’s not something we’re doing wrong.

Would be good to know if anybody has any of these issues before and if you were able to remedy them?

Problem 1

The live video streams are delayed by about 2 seconds. Doesn’t sound like a dealbreaker until you’re trying to control a PTZ camera, then it seems unusable. After making a few modifications to the SDK to reduce the buffering down to the region of ¼ of a second it becomes a bit more usable but still not ideal.

Problem 2

After a video stream has been running for a few hours, server CPU usage would be at 100% and everything would start to lag. I can’t remember exactly now but I believe this was down to code in “onVideoWaiting” trying to access videoElement.played.length or videoElement.played.end(0) which took significant time/cpu to access once the video had been playing for long enough. Commenting that out check/code to circumvent that issue.

Problem 3

After running for long enough (usually at least 24 hours), the video streams would get stuck or be blank.

Unfortnately we’ve not looked into these in detail as they take too long to reproduce and trace.

Problem 4

When the Milestone SDK encounters a problem, the code doesn’t appear to be able to recover from that or be able to be reinitialised.

The servers web interface will throw you out and make you log in again which isn’t an option for us. If we try to just connect again, it will often fail or do something weird because the Milestone SDK hasn’t cleaned up or reinitialised from the previous problem.

Any advice anybody has on any of these problems would be greatly apprieciated.

Hi, Dave,

Let me try to figure out the problems.

Problem 1 Do all PTZ cameras in your system have this problem with delay? Could you check it what is their behavior on transcending? Ensure that the firmware of your PTZ cameras is up-to-date. Manufacturers often release firmware updates that address performance issues.

Problems 2 and 3 We provide a video-stream web component as a sample of how to implement the XProtect Mobile SDK video stream and for now we do not know about the issue.

Problem 4 Ensure that your application has comprehensive error handling mechanisms. Capture and log relevant error information when issues occur with the Milestone SDK. This will help in diagnosing problems during troubleshooting. Develop a robust reconnection logic in your application. If a connection to the Milestone SDK is lost, attempt to reconnect in a controlled manner. Implement exponential backoff strategies to avoid overwhelming the system with repeated connection attempts.

Please, let me know if you have any questions.

Best regards

Asen Bozhilov