Exploring Low-Latency Technology Options Across Wowza’s Product PortfolioOctober 7, 2021 Jan Ozer is a streaming expert who develops training courses for buisinesses and contributes to Streaming Media Magazine.
If you’re a live producer, glass-to-glass streaming latency is always a concern. Anyone currently streaming with Wowza has several options to reduce latency, with some requiring a change in technology and some involving a simple change in settings. In this article, I’ll review those alternatives using the features shown in Table 1.
Note that this document only discusses Wowza implementations of the technologies discussed. Other implementations of the same technology, like WebRTC, may have a completely different feature set.
As a starting point, if you’re using the Wowza Streaming Engine™ software or the Wowza Video™ platform at the default setting, you’ll have a ten-second segment size. What’s more, most players buffer three segments before starting playback. This translates to at least 30 seconds of latency between what’s live and what your viewers are seeing.
Let’s explore your options and see how low each technology can go.
|Tuning HLS/DASH for Low Latency (Wowza Video & Engine)||WebRTC (Wowza Video & Engine)||Real-Time Streaming at Scale (Wowza Video)||Low Latency HLS (Engine)|
|Latency||8-12 seconds||1-2 seconds||.5-1 second||2 seconds (but headed lower)|
|Scale||Yes||Not as efficiently||Yes||Yes|
|Application||Traditional live streaming||Conferencing/webinars||Distance learning, interactive low-latency apps like auctions and gambling||Interactive low-latency apps like auction and betting|
Tuning HLS/DASH for Low Latency (Wowza Video and Engine)
The simplest, cheapest, and safest way to reduce latency within Wowza Video or Streaming Engine is to simply reduce the segment size. Note that Apple recommends a minimum setting of six seconds per segment, which should reduce your latency down to 18–20 seconds. You can go lower, as described in the blog post, HLS Latency Sucks, But Here’s How to Fix It. Some producers have successfully reduced segment length to under half a second.
While this should cut latency to around 2-4 seconds, it also reduces the video buffered by the player from a very safe 30 seconds to a scary 1.5 seconds, which could translate to interrupted viewing. In addition, shorter segment lengths require shorter keyframe intervals, which can cut quality. So, if you’re broadcasting a live sporting event that will compete with social media for timeliness, exploring a segment size in the 2-3 second range may be worth it. For church services or town council meetings, not so much.
So long as your new segment size is fairly conservative — say 4-6 seconds — you can cut latency significantly without impacting pricing, infrastructure, or incurring development costs. You’ll also retain the same quality and feature set as you currently have. For most producers, this will be the best short-term approach.
For a tutorial detailing how to reduce the segment size of Apple HLS streams in the Wowza Streaming Engine, check out the post Changing Default Segment Size to Decrease Streaming Latency. A video tutorial for configuring Wowza Video to deliver shorter packets of data for low latency can be found here.
WebRTC (Video and Engine)
WebRTC is a streaming protocol that you can access in Wowza Streaming Engine and Wowza Video to reduce latency down to 1-2 seconds. For many streaming producers, however, there may be a mismatch between WebRTC’s strengths and their requirements.
To explain, WebRTC is designed for browser-to-browser real-time communications and Wowza’s implementation enables several unique workflows. For example, you can use Wowza’s toolkits to enable browser- or mobile-based encoding/streaming to Wowza Streaming Engine or Wowza Video that can be distributed at low latency via WebRTC, or transcoded and broadcast as HLS or DASH streams at normal latency. Alternatively, you can convert incoming RTMP streams to WebRTC in both Streaming Engine and Wowza Video. Wowza Streaming Engine also reduces the bandwidth requirements for peer-to-peer conferencing compared to out-of-the-box WebRTC solutions.
Building a WebRTC solution requires the implementation of web pages that utilize the browser’s built-in WebRTC components to publish and display video. Wowza has provided hosted pages in Wowza Video that can be used without requiring development. These are suitable for standard publish and playback use cases and are available in the live stream workflow.
WebRTC deployed in this manner doesn’t scale very effectively because all participants require server-based peer connections. You’ll also lose the quality and features available with HLS/DASH-based streaming, as Wowza Streaming Engine currently supports WebRTC connections consisting of a single stream rendition (no adaptive bitrate within a single connection) without captions and DVR functionality. If you capture video from a browser, browser-based encoders tend to produce lower quality than hardware or application-based encoders, particularly on lower-powered computers. Finally, relying on the browser for encoding and playback, as opposed to your own player, can cause minor compatibility issues as browsers update.
WebRTC is an ideal tool for those creating applications that leverage its browser-based functionality. But this specific implementation in Wowza Streaming Engine and Wowza Video is a poor candidate for traditional broadcasters simply seeking a low-latency technology. The scaling and development issues, in particular, are why Wowza created the next alternative, Real-Time Streaming at Scale.
Real-Time Streaming at Scale (Wowza Video)
Real-Time Streaming at Scale is a new feature of Wowza Video that enables live interactive streaming with a latency as low as sub-500 ms to up to a million viewers. The feature works by marrying Wowza Video’s WebRTC capabilities to a custom content delivery network (CDN), which leverages the strengths of WebRTC while minimizing the technical issues identified above.
As shown in Figure 1, you can capture video from an OBS version enhanced for WebRTC, a browser-based WebRTC encoder, or via RTMP, though latency with RTMP could extend to about 1 second.
Early beta testers have proven the new product’s functionality and utility. For example, after deploying the new feature, Karteek Routh, Director of Operations and Product Development at DocTutorials reported, “we live stream interactive lectures to audiences of varying sizes, causing unpredictable scaling needs. Low-latency streaming is critical to satisfy the back-and-forth nature of our workflow, but achieving this became a struggle when our broadcasts exceeded 300 viewers. Wowza’s Real-Time Streaming at Scale feature was the perfect solution. We’re now able to offer interactive video with less than a second of latency, allowing students to chat and interact in real time — regardless of whether 500 or 1,000 students are watching.”
Wowza Video’s Real-Time Streaming at Scale is encoder agnostic, instantly scalable, API-driven, and affordable, and provides easy-to-implement access to live interactive streaming to a global audience.
HTTP Live Streaming (HLS) is the specification for streaming to Apple devices and many other endpoints compatible with HLS. HLS is a full-featured HTTP-based streaming application with adaptive bitrate video, captions, DVR and other high-end features.
Low-Latency HLS is an extension to the HLS protocol that delivers the same quality and scalability as HLS, while reducing latency to under two seconds. Though originally HLS and Low-Latency HLS were separate specifications, in April 2020, the Internet Engineering Task Force incorporated Low-Latency HLS into the HLS specification. This has two implications; first, it further standardizes the specification, and second it puts pressure on third-party technology providers to support Low-Latency HLS.
Briefly, Low-Latency HLS reduces latency by dividing segments into “parts,” or much shorter segments, that are listed separately in the playlist. A playlist can contain “Preload Hints” that allow a player to anticipate the parts that will soon become available to download them immediately. The playlist also contains traditional segments that can be read by older HLS players not compatible with Low-Latency HLS. This makes Low-Latency HLS backwards compatible, so any players that aren’t optimized for Low-Latency HLS can fall back to standard (higher-latency) HLS behavior.
Wowza added support for Low-Latency HLS in Wowza Streaming Engine in late 2019 and has updated support for recent updates to the technology, the most notable being the removal of the HTTP/2 PUSH requirement. Wowza is also working with third-party suppliers like CDN Fastly and player developer THEO Technologies to provide an end-to-end solution optimized for the latest version of the Low-Latency HLS specification.
That said, because Wowza’s implementation is standards-based, you should be able to use your existing encoder, player, and CDN infrastructure, with scalability similar to HLS/DASH streams on Wowza Streaming Engine or Wowza Video. The Streaming Engine’s implementation of Low-Latency HLS will also deploy many controls to help balance latency and stream resiliency. Similarly, the management of issues critical to low-latency applications — like catching up when a stream falls behind and maintaining synchronization on all streams on all platforms — are also baked into this technology.
A Final Consideration When Weighing Low-Latency Technology
While low-latency technology is often beneficial, it’s critical to realize that it always comes at some risk to playback While low-latency technology is often beneficial, it’s critical to realize that it always comes at some risk to playback resiliency. Simply put: the lower the latency, the less resilient the stream. If your application functions well with a latency in the 8-12 second range, then a few tweaks to segment size in Wowza Streaming Engine and Wowza Video may be all that you need. On the other hand, if you really do need latency in the 3 seconds and lower range, you’ve got the additional options detailed above.
Start Streaming TodayFree Trial
Ready to tune your streams for low-latency delivery? Sign up for a free trial.