Skip to content

PATTERN Cited by 1 source

Adaptive encoder preset

Monitor encoding latency continuously during a call and adjust encoder complexity (preset level) up or down to match the device's real-time capability.

Structure

  1. Design multiple encoder presets spanning low → high complexity, each trading quality for compute cost.
  2. Continuously monitor encoding latency per frame during the call.
  3. If encoding latency approaches the real-time threshold → reduce preset (lower quality, less compute).
  4. If device sustains encoding with headroom → increase preset (higher quality).
  5. The adjustment is continuous, not one-shot — the device's capability may change during a call (thermal throttling, background app activity).

Why it works

A single "best" preset cannot serve all devices at all times because: - Devices throttle CPU frequency during sustained workloads. - Content complexity varies (static scene = easy; motion/detail = hard). - Concurrent workloads (OS, other apps) steal compute.

Adaptive preset selection provides the highest achievable quality under dynamic conditions without risking decode/encode failure.

Escalation

If the lowest preset still exceeds acceptable encoding latency, escalate to patterns/latency-aware-codec-switching (fall back to a less complex codec entirely).

Canonical instance

Meta's AV1 RTC deployment uses this as the first layer of codec complexity adaptation (Source: sources/2026-06-22-meta-adopting-av1-for-real-time-communication-rtc-at-scale). Their ultra-low-complexity AV1 preset achieves encoding complexity comparable to H.264/AVC, enabling AV1 on much broader device coverage.

Seen in

Last updated · 559 distilled / 1,651 read