Ch. 15 · Low-Latency and Real-Time Streaming

한국어日本語
8 min

WebRTC: Real-Time Delivery Aiming for Under a Second

A completely different structure from HTTP piece-by-piece delivery: packets flow continuously over UDP, and the system reacts immediately to network conditions.

LL-HLS and LL-DASH cut latency within the framework of HTTP and CDNs. WebRTC has a different framework altogether. It was built so that browsers can exchange audio and video directly, and it is the very method used in video calls. Its target latency is known to be around one second or less, so it is used where interaction is the point.

The architecture in brief

ElementRole
RTP / SRTPThe protocol that carries media as small packets over UDP. SRTP is the encrypted version.
ICE · STUN · TURNThe procedure for two devices behind firewalls and NATs to find a path to each other. If a direct connection fails, it goes through a TURN relay server.
DTLSUsed to exchange encryption keys when the connection is set up.
SignalingThe procedure for exchanging connection information. It isn't defined by the WebRTC standard, so each service implements its own.
A "flow," not "pieces"

WebRTC has no segments or manifests. The encoder sends packets as frames come out, and the receiver plays back with only a very short jitter buffer. That makes latency extremely low, but when a packet is late or lost there is no buffer, so quality wobbles or frames break right away.

Reacting to the network in real time

  • Congestion control: it keeps adjusting the sending bitrate based on feedback from the receiver. Unlike HLS's ABR, which picks a quality "each time it receives a piece," this is far more fine-grained.
  • Loss handling: it recovers using messages such as retransmission requests (NACK) and keyframe requests (PLI). If loss breaks a reference frame, a new keyframe is needed, so the keyframe interval setting matters here too.
  • Multi-quality sending: techniques such as simulcast, where one sender uploads several versions at different resolutions and bitrates at once, and SVC, which puts layers inside a single stream, are used to match each viewer's quality. You need to check codec and server support.

For broadcasting: one-to-many (1:N)

WebRTC was originally for one-to-one calls, so broadcasts with many viewers put a media server (an SFU, for example) in the middle to fan the stream out. Because the server receives and resends, server resources are needed in proportion to the number of viewers, and it doesn't fit the cache model of a regular CDN. The standardized way for tools like OBS to send via WebRTC, WHIP, was published as RFC 9725 in 2025, and its playback counterpart, WHEP, is known to still be in standardization. Even so, check the latest documentation for the tools and services you use to see whether they are supported.

Codec choice is a compatibility question

The video codecs usable in WebRTC differ by browser and service. H.264, VP8, VP9, and AV1 all appear, but which ones work depends on the implementation, so you need to check which codec is actually negotiated on both devices. For hardware encoding/decoding support, you can start by checking the playback environment with the Codec Support Checker. Also, live encoding generally uses a configuration without B-frames (Lesson 2).

Where not to expect quality

WebRTC is designed with latency as the top priority, so at the same bitrate it is at a disadvantage or more prone to wobble in quality than approaches with a generous buffer, such as LL-HLS. First ask whether you really need the low latency. Moving a mostly-watching broadcast to WebRTC may only add cost and complexity.

WebRTCWebRTC

A technology for real-time audio, video, and data transfer between browsers. It is based on RTP over UDP.

ICE / STUN / TURNICE / STUN / TURN

The procedure and servers for devices behind NATs and firewalls to find a connection path. TURN is the relay used when a direct connection fails.

SFUSelective forwarding unit

A server architecture that receives streams from multiple participants and forwards them to the participants who need them, without re-encoding.

SimulcastSimulcast

A method where the sender uploads several versions at different qualities at once and the server picks the right one for each viewer.

Jitter bufferJitter buffer

A very short buffer the receiver keeps to absorb variation in packet arrival intervals.

NACK / PLINACK / PLI

RTCP feedback messages used to request packet retransmission (NACK) and to request a new keyframe (PLI).

Check yourself

What is the most fundamental reason WebRTC can have lower latency than HLS or DASH?