Browser Streaming Guide

RTSP to WebRTC — Stream IP Cameras in Any Browser

RTSP doesn't work in browsers natively. WebRTC does. Here's how to bridge the gap — and why a native iOS app is often the simpler solution.

Why RTSP Doesn't Work in Browsers

Browsers do not implement RTSP. Part of the reason is security, and part is protocol complexity: RTSP expects low-level socket behavior, transport negotiation, and media session control that doesn't fit the modern browser sandbox.

RTSP typically uses raw TCP and UDP connections, while browsers are intentionally limited to higher-level transports like HTTP, HTTPS, and WebSocket. That means Chrome, Firefox, and Safari cannot open rtsp:// URLs directly the way VLC or SmartRTSP can.

To get an IP camera into a browser, you usually convert RTSP → WebRTC for low-latency live viewing, or RTSP → HLS for broader compatibility with higher delay.

RTSP vs WebRTC — Key Differences

FeatureRTSPWebRTC
Browser support❌ None✅ All modern browsers
Native iOS/macOS app✅ SmartRTSP✅ Browser-based
LatencyLow (100–500ms)Very low (<200ms)
ProtocolCustom TCP/UDPUDP (DTLS/SRTP)
IP camera support✅ Universal❌ Needs conversion
Setup complexityLow (direct)Medium (needs relay)
Firewall traversalDifficult✅ STUN/TURN

Method 1: go2rtc (Recommended)

go2rtc is a free, lightweight media server that converts RTSP to WebRTC with minimal overhead. It's the easiest way to make a browser-friendly live view for one or more IP cameras.

# go2rtc.yaml streams: front_door: - rtsp://admin:pass@192.168.1.100:554/stream1

Access it in a browser:

http://your_server:1984/

Click the camera and choose the WebRTC stream, or embed it directly:

http://your_server:1984/stream.html?src=front_door

Install

# Docker docker run -d --name go2rtc -p 1984:1984 alexxit/go2rtc # Or binary (Linux/macOS/Windows) wget https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64

go2rtc also supports HLS, MSE (Media Source Extensions), RTSP re-streaming, and snapshot output from the same source.

Why it wins: go2rtc is lightweight, free, and especially popular with Home Assistant and Frigate users.

Method 2: MediaMTX

MediaMTX (formerly rtsp-simple-server) is another strong option if you want one server that can ingest RTSP and expose it as multiple outputs including WebRTC.

# mediamtx.yml paths: camera1: source: rtsp://admin:pass@192.168.1.100:554/stream1

WebRTC view:

http://localhost:8889/camera1

Docker:

docker run -d --network=host bluenviron/mediamtx

MediaMTX also outputs RTSP re-stream, HLS, and RTMP, making it a flexible choice for mixed browser and recorder deployments.

Method 3: Frigate NVR (Home Assistant)

Frigate uses go2rtc internally and exposes WebRTC views for each configured camera. If you already run Frigate, you may not need another bridge at all.

  • • WebRTC view: http://frigate_ip:5000/cameras/CAMERA_NAME
  • • Easily embedded into a Home Assistant dashboard
  • • See Frigate NVR guide for full setup

RTSP to HLS — Higher Latency Alternative

HLS works in all browsers, but the tradeoff is latency — usually 5 to 30 seconds. That's fine for playback, archiving, or web embeds, but not ideal for live monitoring or PTZ.

ffmpeg -rtsp_transport tcp -i rtsp://admin:pass@IP:554/stream1 \ -c:v libx264 -f hls -hls_time 2 -hls_list_size 3 \ /var/www/html/stream.m3u8

HLS is better for recording and VOD-style playback. WebRTC is better when you need near-real-time camera monitoring in the browser.

Why SmartRTSP is Simpler on iPhone

Every browser-based method above requires a relay server running 24/7. SmartRTSP skips all of that by connecting directly from iPhone or Mac to the camera's RTSP stream.

Direct RTSP → iPhone

Hardware H.265 decoding, no conversion layer, and no extra latency added by a media relay.

No Server Needed

No go2rtc, no Docker, and no always-on Linux box just to see your camera feed.

Remote Access via Tailscale

Works on the local network and remotely through Tailscale without exposing RTSP to the public internet.

Free App Store Download

SmartRTSP is free on the App Store for iPhone, iPad, and Mac.

Download SmartRTSP

The simplest way to view RTSP cameras on iPhone and macOS — no browser relay, no transcoding, no subscription.

Download SmartRTSP Free

WebRTC Latency vs RTSP Latency

WebRTC through go2rtc usually adds about 100–200ms of extra processing and buffering on top of the raw RTSP stream.

Direct RTSP in SmartRTSP gives you the lowest possible end-to-end latency because there is no browser bridge or media conversion step.

For security monitoring, both approaches are usually acceptable. For highly responsive PTZ control, direct RTSP is generally preferred.

RTSP to WebRTC FAQ

Can RTSP streams play in a browser?

Not directly — browsers don't support RTSP. You need to convert RTSP to WebRTC or HLS using a media server like go2rtc or MediaMTX.

What is the best way to convert RTSP to WebRTC?

go2rtc is the most popular and lightweight option. It runs on Docker or as a standalone binary.

Does WebRTC work with IP cameras?

IP cameras use RTSP, not WebRTC. A conversion layer (go2rtc, MediaMTX, Frigate) is needed to bridge RTSP to WebRTC for browser viewing.

What is the difference between WebRTC and RTSP?

RTSP is used by IP cameras for direct streaming. WebRTC is a browser API for real-time communication. They require a media server to connect.

How do I view RTSP cameras on iPhone without a server?

Use SmartRTSP — it connects directly to RTSP cameras on iPhone with no server needed.