Skip to content

PATTERN Cited by 1 source

Latency-aware codec switching

Switch the active codec based on encoding or decoding latency feedback, falling back from a higher-complexity codec to a lower-complexity one when real-time performance cannot be sustained.

Structure

Two complementary paths:

Local encoding-latency path

  1. Negotiate support for multiple codecs (e.g., AV1 + H.264) at call setup.
  2. Monitor encoding latency after patterns/adaptive-encoder-preset has been applied.
  3. If lowest-complexity preset still exceeds acceptable encoding latency → switch to H.264/AVC.
  4. Encoder preset and codec selection are decided jointly to prevent oscillation (e.g., switching to H.264 then immediately back to AV1 then back again).

Peer decoding-latency path

  1. Each device continuously reports its video decoding latency to the sender via a feedback channel.
  2. If the sender detects the peer cannot decode AV1 in real-time → switch to H.264/AVC.
  3. Critical for high-end → low-end call scenarios where the sender can encode AV1 but the receiver cannot decode it fast enough.

Anti-oscillation

Codec selection considers hysteresis — the system does not flip back to the higher-complexity codec immediately when one frame's latency dips below threshold. Joint preset + codec decision space prevents ping-ponging.

Additional signals

Beyond latency, device health signals (battery level, thermal state) can trigger switching — e.g., low battery → switch to H.264 to extend call duration (Source: sources/2026-06-22-meta-adopting-av1-for-real-time-communication-rtc-at-scale).

Seen in

Last updated · 559 distilled / 1,651 read