videoffmpegwebrtclive-streamingrecordrtc

How to streaming from laptop camera to server rtmp


I'm looking for a solution to send data from laptop camera using browser (Javascript) to a rtmp server (like facebook live or youtube). I did researched but no luck. What I got :

  1. Direct from camera to rtmp server ==> We can't do this, browser WebRTC using udp and rtmp is tcp
  2. Another server as proxy ==> What I think is : browser using WebRTC and send video data to server. Server also running as a WebRTC client and receive video data, forward to ffmpeg process. ffmpeg send video data to rtmp server.

The problem is I can't find any working example for WebRTC on server (almost example use server to help 2 clients can connect together). What I need is use server as WebRTC client and get video data. I also take a look at RecordRTC but I only see example of upload video after stop record. I want to upload while recording (live stream) Please help


Solution

  • You may wish to have a look at this

    https://github.com/JosePedroDias/webcam2hls