A short transcripted exchange (two speakers) explaining why WebRTC uses lossy codecs. They define lossless codecs as exact, zip-like compression and lossy codecs as ones that discard some data so decoded output differs from the original. MP3 is cited as an example. The speakers say lossy codecs are necessary because of network constraints — they reduce bitrate by discarding less-relevant information, otherwise raw or even simply-compressed audio/video would be prohibitively large.
Chapters
Why do we use lossy codecs in WebRTC?
So let's first define what we mean by lossicodex. Can you do that for me?
Yes. For me, lossless codecs, which is not a lossy codec, is something like that acts like a zip file. I put something in that file, I unzip it and I get the exact same copy of what I had. Lossy codec would lose some of the data along the way. I take the original audio or video, I compress it, then decompress it or encode and decode. And on the other side, I'm not going to get the same thing. I'm going to get something similar. And not because there was packet loss on the network, just because. That's how a lossy codec works.
Yes. I mean, the good old example for that is MP3, which dropped some information. It was a lossy codec in terms of, as you said, the output signal is not the same as the input signal.
Yep.
And that's lossy. But the reason we do that is because we're constrained by the network. So we need the compression gains that we get from dropping that information that isn't that relevant.
Okay. So what we do is we reduce the number of the information we have, making that a lossy codec. And we do that in order to gain on bitrate, to have lower bitrates than we could in any other way.
Yes, yes. I mean, if you talk about video, we're not sending raw images because they would be a thousand times in size.
Even if I compress them, they're going to be huge.