You've got an IP camera with an RTSP URL. VLC plays it fine. Then you try to put it on a web page and nothing works, because no browser plays RTSP. Converting RTSP to WebRTC is how you get that camera into a browser without plugins, and with about half a second of delay instead of the 8–12 seconds HLS would give you.
Here's how the conversion works and how you set it up.
How RTSP to WebRTC conversion works
Your camera doesn't push video anywhere. RTSP is a pull protocol: a client asks the camera for the stream. So you put a media server in the middle. It pulls RTSP from the camera, then republishes the same video to browsers over WebRTC. If the camera sends H.264, the server just passes the video through, so it uses very little CPU.
Go from one camera to many
The complete guide to WebRTC video streaming covers how to scale WebRTC delivery and what pushes latency up.
If you need recording, access control and scaling across many cameras, start a 14-day free trial of Ant Media Server Enterprise. It includes WebRTC playback, adaptive bitrate and clustering, and you don't need a credit card.
RTSP to WebRTC FAQ
Can a browser play RTSP directly?
No. Browsers don't support RTSP. You need a server that converts it to WebRTC or HLS.
Why convert RTSP to WebRTC instead of HLS?
WebRTC plays in about half a second. HLS typically adds 8–12 seconds, which is too slow for live monitoring.
Does converting RTSP to WebRTC need transcoding?
Not if your camera sends H.264. The server can pass the video through. H.265 video or AAC audio usually needs conversion.

Top comments (0)