RTMP vs HLS: Differences and How to Choose
RTMP is a good choice for real-time interaction that requires low latency. HLS is better suited to long broadcasts that need stable delivery during short-term network changes. This article explains how both protocols work, compares their stability through a real YouTube streaming test, and provides selection criteria.
Protocols Used to Send Live Streams
There are several ways to send a live stream to a video platform such as YouTube. The most widely used method is RTMP (Real-Time Messaging Protocol). HLS (HTTP Live Streaming) and SRT (Secure Reliable Transport) are also used in some cases.
RTMP has been used for live streaming for long time. Many encoders and platforms support it, RTMP has become the de facto standard for sending streams to a platform. RTMPS encrypts the connection, but its basic operation is the same as RTMP. For this reason, RTMP is usually the first ingest method to consider when there are no special requirements.
RTMP is not the only option. YouTube supports HLS ingest, and some other platforms and broadcast systems support SRT to provide low latency and reliable transport. However, neither HLS nor SRT is as widely used as RTMP for live stream ingest.
Different protocols send live stream data in different ways. These differences affect the behavior and stability of a live channel. This article compares how RTMP and HLS deliver data and explains which protocol may be more suitable for YouTube Live streaming.
RTMP vs HLS: Continuous vs Segmented
Both protocols are designed to send a video stream without stopping, but they use very different delivery methods. The graph below shows the main difference.

The graph shows network traffic from the same MPEG2-TS UDP stream after a Wowza Streaming Engine server converted it to RTMP and HLS. The graph on the left shows RTMP throughput, and the graph on the right shows HLS throughput.
The two patterns are clearly different. In the RTMP graph, network traffic of about 5 Mbps occurs continuously. In the HLS graph, traffic rises to about 50 Mbps at roughly 10-second intervals and then stops.
RTMP sends an encoded data stream continuously. It is similar to leaving a faucet slightly open so that a steady amount of water keeps flowing. A real-time phone call is another useful comparison: audio from the other person arrives continuously. The player receives this data stream and plays it as it arrives.
HLS collects the encoded data stream for a set period, creates a video file, and then sends it. Each fixed-duration piece of video is called a segment. It is also commonly called a chunk.
This method is similar to filling a bucket and carrying it only after it contains enough water. It is also like writing information on paper and then sending it as a letter. If the player downloads the next 10-second video file and adds it to the playlist before the current 10-second file ends, playback can continue without stopping. By repeating this process, HLS plays many separate chunks as one continuous live video.
In summary, RTMP and HLS use the following delivery methods.
- RTMP
- Sends video data as a continuous stream.
- It is similar to a real-time phone call or water flowing continuously from a faucet.
- HLS
- Collects video data at fixed time intervals, creates video files, and sends them.
- Plays the received chunks continuously according to a playlist.
How the Differences Affect Streaming: Latency vs Stability
As explained above, the biggest difference between RTMP and HLS is continuous delivery versus segmented delivery. This difference affects both live streaming latency and the ability to handle changes in network conditions.
HLS collects stream data for a set period, creates a chunk, and then sends it. This means that HLS needs time to collect the stream data. If the chunk duration is set to 10 seconds, delivery starts only after at least 10 seconds of data has been collected. This creates at least 10 seconds of latency. However, even if network delay occurs while a chunk is being uploaded, the stream can continue as long as delivery finishes within the available 10-second window.
RTMP continuously sends data from the encoder in real time. Continuous real-time delivery means that ① the data must arrive at the correct time, ② in the correct order, and ③ without corruption. If a transmission problem affects any of these conditions, video playback may also be affected. However, because RTMP does not need to create separate chunks, it can provide lower latency than HLS.
In summary, RTMP and HLS have the following characteristics.
- RTMP
- It has relatively low transport latency because it does not create chunks.
- It is sensitive to short-term drops in connection quality because data must continue to arrive in time for playback.
- HLS
- Chunk creation and buffering add latency.
- It can absorb short-term drops in connection quality because the next chunk only needs to arrive before its playback time.
RTMP vs HLS: Which Is Better for Your YouTube Live Stream?
RTMP and HLS use different delivery methods, so each protocol is suitable for a different live streaming environment. RTMP is a better choice when you need immediate interaction with viewers or lower latency. HLS is worth considering when stable delivery over a long period is more important than latency, or when short-term network quality drops occur repeatedly.
Do You Need to Respond to Viewers Immediately? – RTMP
RTMP is more suitable for content such as game streams that require real-time interaction with viewers. Even if you use YouTube’s recommended minimum HLS chunk duration of two seconds, responding to a viewer requires at least four seconds. YouTube’s internal transcoding and delivery time adds more delay. Excessive latency reduces the quality of real-time interaction.
Is Latency Important? – RTMP
RTMP is also more suitable for latency-sensitive content such as live sports or major announcements. A long delay can cause spoilers. For example, you may hear your neighbor cheering for a goal before the same goal appears on your television.
Will the Broadcast Last Three Hours or Longer? – HLS
Three hours is long enough for network conditions to change from what they were when the live stream started. In fact, network quality can change within minutes. An RTMP stream that worked smoothly at first may become unstable as network conditions change. HLS is less affected by short-term network changes, so it can be a better choice for maintaining a stable long-duration stream.
Using Wi-Fi or an Unstable Network? – HLS
A transmission error during an RTMP stream can cause playback problems. HLS can continue playing even after a short-term transmission error, as long as the required data arrives before its playback deadline. HLS is therefore a useful option when you use Wi-Fi or when the quality of a wired internet connection is poor.
The Author’s Recommendation: HLS
Internet connections are less stable than many people expect. A domestic platform may use a simpler network path, while a global platform such as YouTube may use a more complex path that includes interconnections between internet service providers and platform operators.
A more complex delivery path contains more transit points. This creates more points where a problem can occur and also increases the total physical distance that the signal must travel. A failure in a submarine cable, relay facility, or outdoor communications facility can affect the entire delivery path. Even local rain can change the condition of outdoor communications equipment, wireless links, or the local network and affect internet quality.
The video above shows the same live stream source sent to YouTube as RTMP and HLS from one Wowza Streaming Engine server. The RTMP stream on the left repeatedly buffers and stutters, while the HLS stream on the right continues to play smoothly.
There was a latency difference of about 30 seconds between the two streams. Their playback positions were synchronized to compare transport stability using the same scene. The purpose of this video is therefore not to show the latency difference between the two methods. It compares playback stability under the same source and streaming conditions.
I design streaming systems with stability as the first priority. For this reason, I generally recommend HLS. However, the best choice may differ depending on your environment and the type of content you stream. I hope this article helps you select the right protocol and achieve your streaming goals.
FAQ
- What is the difference between HLS and RTMP?
- RTMP maintains one connection and sends the encoded data as a continuous stream. HLS divides the data into fixed-duration segments and sends them with a playlist. Because of this difference, RTMP generally provides lower latency, while HLS has more time to absorb short-term changes in network quality.
- When should I choose HLS for YouTube Live streaming?
- Consider HLS when stable delivery over a long period is more important than immediate viewer interaction. HLS is also worth considering when short-term speed drops or increased latency repeatedly interrupt an RTMP stream.
- When should I choose RTMP for YouTube Live streaming?
- RTMP or RTMPS is a better choice for game streams, live Q&A sessions, and other content that requires immediate viewer interaction. It is also suitable for latency-sensitive content such as live sports. If you want to use YouTube’s low-latency or ultra-low-latency setting, consider RTMP-based delivery before HLS.
- What is the difference between RTMP and RTMPS?
- RTMPS is RTMP over an encrypted connection. Viewers may not notice a difference, but RTMPS improves security by encrypting the video, audio, and control data in transit. If both your encoder and platform support RTMPS, it is the better option. YouTube also recommends RTMPS.
- Can OBS send an HLS stream to YouTube?
- Yes. Recent versions of OBS Studio support HLS output and can stream by using the YouTube HLS service.
- Does an unstable network affect both RTMP and HLS?
- Yes. However, HLS can transfer the next chunk while the current chunk is playing. Playback can continue if the transfer finishes before the next chunk must play. For example, if one 10-second chunk is 6 MByte and the connection is 1 Gbps, there may theoretically be close to 200 opportunities to retransmit the data.
- Which is more stable, HLS or RTMP?
- HLS is relatively more stable on a network with repeated short-term speed drops or increases in latency. Its segments and playback buffer provide time to absorb these temporary network changes.
- Is a 10 Gbps fiber internet connection always stable?
- No. Maximum bandwidth and transport stability are different. Problems can still occur on a 10 Gbps internet connection. For live streaming, it is more important to maintain the required upload bitrate continuously and keep latency and packet loss under control than to have a high advertised maximum speed.
- Can HLS latency be reduced?
- Yes. LL-HLS (Low-Latency HLS) is a low-latency specification that can reduce latency to less than one second. Both the platform and encoder must support it.
- Does transport delay affect only the video shown to viewers?
- No. If transport delay continues to build up, the output buffer can grow and the video delivered to viewers can fall further behind real time. When the buffer reaches its limit, the system may drop frames, time out, disconnect, or restart the stream. In a system without suitable buffer limits, increased memory usage can also make the entire server unstable.
Update History
- — First published
- — Second revision and migration