Live Streaming Protocol Comparison
| Protocol | Key Features | Best For |
|---|---|---|
| RTMP | Low latency, relies on Flash-era technology | Traditional pushing / pulling |
| HTTP-FLV | Low latency, playable in HTML5 | The go-to choice for web live streaming |
| WebSocket-FLV | Even lower latency | Latency-sensitive scenarios |
| HLS | High compatibility, segment-based delivery | Video-on-demand and mobile |
How to Play
- Copy your live stream URL (a
.flvor RTMP address). - Open the RTMP video stream player.
- Paste the address and press play.
- If the stream fails to play, the tool automatically falls back to HLS.
Technical Notes
The player is built on Video.js and flv.js (open source by bilibili), decoding the stream in your browser via Media Source Extensions — no Flash plugin required.
Frequently Asked Questions (FAQ)
How the Protocols Fit Together
RTMP, HTTP-FLV and HLS are not competitors so much as different legs of one journey. An encoder (OBS, a camera rig, a cloud transcoder) pushes the live feed to a media server over RTMP — that leg is called contribution. The server then repackages the same stream for viewers: HTTP-FLV or WebSocket-FLV carries it to web players with low delay, while HLS chops it into segments for maximum compatibility on phones and flaky networks.
Understanding that chain explains most playback mysteries. If the encoder shows "connected" but no viewer can watch, the problem is on the distribution leg, not RTMP. If one viewer works and another does not, compare which protocol each player negotiated — the tool falls back from FLV to HLS automatically, which is often exactly where the difference lies.
When the Stream Refuses to Play
- Check the URL scheme first. rtmp:// addresses cannot be played by a browser directly — you need the FLV/WS-FLV playback address the media server provides.
- Stream keys expire. Live platforms rotate or expire push URLs; an address that worked yesterday can be dead today.
- Corporate networks block streaming ports. RTMP uses port 1935, which many firewalls close; try from a different network before blaming the player.
Why is CORS required for playback?
Browser cross-origin security policies require the streaming server to send the proper CORS headers, otherwise the stream cannot be pulled into a web page.
How high is the typical latency?
HTTP-FLV usually adds about 1–5 seconds of latency; for scenarios that demand even lower latency, consider a WebRTC solution.
How much delay should I expect?
HTTP-FLV playback typically trails the encoder by one to three seconds; HLS lands anywhere from six to thirty seconds depending on segment length. If you need sub-second, neither web protocol is the right tool.
Can a browser play an rtmp:// address directly?
No. Browsers dropped Flash, which was the only native RTMP client. The stream must be repackaged by the media server into HTTP-FLV or HLS first — which is what practically every live platform does.
Why does the stream play on desktop but not on my phone?
Mobile browsers differ in protocol support and autoplay policies. Try tapping the player once to satisfy autoplay rules, and prefer the HLS fallback path on mobile networks.
References
- Video.js: https://videojs.com/
- flv.js (by bilibili): https://github.com/bilibili/flv.js