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¶
- Design multiple encoder presets spanning low → high complexity, each trading quality for compute cost.
- Continuously monitor encoding latency per frame during the call.
- If encoding latency approaches the real-time threshold → reduce preset (lower quality, less compute).
- If device sustains encoding with headroom → increase preset (higher quality).
- 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¶
Related¶
- concepts/codec-complexity-adaptation — the parent concept
- patterns/latency-aware-codec-switching — escalation when preset adjustment is insufficient
- patterns/ml-based-device-eligibility — static complement to runtime adaptation