Search code examples
javascriptvideowebrtctwiliortsp

Stream Video using Twilio from IP Camera RTSP


All of Twilio's examples for their Programmable Video service that I've been able to find either demonstrate screen sharing or webcam media streams. Can someone point me to an example that streams video from an RTSP stream provided by an IP Camera?

I've been able to find examples of and experiment with this behavior using Kurento, so I figured Twilio-Video might expose the same. See https://github.com/lulop-k/kurento-rtsp2webrtc


Solution

  • Can someone point me to an example that streams video from an RTSP stream provided by an IP Camera?

    Since you've tagged Javascript you've got to realise that rtsp:// is not an expected video source within the HTML5 environment. There isn't a specific example for RTSP stream from camera.

    possible solution :
    The only solution I can think of is to use a virtual webcam software that outputs a video stream/file instead of showing feed from device webcam.

    The virtual webcam would be detected like a normal webcam (by browser / webRTC), but instead of showing your face, it shows a pre-recorded stream/file. If you involve FFmpeg you could replace MP4 file with your RTSP live-stream.

    On the Twilio / HTML5 code side, you simply select the "virtual cam" as if real webcam, now this way you can send RTSP feed as if it's your webcam feed.