~learn.
0:00 / 1:29
Side quest 23 · Zoom

Why video calls don't trust TCP

transcript

TCP never loses a packet. And that's exactly why your video call doesn't use it.

One packet is lost. TCP holds every later packet until it's resent. By the time it arrives, that moment of speech is gone. And everything queued behind it is late too. So use UDP. And repair loss yourself.

One: forward error correction. Send a little extra, and rebuild lost packets without asking. Two: ask for exactly the missing video packets. Only when the router is close. Three: a jitter buffer, to even out arrival times before audio plays.

Arjun is on 4G in a cab. Say 8 percent of packets vanish, in bursts. After repair, perhaps 0 point 3 percent is left. That's what people hear. His jitter buffer grows to about 80 milliseconds. On office Wi-Fi, about 20.

But here's the catch. Meenal's bank office blocks UDP completely. So her app races two doors at once. UDP, and TLS on port 443. TLS answers first, through the proxy. It looks like web traffic. The cost? A bigger jitter buffer, and lower video layers sooner.

In live media, a late packet is the same as a lost one. So don't wait for it. Repair around it.

Full breakdown in the lecture.