RTSP Browser Playback Limits and Conversion Paths
Learn why browsers cannot directly play RTSP and how to test RTSP converted to WebRTC, HLS or HTTP-FLV.
Short answer
RTSP is a common camera and NVR source URL, but not a web playback URL. In web player development, RTSP belongs in the server ingest layer, not directly in the browser.
Where it sits in a video pipeline
RTSP controls a camera media session, while audio/video usually travels over RTP. Browsers do not expose a native RTSP/RTP playback entry.
A common project structure is: camera RTSP -> media server -> HLS/WebRTC/HTTP-FLV -> browser.
How to use it in a browser project
The frontend can identify rtsp:// and tell the user conversion is required, but video, hls.js and mpegts.js cannot directly play rtsp://.
If the RTSP URL is 192.168.x.x, 10.x.x.x or 172.16-31.x.x, a cloud page usually cannot reach it. The converter must run where it can access the camera.
What the server has to do
The server must validate RTSP credentials, port, channel path and TCP/UDP mode before converting it into a web-friendly output.
Choose WebRTC for low latency, HLS for compatibility, and HTTP-FLV or WS-FLV for internal engineering preview.
Common development scenarios
- IP camera preview, NVR channel access, site monitoring and device installation testing.
- Fits projects where the backend can access the device network and run media services.
Debugging order
- Test the RTSP source with VLC or ffprobe from the media server machine first; do not blame the browser first.
- Then check authentication, channel path, TCP/UDP mode, camera connection limits, private-network access and firewall rules.
Recommended conversion paths
- Real-time preview: RTSP -> WebRTC/WHEP.
- Public delivery: RTSP -> HLS/m3u8.
- Internal low latency: RTSP -> HTTP-FLV or WS-FLV.
Minimum usable implementation
- Frontend: after rtsp:// input, show that server conversion is required and let users test the converted HLS/WebRTC/FLV URL.
- Backend: ingest RTSP with a media server, expose a web playback URL, and return readable failure reasons.
Developer decision rule
RTSP should be judged by its role in the delivery chain, not by the protocol name alone. Browser result: Not directly playable in browsers. Before promising playback, confirm the source type, whether a server conversion is required, CORS and HTTPS policy, codec support and the latency target.