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.