Applying 'FaceOverlayFilter' or 'ChromaFilter' gives ERROR

I’m trying to apply filter to a OpenVidu camera stream in a website. The server is hosted separately communicating through APIs to create sessions and tokens.

I’ve tried applying other filter type ‘GStreamerFilter’ which is working fine but applying ‘FaceOverlayFilter’ gives this error:

"org.kurento.client.internal.server.KurentoServerException: 'offsetXPercent' parameter should be a double (Code:40001, Type:null, Data: {"type":"MARSHALL_ERROR"})
	at org.kurento.client.internal.transport.jsonrpc.RomClientJsonRpcClient.sendRequest(RomClientJsonRpcClient.java:264)
	at org.kurento.client.internal.transport.jsonrpc.RomClientJsonRpcClient.invoke(RomClientJsonRpcClient.java:117)
	at org.kurento.client.internal.transport.jsonrpc.RomClientJsonRpcClient.invoke(RomClientJsonRpcClient.java:99)
	at org.kurento.client.internal.client.RomManager.invoke(RomManager.java:162)
	at org.kurento.client.internal.client.RemoteObject.invoke(RemoteObject.java:186)
	at org.kurento.client.internal.client.RemoteObjectInvocationHandler.genericMediaElementInvoke(RemoteObjectInvocationHandler.java:157)
	at org.kurento.client.internal.client.RemoteObjectInvocationHandler.internalInvoke(RemoteObjectInvocationHandler.java:95)
	at org.kurento.client.internal.client.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:39)
	at com.sun.proxy.$Proxy91.invoke(Unknown Source)
	at io.openvidu.server.kurento.endpoint.PublisherEndpoint.execMethod(PublisherEndpoint.java:356)
	at io.openvidu.server.kurento.core.KurentoSessionManager.execFilterMethodInPublisher(KurentoSessionManager.java:1378)
	at io.openvidu.server.kurento.core.KurentoSessionManager.execFilterMethod(KurentoSessionManager.java:1045)
	at io.openvidu.server.rpc.RpcHandler.execFilterMethod(RpcHandler.java:612)
	at io.openvidu.server.rpc.RpcHandler.handleRequest(RpcHandler.java:167)
	at org.kurento.jsonrpc.internal.JsonRpcHandlerManager.handleRequest(JsonRpcHandlerManager.java:142)
	at org.kurento.jsonrpc.internal.server.ProtocolManager$3.run(ProtocolManager.java:218)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
"

The code I’m using to apply the filters is from OpenVidu Docs as follows:

publisher.stream.applyFilter("FaceOverlayFilter")
    .then(filter => {
        filter.execMethod(
            "setOverlayedImage",
            {
                "uri":"https://cdn.pixabay.com/photo/2013/07/12/14/14/derby-148046_960_720.png",
                "offsetXPercent":"-0.2F",
                "offsetYPercent":"-0.8F",
                "widthPercent":"1.3F",
                "heightPercent":"1.0F"
            });
    });

Similar thing happens when applying ‘ChromaFilter’ type. The error shows as:

ERROR:org.kurento.client.internal.server.KurentoServerException:'topRightCornerX' property should be a integer

While using this code from documentation:

publisher.stream.applyFilter(
    "ChromaFilter",
    {
        "window": {
            "topRightCornerX": 0,
            "topRightCornerY": 0,
            "width": 50,
            "height": 50
        },
        "backgroundImage": "https://www.maxpixel.net/static/photo/1x/Cool-Blue-Liquid-Lake-Abstract-Background-Clear-316144.jpg"
    });

Any idea why this could be happening when the value is already an integer? I searched everywhere but could not find similar problem faced by other users.

@atitkharel

Hi,
at the moment I make some tests with these filters too. But I also get these type error messages - and I tried a lot of formattings.
Did you solve your problem?

Best regards
Stefan

@micael.gallego

What about the documented limitation in release notes of Openvidu 2.9.0?
Is this problem still existing?

We still consider Ubuntu Bionic to be in a preliminary support state, and some bugs may appear. In fact, we know for sure there’s one limitation: no OpenCV filters will work in Ubuntu 18.04 at this moment. OpenVidu has supported audio and video filters for a long time now, and it is a cool feature that allows developers to implement some advanced audio and video real-time processing in the server side. But unfortunately Kurento has not been updated yet to support it in Bionic, so no FaceOverlayFilter or ChromaFilter will work in new Ubuntu version. But you can still use GStreamer filters!

No luck solving it. Maybe it is because of the limitation mentioned by you in another reply because i think our implementation of OpenVidu server is in a Ubuntu instance. Will need to check.