WebRTC on Android: Enabling Hardware Encoding Across Devices
Article Summary
Ivan Dyatlov from Bumble Tech discovered that WebRTC's H.264 hardware encoding failed on most Android 5.x devices despite official support claims. His deep dive into codec implementations reveals why video calls drain batteries on millions of smartphones.
Bumble and Badoo needed reliable video calling across all Android devices, especially older models from 2014-2016 still widely used. The team expected H.264 hardware encoding to work seamlessly on Android 5.0+, but reality proved far messier. This article documents their journey through manufacturer-specific codec quirks and the fixes that enabled hardware encoding across diverse chipsets.
Key Takeaways
- WebRTC only enabled hardware encoding for Qualcomm and Exynos, blocking other chipsets
- Spreadtrum, MediaTek, HUAWEI, and MARVELL codecs needed custom bitrate and color format fixes
- Android CTS video tests grew from 160 lines in v4.3 to 740 in v10
- Switching from codec allowlist to blocklist unlocked hardware encoding on legacy devices
- Lenovo A1000 required variable bitrate mode due to Spreadtrum chipset limitations
Enabling H.264 hardware encoding across Android devices requires manufacturer-specific workarounds for color formats, bitrate modes, and resolution handling that standard WebRTC implementations miss.