Skip to content

CONCEPT Cited by 1 source

Codec complexity adaptation

Codec complexity adaptation is the runtime mechanism that adjusts a video encoder's computational complexity (preset level, or even the codec itself) based on observed device performance during a call. It addresses the gap between static device-eligibility classification and actual runtime capability — even devices classified as "AV1 capable" may throttle CPU during calls due to thermal management, concurrent workloads, or battery conservation.

Why static eligibility is insufficient

Meta observed that even a 2023 smartphone with an octa-core processor could fail to encode 320×180@15fps in real-time during calls — likely because the OS throttles CPU frequency during sustained workloads. This affects both H.264 and AV1, though AV1 more frequently (Source: sources/2026-06-22-meta-adopting-av1-for-real-time-communication-rtc-at-scale).

Three-layer adaptation mechanism

Meta deploys three complementary mechanisms, applied in escalation order:

  1. patterns/adaptive-encoder-preset — Multiple presets from low to high complexity. A monitor tracks encoding latency; if it approaches real-time limits, complexity decreases. If headroom exists, complexity increases for better quality.

  2. Local encoding-latency-aware codec switch — If the lowest AV1 preset still exceeds acceptable encoding latency, the device falls back to H.264/AVC. Both codecs are negotiated at call setup. Preset and codec selection are decided jointly to prevent oscillation.

  3. Peer decoding-latency-aware codec switch — Each device feeds back its decoding latency. If the sender detects the peer cannot decode AV1 in real-time, it switches to H.264/AVC. Critical for high-end→low-end call scenarios.

Additionally, device health signals like battery level trigger codec switching — low battery → H.264 to extend call duration.

Seen in

Last updated · 559 distilled / 1,651 read