Short dialogue about when to use G.711 in WebRTC. Speakers note that G.711 is mandatory for PSTN compatibility, allows avoiding server transcoding (saving CPU), but is less resilient to packet loss and uses higher bitrate than Opus. Opus provides better error resilience and lower bitrate but requires server transcoding when bridging to PSTN.
Chapters
When should we use G711 in WebRTC?
So the ITF and WCC decided G711 is mandatory to implement. But we have two mandatory to implement codecs for audio, G711 and Opus. And for Opus we don't have the same issue we have with video codecs. We have a codec that is open source and that we agree on. And that is GCF, that is opus G711. The main argument for using it is PSTN compatibility. Because PSTN is still G7.11.
Yeah. So I get to my server at G7.11 stream, I take it, and then I pass it through the media server from PSTN directly to the WebRTC realm of my implementation.
Yes, that's good. That's okay. You don't need to transcode on the server. But it means you don't get the better bitter utilization of opus. You don't get forward error correction opus. So overall I think it's not a good choice where you will be using it. You will have packet losses that will be much worse with G711.
So 1 to 1, if I use G711 end to end, in this case, I use less CPU on the server. The quality would be the same as with opus, assuming the network has no packet loss in it. But the moment there is an issue with a network for the agent, for example, then the quality would degrade versus doing it with opus. OPUS would take less bitrate, will be more resilient, but will require more CPU on the server because of transcoding.
Yes.
And I'd say that unlike video transcoding, in this specific case of G711 to Opus, we don't really lose quality doing that transcoding.