TodayTools

Compare protocols

RTMP vs HLS: sending a live stream vs watching one

Donate
What brings you here?

The difference at a glance

RTMP

Real-Time Messaging Protocol

Best for: Sending your stream to the server

One steady stream pushed up to the server.
  1. Video, from Your encoder
  2. Video, from Your encoder
  3. Video, from Your encoder
  4. Video, from Your encoder

HLS

HTTP Live Streaming

Best for: Viewers on phones, TVs and browsers

Viewers fetch short video files over normal HTTPS.
  1. Playlist?, from Viewer
  2. List, from Stream server
  3. Clip 1, from Stream server
  4. Clip 2, from Stream server

The short answer

RTMP keeps one TCP connection open and pushes audio and video with only a few seconds of delay, which is why streaming software uses it to send a stream to a platform. HLS cuts video into small files over normal HTTP, so any phone or browser can play it and caches can serve millions. Most live streams use RTMP in and HLS out.

Which one fits you?

Tick everything that is true for you.

What do you need?

Your pick shows here

Tick one or more lines and we weigh them for you.

RTMP and HLS side by side

RTMP vs HLS: differences row by row
What differsRTMPHLS
Main job todayIngest: encoder to serverDelivery: server to viewers
TransportOne long TCP connectionMany HTTP(S) requests for short segments
Port1935 (RTMPS often 443)443 or 80
Typical delayA few secondsAbout 6 to 30 seconds; Low-Latency HLS about 2 to 5
Plays in browsersNoYes, natively or with a small player script
Adaptive qualityNo, one bitrate per streamYes, the player switches between renditions
Scaling to many viewersHard: every viewer holds a connectionEasy: segments are plain files that caches serve
FilesNone, a continuous stream.m3u8 playlists and .ts or .mp4 segments

Watch each one work

Each page plays the real packets on a map, step by step, with every header explained.

Test yourself

Each line describes one of the two. Which one?

Question 1 of 8

Main job today

Ingest: encoder to server

Questions people ask

Is RTMP dead?

Not for sending. Browsers no longer play RTMP, but it is still the most common way encoders push a live stream to a server, often as RTMPS with TLS.

Why does HLS have more delay?

The player waits for a few complete segments, each a few seconds long, before it starts. Low-Latency HLS uses smaller parts to cut that down.

Can I convert RTMP to HLS?

Yes. A media server takes the RTMP stream in, cuts it into segments and writes the playlist. That is how most live platforms work.

What is an .m3u8 file?

It is the HLS playlist: a small text file listing the video segments and, in a master playlist, the quality levels a player can choose from.

More comparisons

Donate