0

What I did:

I have created and installed the opencv module plugin in the Kurento Media Server. I am setting the constraints as width - 640 and frameRate - 30. Now I am getting the around 35 frames approx inside the Opencv plugin process method.

After that, I have added face detection filter in the process method. Now I am getting around 20 to 25 frames. It took some time for the face detection process. So the remote streaming gets some delay.

Now I can able to skip frames in the plugin side by doing some counter logic.

What I want:

1) But I want to skip the frames in the JS client side. Is it possible to skip the frames from the client JS?

2) By default, is any End to End FPS calculation available in the KMS?

3) Is it possible to send the grayscale frame to the KMS plugin from the JS Client? If yes, How do I change to coloured frame to grayscale frame in JS client?

SKK
  • 1,705
  • 3
  • 28
  • 50

1 Answers1

2

1) But I want to skip the frames in the JS client side. Is it possible to skip the frames from the client JS?

Not that I'm aware of. You can mirror the video and things like that with CSS transformations, but I don't think you can skip frames in the client.

You can, however, limit the framerate that the client receives by instantiating a capsfilter that limits that framerate. You'd need to put that filter before the endpoint that returns the video to the client.

2) By default, is any End to End FPS calculation available in the KMS?

Not in KMS. You can check that in the incoming/outgoing streams from the client. You want to look for the RTCMediaStreamTrackStats. Here is a SO answer about the stats API in RTCPeerConnection.

3) Is it possible to send the grayscale frame to the KMS plugin from the JS Client? If yes, How do I change to coloured frame to grayscale frame in JS client?

Maybe you can try this code. I've just checked the demo, but I suppose you can get that media stream and send it to KMS without much trouble. Check also the Media Capture Extensions.

igracia
  • 3,543
  • 1
  • 18
  • 23
  • I 'll check the above solutions. Thanks. – SKK Apr 15 '16 at 08:15
  • I did check the point 3. They set the grayscale image in a canvas and display it in a screen. They hide the video tag in the screen. So I can't send that into the "WebRtcPeerSendrecv" method "options". – SKK Apr 18 '16 at 09:57
  • @karthi Can't you take the stream from the video tag, and pass it in the options bag? – igracia Apr 18 '16 at 13:38
  • No. I can pass stream from video tag. But in the example, They have added new canvas to display the grayscale video(Not the video tag). They have not applied the grayscale for the video tag streams. Is it possible to send the canvas streams to the WebRTC? – SKK Apr 18 '16 at 13:54
  • @karthi No clue, really. I thought that could be done. – igracia Apr 18 '16 at 14:11
  • ok Thanks. I did check the point 2. Is anywhere used the "RTCMediaStreamTrackStats" in the given examples? – SKK Apr 18 '16 at 14:42
  • @karthi Nope. I'm expanding the answer with a useful SO answer. – igracia Apr 18 '16 at 16:04
  • @karthi Also check the Media Capture Extensions lin from #3. That might help you. – igracia Apr 19 '16 at 07:30
  • I have few clarifications. Can you please check the below chat - http://chat.stackexchange.com/rooms/38613/kurento-media-server – SKK Apr 20 '16 at 05:25