Streaming Protocols: Contribution vs Delivery
In this article
- Background: Why Two Different Protocol Families?
- Contribution Protocols: Getting the Signal In
- Delivery Protocols: Getting the Signal Out
- How They Work Together: The Streaming Pipeline
- Choosing the Right Protocol for Your Use Case
- Common Problems and Misconceptions
- Cost and Bandwidth Considerations
- Frequently Asked Questions
Streaming protocols are the rules that govern how video travels from a camera to a viewer. The key distinction is that contribution protocols carry a live signal from a production site to a processing hub, while delivery protocols carry the final stream from that hub to the audience's device. This article explains the difference, why it matters, and how to choose the right protocol for your use case.
Background: Why Two Different Protocol Families?
Live video has two very different legs of the journey. The first leg is the contribution link: a camera, encoder, or production switcher sends a high-quality signal to a streaming server or CDN ingress point. This link often involves a dedicated network, a fixed bitrate, and low tolerance for packet loss. The second leg is delivery: the server takes that signal and distributes it to thousands or millions of viewers over the public internet, where bandwidth varies wildly and devices range from 4K TVs to 3G phones.
Because the requirements differ, the protocols were designed for different jobs. Contribution protocols prioritize quality and low latency over compatibility. Delivery protocols prioritize scalability, adaptive bitrate, and compatibility with browsers and mobile devices.
Contribution Protocols: Getting the Signal In
Contribution protocols are used to get a live feed from where it is produced to where it will be processed and distributed. They assume you control both ends of the connection, or at least that you have a reliable network path. Common examples include:
- RTMP (Real-Time Messaging Protocol): Originally developed by Macromedia (now Adobe) for Flash, RTMP is still the most widely supported contribution protocol. It uses TCP, which guarantees delivery but adds latency. Most encoders and streaming platforms accept RTMP for ingestion.
- SRT (Secure Reliable Transport): A modern open-source protocol designed to work well over unpredictable networks like the public internet. It uses packet retransmission and forward error correction, making it a strong choice for remote contributions where you can't guarantee bandwidth.
- RIST (Reliable Internet Stream Transport): Another reliable transport protocol, developed by the Video Services Forum. It is similar to SRT but with a different error-correction approach and broader industry backing from broadcast vendors.
- NDI (Network Device Interface): A protocol that carries video, audio, and control data over a local IP network. It is popular in live production environments where multiple cameras and computers need to share signals without dedicated SDI cables.
Contribution protocols often carry higher bitrates (10–50 Mbps or more) and lower compression than what is delivered to viewers, because the signal is still being processed. Latency is typically low (under 1 second) but not the primary concern—reliability and quality are.
Delivery Protocols: Getting the Signal Out
Delivery protocols are what the viewer's player uses to fetch the stream. They are designed to work over HTTP, which is the same protocol that loads web pages, so they can pass through firewalls and work with standard web servers and CDNs. The two dominant delivery protocols are:
- HLS (HTTP Live Streaming): Developed by Apple, HLS breaks the stream into small MP4 or TS segments (typically 2–10 seconds long) and serves them over HTTP. The player requests segments in sequence, and can switch between different quality levels (adaptive bitrate). HLS is supported by virtually every device and browser, making it the default for most streaming platforms.
- DASH (Dynamic Adaptive Streaming over HTTP): An open standard similar to HLS, but with more codec flexibility. DASH is common in Android apps, smart TVs, and web players that use MSE (Media Source Extensions). It also supports adaptive bitrate and uses a manifest file (MPD) to describe the available qualities.
Delivery protocols are optimized for scalability. They use standard HTTP caching, which means CDNs can store and serve segments from edge servers close to the viewer. They also enable adaptive bitrate: the player measures available bandwidth and switches to a lower or higher quality segment to avoid buffering.
How They Work Together: The Streaming Pipeline
A typical live streaming workflow uses both protocol families in sequence:
- Camera captures video and sends it to an encoder (hardware or software).
- The encoder compresses the video (H.264 or HEVC) and sends it via a contribution protocol (RTMP, SRT, or RIST) to a streaming server or CDN ingress.
- The server transcodes the stream into multiple bitrates and resolutions (e.g., 1080p at 5 Mbps, 720p at 2.5 Mbps, 480p at 1 Mbps).
- The server packages each rendition into HLS or DASH segments and publishes them to a CDN.
- The viewer's player requests the manifest and segments over HTTP, adapting quality based on bandwidth.
This separation lets you use the best tool for each leg. For example, a sports broadcaster might use SRT to send a 20 Mbps feed from a stadium to the cloud, then deliver HLS at 5 Mbps to mobile viewers.
Choosing the Right Protocol for Your Use Case
There is no single "best" protocol—it depends on your network, latency needs, and target devices. Here are the key factors:
- Latency: If you need sub-second interactivity (e.g., live auction, gaming), look at WebRTC for delivery and SRT or NDI for contribution. For typical live events, 10–30 seconds of latency (HLS/DASH) is acceptable.
- Network reliability: If your contribution link is over the public internet with possible packet loss, SRT or RIST is better than RTMP because they can recover lost packets.
- Firewall traversal: RTMP uses port 1935, which some corporate networks block. SRT can use any port, and RIST is designed to work over UDP. For delivery, HTTP (80/443) is universally open.
- Target devices: HLS is the safest choice for broad compatibility. DASH is better if you want to use codecs like AV1 or HEVC on devices that support them.
A common mistake is using a delivery protocol (like HLS) for contribution, which adds unnecessary latency and complexity. Similarly, using RTMP for delivery is outdated because Flash is dead and RTMP doesn't support adaptive bitrate or standard HTTP caching.
Common Problems and Misconceptions
- "RTMP is dead" – Not true for contribution. RTMP is still the most widely accepted ingestion format on platforms like YouTube, Facebook, and Twitch. It's only obsolete as a delivery protocol.
- "Lower latency always means better" – Low latency is only valuable if the viewer needs to interact (e.g., live chat, betting). For a concert or conference, 10 seconds of latency is fine and allows for smoother playback.
- Packet loss on contribution: RTMP over TCP will stall if packets are lost. SRT uses retransmission but can add delay. If you're on a flaky connection, use SRT with a longer buffer (e.g., 2–4 seconds) to absorb jitter.
- Segment size vs. latency: In HLS, a 6-second segment means the player can't start playback until it downloads at least one segment, adding 6+ seconds of latency. Using 2-second segments reduces latency but increases overhead.
Cost and Bandwidth Considerations
Contribution protocols generally use higher bitrate because the signal is not yet optimized for the viewer. For example, a 1080p contribution stream might be 8–15 Mbps, while the delivered stream to viewers might be 3–6 Mbps. This affects your upload bandwidth and any egress costs if you're sending to a cloud service.
Delivery costs are driven by the number of viewers and the bitrate you serve. With adaptive bitrate, most viewers will watch at a lower quality, reducing your CDN bill. Using HLS/DASH over HTTP also allows CDN caching, which drastically reduces origin server load compared to pushing a single high-bitrate stream to every viewer.
For small-scale streaming (a few hundred viewers), you can often use a single platform that handles both contribution and delivery. For larger events, you'll want to separate the two legs so you can scale delivery independently.
Frequently Asked Questions
What is the difference between RTMP and HLS?
RTMP is a contribution protocol used to send video from an encoder to a server. It uses TCP and is not designed for adaptive bitrate or HTTP caching. HLS is a delivery protocol that breaks video into small HTTP segments and supports adaptive bitrate. You can't deliver to a modern browser with RTMP, but you can use it to ingest a stream that is then delivered via HLS.
Why is my stream lagging behind the live event?
Latency is introduced by buffering at each stage: the encoder buffer, the server buffer, the segment duration, and the player buffer. For HLS, a 6-second segment plus a 3-second player buffer means you're at least 9 seconds behind. To reduce latency, use shorter segments, a smaller player buffer, or switch to a low-latency protocol like WebRTC or LL-HLS.
Can I use WebRTC for delivery?
Yes, WebRTC can deliver sub-second latency video to browsers and mobile apps, but it requires a signaling server and doesn't scale as easily as HLS/DASH for large audiences. It's best for interactive use cases like video calls or live auctions where latency under 500ms is critical.
What is the best protocol for streaming from a remote location?
For remote contribution over the internet, SRT is a strong choice because it handles packet loss and jitter better than RTMP. If you have a dedicated fiber link, RTMP is simpler and widely supported. For delivery to viewers, HLS is the safest default.
Does using TCP vs UDP matter?
Yes. TCP guarantees delivery but can cause delays when packets are lost (retransmission). UDP is faster but drops packets. Contribution protocols like SRT use UDP with retransmission, giving you the best of both. Delivery protocols like HLS use HTTP over TCP, which is fine because the segments are small and can be re-requested if lost.
Why does my stream buffer on a fast internet connection?
Buffering is often caused by the server not keeping up, not the viewer's bandwidth. Check your encoder's bitrate and ensure it's not exceeding your upload capacity. Also, the player might be requesting a higher quality than the connection can sustain—adaptive bitrate should handle this, but some players have aggressive start-up settings.