XPMobileSDK video sample blurry, does not happen in XProtect Web Client.

Hi, we’re having a weird issue here on Essential+ 2019 R3. When looking at the samples found in XPMobileSDK/Samples/video/videoSample.html, there’s an issue where the camera stream start displaying, but after 10 - 30 seconds, the viewer gets in a weird state where the canvas is all blury (see image).

Then, the viewer will alternate between a clear image and a blurry one every 2 seconds or so and it seems stuck in that state.

The thing is, this issue is not happening in the XProtect Web Client 2019 R3 viewer. Only in the samples in the XPMobileSDK. Does the XProtect Web Client 2019 R3 paint the canvas in a different way than in the XPMobileSDK samples?

The Mobile Server and the sample are on the same physical machine.

Also, whatever compression setting, fps or resolution I set in the requestParams function will always give me the same result. The only way I do not get into that state is if I disable the Quality Of Service QosTracker Enabled key in the VideoOs.MobileServer.Service.exe.config file. Still, the Xprotect Web Client viewer does not have this issue, so I’m wondering what’s being done differently here.

When breaking in the following the code when the canvas get into this weird state, I notice the following: the image naturalWidth and naturalHeight being sent is way smaller than what’s requested, and the resampling is upped to 4 instead of being 1 like when it’s clean.

if (frame.hasSizeInformation) {

var multiplier = (frame.sizeInfo.destinationSize.resampling * XPMobileSDK.getResamplingFactor()) || 1;

image.width = multiplier * frame.sizeInfo.destinationSize.width;

image.height = multiplier * frame.sizeInfo.destinationSize.height;

}

Hi Daniel,

What version of the Mobile server are you using ?

Is it 2019 R3 as the Essentials +, or you have updated to 2020 R1 ?

Also how many cameras are you opening ?

Is it happens on only when only one is running ?

We will try to look into it, but meanwhile you could turn off web sockets, this effectively going from push to pull and this will disable the mobile server QoS.

// videoSample.js
 
(function () {
    window.addEventListener('load', function () {
        var connectionDidLogIn = function () {
            var container = document.getElementById('streams-container');
 
            Application.connectionDidLogIn(container);
 
            XPMobileSDK.toggleWebSocket(false);
        };
 
        var params = {
            connectionDidLogIn: connectionDidLogIn
        };
 
        LoginManager.loadAndLogin(params);
    });
})();

Hey Petar, thanks for the answer. We’re on Essential+ 2019 R3. It does happen whether 1 or 3 cameras are running. They are sending about 10mb/s each from the Mobile Server. Using XPMobileSDK.toggleWebSocket(false); does seem to remove this issue, however, I notice less FPS and had better result just disabling QoS on the Mobile Server and staying on Push. I think I’ll just leave it that way for the moment. At least I understand why it’s different on the Web Client now. Thanks a lot!