3 ms·
One practical thing is to ensure your upstream isn't heavily congested. Many Internet connections are asymmetrical with much more downstream bandwidth than ups
by retrac 5y ago
One practical thing is to ensure your upstream isn't heavily congested. Many Internet connections are asymmetrical with much more downstream bandwidth than upstream. And many, if not most streaming protocols, are inherently bidirectional and are sending a constant stream of "Okay, got that!" acknowledgements both ways, which if congested, will tend to mess up video on both ends.
Otherwise, as another user mentioned, ultimately, there's no way around the "some of the packets disappeared in transit" problem. It's like white noise on an analogue radio channel. Some of the bits just get lost in transit. At that point, you can either request a resend (with unavoidable delay/skipping/glitching) or you can just drop the packets and re-sync when the stream starts making sense again (again with some degree of unavoidable blackout and glitching).
With that said, video could be more reliable. There are quality of service options. Streaming protocols could use forward error correction (though that has latency issues) and they could use UDP or checksumless UDP instead of TCP, which are less reliable but also generally less latency-variable. In combination with something like UDP streaming, they could use a compression algorithm that is robust to bit-flips and single packet loss (say, just dropping some spatial or colour resolution for a few frames instead of a quarter-second glitch). The hosts could talk to each other directly rather than through a relay server.
All of these techniques are used, somewhere. The biggest problem is that they're not widely compatible with what's already out there. ISPs tend to ignore QoS requests. Your smartphone does not have a hardware encoder for video except for MPEG-4, probably. It's quite possible your router will silently drop malformed UDP packets. Everyone is still behind NAT. And so on. And when you fall back to a common baseline codec and protocol, using TCP via a relay server, it's just kind of miserable when a packet disappears.