Picking the wrong codec kills your CPU instantly #webrtc #streaming #performance

A short talk by Tsahi Levent-Levi explaining how codec choice in WebRTC affects device CPU usage and streaming quality. He contrasts generations of codecs (VP8, H264, HEVC, AV1), notes trade-offs between compression efficiency and CPU/memory demand, and recommends preferring VP8 generally or H264 when hardware acceleration is available (HEVC mainly on Apple; AV1 currently too CPU-intensive and lacks widespread hardware acceleration).
Chapters
Hi, my name is Sahil Lewandlevi. I'm the owner of Bloggic Me and WebRTC courses and I'm here to break down real time communications so you don't have to this time we're going to look at five different action items for WebRTC CPU optimization on the device. Today there are multiple video codecs in WebRTC that we can choose from and which one we choose is going to dictate the quality that we're going to have. Now in this diagram I've placed the codecs within their generations. We've started with VP8 and H264. These are, I wouldn't say old codecs, but they are old codecs and they are very popular and common today. The next generation after that was VP8 and HEVC. These codecs are better performant than H264 and VP8 because they are newer. They compress better, but they take more CPU to do that. Now hevc is in lighter color here because it doesn't exist across all browsers and platforms, just the Safari ones. And even there I'm not sure that I'd recommend using that. Then there is AV1. This is the current day technology, the best codec available today. It's rather new in the Market and in WebRTC. It has more CPU, compress CPU, it requires more CPU and memory, but it compresses a lot better than all of the other codecs. Now which one should we use? If we go with AV1 that's going to be great. It's going to compress better, the bitrate is going to be lower, the quality is going to be higher, but it takes more CPU and there is no hardware acceleration available for AV1 today, at least not across the devices that you have out there. My laptop won't have that today and it's rather new, it's like a year old. So AV1 likely not that a good idea. If we're going to do the 4k 60 frames per second or even 720p encoding. I'm not sure that I would try to do that on a device today. You can check and see if that works for you. Next we can take VP8. VP8 is great. It works really well. Doesn't take a lot of CPU comparing to the other codecs, but it won't have a lot of hardware acceleration available. I would still prefer using that over H264 in most scenarios. H264 has a lot of hydro acceleration available or it's there it's great or it's not, there might be an issue. So if you want to go for H264, that's because you want to use that hardware acceleration. You know the devices that are being used you and you know that they have that available for them in WebRTC. HEVC got hardware acceleration on the devices that it exists on Apple devices. Go and follow me at Blogic me. Thank you.
More from Tsahi

Meta rebuilt AV1 for mobile scale. Should smaller teams follow? | Chats with Arin









