Blog - Intelligent Video Solutions

Streaming Protocols: Everything You Need to Know

Written by Aaron Bernard | Apr 22, 2021 7:04:07 PM

This article was originally published on wowza.com.


What Is a Protocol?

A protocol is a set of rules governing how data travels from one communicating system to another. These are layered on top of one another to form a protocol stack. That way, protocols at each layer can focus on a specific function and cooperate with each other. The lowest layer acts as a foundation, and each layer above it adds complexity.

You’ve likely heard of an IP address, which stands for Internet Protocol. This protocol structures how devices using the internet communicate. The Internet Protocol sits at the network layer. It’s typically overlaid by the Transmission Control Protocol (TCP) at the transport layer, as well as the Hypertext Transfer Protocol (HTTP) at the application layer.

 

 

The seven layers — which include physical, data link, network, transport, session, presentation, and application — were defined by the International Organization for Standardization’s (IS0’s) Open Systems Interconnection model, as depicted above.

 

What Is a Streaming Protocol?

Each time you watch a live stream or video on demand, streaming protocols are used to deliver data over the internet. These can sit in the application, presentation, and session layers.

Online video delivery uses both streaming protocols and HTTP-based protocols. Streaming protocols like Real-Time Messaging Protocol (RTMP) enable speedy video delivery using dedicated streaming servers, whereas HTTP-based protocols rely on regular web servers to optimize the viewing experience and quickly scale. Finally, a handful of emerging HTTP-based technologies like the Common Media Application Format (CMAF) and Apple’s Low-Latency HLS seek to deliver the best of both options to support low-latency streaming at scale.

 

UDP vs. TCP: A Quick Background

User Datagram Protocol (UDP) and Transmission Control Protocol (TCP) are both core components of the internet protocol suite, residing in the transport layer. The protocols used for streaming sit on top of these. UDP and TCP differ in terms of quality and speed, so it’s worth taking a closer look.

The primary difference between UDP and TCP hinges on the fact that TCP requires a three-way handshake when transporting data. The initiator (client) asks the accepter (server) to start a connection, the accepter responds, and the initiator acknowledges the response and maintains a session between either end. For this reason, TCP is quite reliable and can solve for packet loss and ordering. UDP, on the other hand, starts without requiring any handshake. It transports data regardless of any bandwidth constrains, making it speedier and riskier. Because UDP doesn’t support retransmissions, packet ordering, or error-checking, there’s potential for a network glitch to corrupt the data en route.

Protocols like Secure Reliable Transport (SRT) often use UDP, whereas HTTP-based protocols use TCP.

Adapted from https://microchipdeveloper.com/tcpip:tcp-vs-udp

 

Considerations When Choosing a Streaming Protocol

Selecting the right protocol starts with defining what you’re trying to achieve. Latency, playback compatibility, and viewing experience can all be impacted. What’s more, content distributors don’t always stick with the same protocol from capture to playback. Many broadcasters use RTMP to get from the encoder to server and then transcode the stream into an adaptive HTTP-based format.

 

 

What Are the Most Common Protocols Used for Streaming?

 

 

Traditional Streaming Protocols

Traditional streaming protocols, such as RTSP and RTMP, support low-latency streaming. But they aren’t natively supported on most endpoints (e.g., browsers, mobile devices, computers, and televisions). These work best for streaming to a small audience from a dedicated media server.

 

 

As shown above, RTMP delivers video at roughly the same pace as a cable broadcast — in just over five seconds. RTSP/RTP is even quicker at around two seconds. These protocols achieve such speed by transmitting the data using a firehose approach rather than requiring local download or caching. But because very few players support RTMP and RTSP, they aren’t optimized for great viewing experiences at scale. Many broadcasters choose to transport live streams to the media server using a stateful protocol like RTMP. From there, they can transcode it into an HTTP-based technology for multi-device delivery.

 

 

 

Adobe RTMP

Adobe designed the RTMP specification at the dawn of streaming. The protocol could transport audio and video data between a dedicated streaming server and the Adobe Flash Player. Reliable and efficient, this worked great for live streaming. But open standards and adaptive bitrate streaming eventually edged RTMP out. The writing on the wall came when Adobe announced the death of Flash — which officially ended in 2020.

While Flash’s end-of-life date was overdue, the same cannot be said for using RTMP for video contribution. RTMP encoders are still a go-to for many content producers, even though the proprietary protocol has fallen out of favor for last-mile delivery. 

  • Video Codecs: H.264, VP8, VP6, Sorenson Spark®, Screen Video v1 & v2
  • Audio Codecs: AAC, AAC-LC, HE-AAC+ v1 & v2, MP3, Speex, Opus, Vorbis
  • Playback Compatibility: Not widely supported (Flash Player, Adobe AIR, RTMP-compatible players)
  • Benefits: Low-latency and requires no buffering
  • Drawbacks: Not optimized for quality of experience or scalability
  • Latency: 5 seconds
  • Variant Formats: RTMPT (tunneled through HTTP), RTMPE (encrypted), RTMPTE (tunneled and encrypted), RTMPS (encrypted over SSL), RTMFP (travels over UDP instead of TCP)

 

Learn More

 

 

RTSP/RTP

Like RTMP, RTSP/RTP describes an old-school technology used for video contribution. RTSP and RTP are often used interchangeably. But to be clear: RTSP is a presentation-layer protocol that lets end users command media servers via pause and play capabilities, whereas RTP is the transport protocol used to move said data.

Android and iOS devices don’t have RTSP-compatible players out of the box, making this another protocol that’s rarely used for playback. But RTSP remains standard in many surveillance and closed-circuit television (CCTV) architectures. Why? The reason is simple. RTSP support is still ubiquitous in IP cameras.

  • Video Codecs: H.265 (preview), H.264, VP9, VP8
  • Audio Codecs: AAC, AAC-LC, HE-AAC+ v1 & v2, MP3, Speex, Opus, Vorbis
  • Playback Compatibility: Not widely supported (Quicktime Player and other RTSP/RTP-compliant players, VideoLAN VLC media player, 3Gpp-compatible mobile devices)
  • Benefits: Low-latency and supported by most IP cameras
  • Drawbacks: No longer used for video delivery to end users
  • Latency: 2 seconds
  • Variant Formats: The entire stack of RTP, RTCP (Real-Time Control Protocol), and RTSP is often referred to as RTSP
Learn More
 
 

Adaptive HTTP-Based Streaming Protocols

Streams deployed over HTTP are not technically “streams.” Rather, they’re progressive downloads sent via regular web servers. Using adaptive bitrate streaming, HTTP-based protocols deliver the best video quality and viewer experience possible — no matter the connection, software, or device. Some of the most common HTTP-based protocols include MPEG-DASH and Apple’s HLS.

 

 

 

Apple HLS

Since Apple is a major player in the world of internet-connected devices, it follows that Apple’s HLS protocol rules the digital video landscape. For one, the protocol supports adaptive bitrate streaming, which is key to viewer experience. More importantly, a stream delivered via HLS will play back on the majority of devices — thereby ensuring accessibility to a large audience.

HLS support was initially limited to iOS devices such as iPhones and iPads, but native support has since been added to a wide range of platforms. All Google Chrome browsers, as well as Android, Linux, Microsoft, and MacOS devices, can play streams delivered using HLS.

  • Video Codecs: H.265, H.264
  • Audio Codecs: AAC-LC, HE-AAC+ v1 & v2, xHE-AAC, Apple Lossless, FLAC
  • Playback Compatibility: Great (All Google Chrome browsers; Android, Linux, Microsoft, and MacOS devices; several set-top boxes, smart TVs, and other players)
  • Benefits: Adaptive bitrate and widely supported
  • Drawbacks: Quality of experience is prioritized over low latency
  • Latency: 6-30 seconds (lower latency only possible when tuned)
  • Variant Formats: Low-Latency HLS (see below), PHLS (Protected HTTP Live Streaming)

 

Learn More
 
 
 

Low-Latency HLS

Low-Latency HLS (LL-HLS) is the latest and greatest technology when it comes to low-latency streaming. The proprietary protocol promises to deliver sub-three-second streams globally. It also offers backward compatibility to existing clients.

In other words, it’s designed to deliver the same simplicity, scalability, and quality as HLS — while significantly shrinking the latency. At Wowza, we call this combination the streaming trifecta.

Even so, successful deployments of Low-Latency HLS require integration from vendors across the video delivery ecosystem. We’ve teamed up with Fastly and THEO to create an end-to-end solution and are continuing to add enhancements.

  • Playback Compatibility: Any players that aren’t optimized for Low-Latency HLS can fall back to standard (higher-latency) HLS behavior
    • HLS-compatible devices include MacOS, Microsoft, Android, and Linux devices; all Google Chrome browsers; several set-top boxes, smart TVs, and other players
  • Benefits: Low latency, scalability, and high quality… Oh, and did we mention backward compatibility?
  • Drawbacks: As an emerging spec, vendors are still implementing support
  • Latency: 2 seconds or less

 

Learn More

 

 

MPEG-DASH

When it comes to MPEG-DASH, the acronym spells out the story. The Moving Pictures Expert Group (MPEG), an international authority on digital audio and video standards, developed Dynamic Adaptive Streaming over HTTP (DASH) as an industry-standard alternative to HLS. Basically, with DASH you get an open-source option. But because Apple tends to prioritize its proprietary software, support for DASH plays second fiddle.

  • Video Codecs: Codec-agnostic
  • Audio Codecs: Codec-agnostic
  • Playback Compatibility: Good (All Android devices; most post-2012 Samsung, Philips, Panasonic, and Sony TVs; Chrome, Safari, and Firefox browsers)
  • Benefits: Vendor independent, international standard for adaptive bitrate
  • Drawbacks: Not supported by iOS or Apple TV
  • Latency: 6-30 seconds (lower latency only possible when tuned)
  • Variant Formats: MPEG-DASH CENC (Common Encryption)

 

Learn More

 

 

Low-Latency CMAF for DASH

Low-latency CMAF for DASH is another emerging technology for speeding up HTTP-based video delivery. Although it’s still in its infancy, the technology shows promise delivering superfast video at scale by using shorter data segments. That said, many vendors have prioritized support for Low-Latency HLS over that of low-latency CMAF for DASH.

  • Playback Compatibility: Any players that aren’t optimized for low-latency CMAF for DASH can fall back to standard (higher-latency) DASH behavior
  • Benefits: Low latency meets HTTP-based streaming
  • Drawbacks: As an emerging spec, vendors are still implementing support
  • Latency: 3 seconds or less

 

Learn More

 

 

Microsoft Smooth Streaming

Microsoft developed Microsoft Smooth Streaming in 2008 for use with Silverlight player applications. It enables adaptive delivery to all Microsoft devices. The protocol can’t compete with other HTTP-based formats and isn’t commonly used. In fact, in our Video Streaming Latency Report, less than 3 percent of respondents were using Smooth Streaming.

Which streaming formats are you currently using?

 

 

Adobe HDS

HDS was developed for use with Flash Player as the first adaptive bitrate protocol. Because Flash is no more, it’s fallen out of favor. Don’t believe us? Just take a look at the graph above.

 

Emerging Technologies

Last but not least, new technologies like WebRTC and SRT promise to change the landscape. Similar to low-latency CMAF for DASH and Apple Low-Latency HLS, these protocols were designed with latency in mind.

 

 

SRT

This open-source protocol is recognized as a proven alternative to proprietary transport technologies — helping to deliver reliable streams, regardless of network quality. It competes directly with RTMP and RTSP as a first-mile solution, but it’s still being adopted as encoders, decoders, and players add support.

From recovering lost packets to preserving timing behavior, SRT was designed to solve the challenges of video contribution and distribution across the public internet. And it’s quickly taking the industry by storm. One interactive use case for which SRT proved instrumental was the 2020 virtual NFL draft.  The NFL used this game-changing technology to connect 600 live feeds for the first entirely virtual event.

  • Video Codecs: Codec-agnostic
  • Audio Codecs: Codec-agnostic
  • Playback Compatibility: Limited (VLC Media Player, FFPlay, Haivision Play Pro, Haivision Play, Larix Player, Brightcove)
  • Benefits: High-quality, low-latency video over suboptimal networks
  • Drawbacks: Not widely supported for video playback
  • Latency: 3 seconds or less, tunable based on how much latency you want to trade for packet loss

 

Learn More

 

WebRTC

As the speediest technology available, WebRTC delivers near-instantaneous voice and video streaming to and from any major browser. The framework was designed for pure chat-based applications, but it’s now finding its way into more diverse use cases.

Scalability remains a challenge with WebRTC, though, so you’ll need to utilize a solution like Wowza Streaming Engine or Wowza Streaming Cloud to reach a larger audience.

  • Video Codecs: H.264, VP8, VP9
  • Audio Codecs: Opus, iSAC, iLBC
  • Playback Compatibility: Chrome, Firefox, and Safari support WebRTC without any plugin
  • Benefits: Super fast and browser-based
  • Drawbacks: Designed for video conferencing and not scale
  • Latency: Sub-500-millisecond delivery
Learn More

 

What Protocols Are Not: Codecs

For anyone who wasn’t sure what I was talking about when listing the audio and video codecs for each protocol, this video will walk you through the difference.

 

 

Conclusion: How to Choose the Right Protocol

Protocols differ in the following areas:

  • Scalability
  • Latency
  • Quality of experience (adaptive bitrate enabled, etc.)
  • Use (first-mile contribution vs. last-mile delivery)
  • Playback support
  • Proprietary vs. open source
  • Codec requirements

By prioritizing the above considerations, it’s easy to narrow down what’s best for you.

RTMP and SRT are great bets for first-mile contribution, while both DASH and HLS lead the way when it comes to playback. That’s why we’re especially excited to see low-latency CMAF for DASH and Low-Latency HLS take off. But you may be looking to deploy a one-to-few conference, in which case WebRTC would be better suited.

Download our Checklist to see the 10 Service Offerings you should expect from your A/V Capture Provider