We break down the time from the moment something is captured to the moment it appears on the viewer's screen (glass-to-glass) into stages, and get a feel for which stages are easy to shorten.
In Chapter 10 you learned that adaptive streaming such as HLS and DASH cuts video into segments a few seconds long (Adaptive streaming). This approach is stable and works well with CDNs, but a segment can only be sent after it has been fully produced, so latency is large by default. This chapter covers where that latency can be reduced, by how much, and at what cost.
The total time from something happening in front of the camera lens (glass) to it appearing on the viewer's screen (glass) is called glass-to-glass latency. It isn't produced in one place. It is the sum of several stages.
Suppose the player keeps N segments queued while playing. The player buffer alone then puts you N × segment length behind. For example, with 6-second segments and N=3 that is 18 seconds, and with 2-second segments and N=3 it is 6 seconds. These numbers are assumptions for illustration, and how many segments a real player queues depends on the player and its settings. The point is that shortening the segments shrinks this term proportionally.
Every way of cutting latency gives something up. A smaller buffer makes stalls more likely when the network wobbles, and more frequent keyframes cost more bitrate for the same quality (GOP structure). Turning off B-frames lowers compression efficiency (Inter prediction). In practice the goal is not "the lowest latency" but as much latency as your use case allows.
These ranges are rough groupings commonly used in the industry. The exact thresholds differ by service.
The total time from the moment something is captured by the camera to the moment it appears on the viewer's screen.
The amount the player downloads ahead of playback to prevent stalls. It is the first thing you shrink for low latency, and also the riskiest.
The time a packet takes to go out and come back. It is the yardstick for sizing buffers in retransmission-based protocols.
What is the most direct reason segment-based streaming (HLS/DASH) has high latency by default?