Problem getting Timeoverlay and Clockoverlay filters to work

Hello everyone,

I am hawing problems getting Timeoverlay and Clockoverlay GStreamer filters to work. I am using latest version 2.12.0.

I use the following settings on the frontend side:

let publisher = this.OV.initPublisher(undefined, {
            audioSource: undefined, // The source of audio. If undefined default microphone
            videoSource: undefined, // The source of video. If undefined default webcam
            publishAudio: true,     // Whether you want to start publishing with your audio unmuted or not
            publishVideo: true,     // Whether you want to start publishing with your video enabled or not
            resolution: '640x480',  // The resolution of your video
            frameRate: 30,          // The frame rate of your video
            insertMode: 'APPEND',   // How the video is inserted in the target element 'video-container'
            mirror: false,          // Whether to mirror your local video or not
            filter: new Filter('GStreamerFilter', {command: 'timeoverlay'})
          });
          this.openViduSession.publish(publisher);

Here is the error I get on the server side:

[ERROR] 2020-03-09 14:43:03,445 [kr0i3hq5-e18-t0] org.kurento.jsonrpc.internal.JsonRpcHandlerManager (handleRequest) - Exception while processing request {"id":12,"method":"publishVideo","params":{"sdpOffer":"v=0\r\no=mozilla...THIS_IS_SDPARTA-73.0.1 2038864980843177800 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=sendrecv\r\na=fingerprint:sha-256 7F:49:3C:0D:3A:83:F0:8B:E8:0F:C9:7C:6C:E5:9C:AF:F9:AA:36:EA:48:3A:56:F5:24:17:87:24:3D:BD:E8:56\r\na=group:BUNDLE 0 1\r\na=ice-options:trickle\r\na=msid-semantic:WMS *\r\nm=audio 9 UDP/TLS/RTP/SAVPF 109 9 0 8 101\r\nc=IN IP4 0.0.0.0\r\na=sendonly\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level\r\na=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1\r\na=fmtp:101 0-15\r\na=ice-pwd:896202cc1e2275fe697d2203a571b783\r\na=ice-ufrag:df5d630a\r\na=mid:0\r\na=msid:{fb69be28-c548-4bf1-9335-54b030e8a6f2} {dfc4b081-efbe-4af4-8378-4b03f617f9e8}\r\na=rtcp-mux\r\na=rtpmap:109 opus/48000/2\r\na=rtpmap:9 G722/8000/1\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=setup:actpass\r\na=ssrc:598743521 cname:{facbb0d2-4403-48a0-9d15-93c83515e401}\r\nm=video 9 UDP/TLS/RTP/SAVPF 120 121 126 97\r\nc=IN IP4 0.0.0.0\r\na=sendonly\r\na=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:5 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:6/recvonly http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1\r\na=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1\r\na=fmtp:120 max-fs=12288;max-fr=60\r\na=fmtp:121 max-fs=12288;max-fr=60\r\na=ice-pwd:896202cc1e2275fe697d2203a571b783\r\na=ice-ufrag:df5d630a\r\na=mid:1\r\na=msid:{fb69be28-c548-4bf1-9335-54b030e8a6f2} {ec1440fd-be3c-4a3b-bc95-ab905240ad97}\r\na=rtcp-fb:120 nack\r\na=rtcp-fb:120 nack pli\r\na=rtcp-fb:120 ccm fir\r\na=rtcp-fb:120 goog-remb\r\na=rtcp-fb:121 nack\r\na=rtcp-fb:121 nack pli\r\na=rtcp-fb:121 ccm fir\r\na=rtcp-fb:121 goog-remb\r\na=rtcp-fb:126 nack\r\na=rtcp-fb:126 nack pli\r\na=rtcp-fb:126 ccm fir\r\na=rtcp-fb:126 goog-remb\r\na=rtcp-fb:97 nack\r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:97 ccm fir\r\na=rtcp-fb:97 goog-remb\r\na=rtcp-mux\r\na=rtpmap:120 VP8/90000\r\na=rtpmap:121 VP9/90000\r\na=rtpmap:126 H264/90000\r\na=rtpmap:97 H264/90000\r\na=setup:actpass\r\na=ssrc:662053679 cname:{facbb0d2-4403-48a0-9d15-93c83515e401}\r\n","doLoopback":false,"hasAudio":true,"hasVideo":true,"audioActive":true,"videoActive":true,"typeOfVideo":"CAMERA","frameRate":30,"videoDimensions":"{\"width\":640,\"height\":480}","filter":{"handlers":{},"type":"GStreamerFilter","options":{"command":"timeoverlay"}}},"jsonrpc":"2.0"}
org.kurento.client.internal.server.KurentoServerException: GStreamer element cannot be created: no element "timeoverlay" (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.create(RomClientJsonRpcClient.java:157)
	at org.kurento.client.internal.transport.jsonrpc.RomClientJsonRpcClient.create(RomClientJsonRpcClient.java:147)
	at org.kurento.client.internal.client.RomManager.create(RomManager.java:59)
	at org.kurento.client.internal.client.RomManager.createWithKurentoObject(RomManager.java:257)
	at org.kurento.client.AbstractBuilder.build(AbstractBuilder.java:65)
	at io.openvidu.server.kurento.core.KurentoSessionManager.applyFilterInPublisher(KurentoSessionManager.java:875)
	at io.openvidu.server.kurento.core.KurentoSessionManager.publishVideo(KurentoSessionManager.java:275)
	at io.openvidu.server.rpc.RpcHandler.publishVideo(RpcHandler.java:296)
	at io.openvidu.server.rpc.RpcHandler.handleRequest(RpcHandler.java:123)
	at org.kurento.jsonrpc.internal.JsonRpcHandlerManager.handleRequest(JsonRpcHandlerManager.java:128)
	at org.kurento.jsonrpc.internal.server.ProtocolManager$3.run(ProtocolManager.java:218)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Important notes:

  • I can verify that plugin is installed and I can successfully try it out with the command:

gst-launch-1.0 -v videotestsrc ! timeoverlay ! autovideosink

  • Other plugins (for example, videobalance saturation=0.0) work without the problem

Is there any additional configuration that should be taken care of?

Thanks in advance,

Hi; for use with Kurento (which works under OpenVidu), you need to install the “GStreamer1.5” version of the plugin:

sudo apt-get update && sudo apt-get install --yes gstreamer1.5-x

gst-launch-1.5 -v videotestsrc ! timeoverlay ! autovideosink

That should do it

Thank you very much for a fast response, it works now!

Thanks!

Hi. I’m trying to use faceblur GStreamer filter so I need to install gstreamer1.0.opencv over ubuntu 20.04 (there is no version gstreamer1.5-opencv for it).
From openvidu I’m getting similar error:

ERROR:org.kurento.client.internal.server.KurentoServerException:GStreamer element cannot be created: no element “faceblur” (Code:40001, Type:null, Data: {“type”:“MARSHALL_ERROR”}) in Request: method:applyFilter params:{“streamId”:“str_CAM_Zt25_con_ADb5iIc5Hf”,“type”:“GStreamerFilter”,“options”:"{“command”:“faceblur”}"} request:undefined

Could you help me?

Thanks in advance

I’m afraid that Kurento uses the “1.5” packages of GStreamer. These are independent from the “1.0” ones that you can install from the system. “1.5” and “1.0” are separate and will not mix together, so even if you install gstreamer1.0-opencv, it will not work with Kurento’s GStreamer 1.5.

The only solution that I can think of, is to wait until the upcoming Kurento 7.0 comes out. It shouldn’t take too long to release (probably during summer) and it will be based on Ubuntu 20.04, using the standard GStreamer 1.0 (our “1.5” fork disappears and we’ll just use the official version).

ok, thanks for your help.