Search code examples
javascriptjavaamazon-web-serviceswebrtcrtmp

send RMTP stream to server from browser (laptop camera)


I am Using the AWS IVS( Interactive video service) for live streaming. the IVS Accepts only the RTMP stream. But the video stream we are getting from the browser is WEBRTC stream. how to send the RTMP stream from laptop camera ? or can we convert the WEBRTC to RTMP stream ? if possible for conversion please help with a basic code snippet in any language


Solution

  • You need a media server to covert WebRTC to RTMP, please read this wiki, the stream flow is like this:

    Browser --WebRTC--> SRS ----RTMP-+--> IVS
                                     |
                                     +-->FFmpeg --RTMP-> IVS
    

    If you publish your stream to your media server, you could forward to IVS, or use FFmpeg to forward the stream to IVS.