Search code examples
node.jswebrtcrtspip-cameraamazon-kinesis-video-streams

How to intergrate IP-Camera with kinesis-video-streams-webrtc-sdk sample code?


I am willing to use this https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-js for accessing KVSWebRTC for our onsite camera video streaming. I want to run this code on the server which is reading the camera stream (rtsp) from a port. While i was porting this code to be run on server side (JS code running on NODEJS), I came to know that code is using a lot of browser APIs for access laptop camera. Can anyone suggest me how can i stream rtsp camera using this code? I am currently struggling with how to get stream out of rtsp camera so that i can integrate it with this code?

Below is the code part which i need to make a change: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-js/blob/master/examples/master.js#L111

Any help with will be highly appreciated.


Solution

  • https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-js contains an implementation of the KVS Signaling client and a sample that ties up the browsers WebRTC implementation together with the signaling in an application. In order to stream a generic rtsp you will need to modify the browsers implementation of the webrtc or add your own handling of the webrtc in the first place and feed the frames into the webrtc of the browser.

    You could also check out the native C-based WebRTC implementation from KVS: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c