javascript – How to use WebRTC to stream video to RTMP?

SRS(Simple Realtime Server) is also able to covert WebRTC to RTMP, vice versa.

WebRTC to RTMP is used for H5 publisher for live streaming. And SRS also support RTMP to WebRTC, which is low latency live streaming. Generally, RTMP is about 3~5s latency, while RTMP to WebRTC is about 0.8~1s latency.

Apart of this, SRS also support HTTP-FLV, which enable H5 to play the RTMP, by flv.js. The latency is also lower than HLS or LLHLS.

Note: Other live streaming features are also important, because of off-topic, so please check the wiki of SRS, like DVR-MP4, DASH, Cluster, HTTP-API, etc.

It’s also OK to use nginx to pull RTMP stream from SRS, or let SRS to forward RTMP to nginx, after covert WebRTC to RTMP stream by SRS.

Read more here: Source link