Keyframe Interval
Understand keyframe interval measurement in video streams — how CallMeter tracks the time between consecutive keyframes, thresholds, and what the interval means for video recovery and bandwidth.
Keyframe Interval measures the time between consecutive keyframes (I-frames) in a video stream, expressed in milliseconds. A shorter interval means the decoder gets fresh reference frames more frequently, enabling faster recovery from corruption. A longer interval saves bandwidth but leaves the decoder dependent on fragile delta frame chains for extended periods.
Think of it as the gap between safety nets under a tightrope. Short gaps (frequent keyframes) mean a fall is caught quickly. Long gaps mean a longer fall before recovery.
How It Works
The video encoder produces keyframes based on its configuration and external events:
- Periodic keyframes — Generated at a fixed interval (e.g., every 2 seconds)
- Requested keyframes — Produced in response to PLI/FIR requests from the remote side
- Scene-change keyframes — Triggered by the encoder detecting a major change in video content
CallMeter measures the elapsed time between each pair of consecutive keyframes on the send side. This gives you a real-time view of how frequently the decoder's reference chain is reset.
Why It Matters
The keyframe interval is a fundamental trade-off in video streaming:
- Short interval (under 2000ms) — Fast error recovery, but higher bandwidth usage due to frequent large keyframes
- Long interval (over 5000ms) — Efficient bandwidth usage, but slow recovery from packet loss or corruption
- Very long interval (over 10000ms) — If a packet loss event occurs at the start of the interval, the viewer may see corrupted or frozen video for 10+ seconds
Thresholds
| Level | Interval | Interpretation |
|---|---|---|
| Good | 2000ms or less | Fast recovery, suitable for interactive video calls |
| Warning | 5000ms | Acceptable for stable networks, slow recovery under loss |
| Critical | Above 10000ms | Excessively long, video will be severely impacted by any packet loss |
Recovery time impact
With a 10-second keyframe interval and no NACK retransmission, a single lost packet can cause up to 10 seconds of video corruption or freezing. For interactive calls, keep the interval at 2 seconds or less.
Common Causes of Abnormal Keyframe Intervals
| Cause | Explanation |
|---|---|
| Very short interval | Excessive keyframe requests from the remote side flooding the encoder with PLI/FIR messages |
| Very long interval | Encoder configured with a large periodic interval, or periodic keyframes disabled |
| Irregular intervals | Mix of periodic and requested keyframes creating inconsistent timing |
| No keyframes at all | Encoder not producing keyframes, or no video data flowing |
| Decreasing over time | Worsening network conditions causing more frequent keyframe requests |
How to Fix It
- Configure periodic keyframes — Set the encoder to produce a keyframe at least every 2 seconds for video calls. This ensures recovery even if keyframe requests are lost.
- Enable NACK retransmission — NACK-based recovery can fix isolated packet loss without waiting for the next keyframe, reducing the impact of longer intervals.
- Monitor request-driven keyframes — If the interval is shorter than configured, check Keyframe Requests Received to see if the remote side is driving extra keyframes due to persistent loss.
- Balance bandwidth vs recovery — For bandwidth-constrained links, a 4-second interval with NACK retransmission may be more efficient than a 2-second interval without NACK.
- Check encoder configuration — Verify the GOP (Group of Pictures) size or keyframe interval setting in the encoder matches your intended configuration.
Related Metrics
- Keyframes Sent — Total keyframe count; high count with short interval confirms frequent keyframe production
- Keyframe Requests Received — Inbound requests that shorten the effective interval
- Video Freeze Duration — Freeze length is bounded by the keyframe interval in the worst case
- Packet Loss Rate — Loss between keyframes causes decoder corruption until the next keyframe arrives
- Video Bitrate — Frequent keyframes increase average bitrate due to their larger size
RFC Reference
Keyframe (IDR) generation behavior in H.264 is governed by the codec specification (RFC 6184, RTP Payload Format for H.264). VP8 keyframe behavior is defined in RFC 7741 (RTP Payload Format for VP8). The RTCP feedback mechanisms (PLI, FIR) that trigger on-demand keyframes are specified in RFC 4585 and RFC 5104.
Resolution
Understand video resolution measurement in VoIP calls — how CallMeter tracks resolution in megapixels, what resolution changes reveal about quality adaptation, and common causes of resolution drops.
Video Freeze Events
Understand video freeze event counting — how CallMeter detects frozen video, thresholds, and what freeze events mean for the viewer experience.