CallMeter Docs

Opus Last Packet Duration

Understand Opus last packet duration measurement — how CallMeter tracks the duration of decoded Opus frames, and what deviations from 20ms reveal about encoder configuration.

Opus Last Packet Duration reports the duration of the most recently decoded Opus audio packet, measured in milliseconds. In standard VoIP configurations, this value is 20ms. Deviations from 20ms indicate unusual encoder settings or adaptive packetization behavior.

Think of it as checking the "size" of each audio chunk being delivered. VoIP audio is sent in regular-sized chunks, and this metric confirms they are the expected size. If the chunks are suddenly larger or smaller, something has changed in the encoder's configuration.

Opus only

This metric applies exclusively to Opus-encoded audio streams. The packet duration is determined by the encoder and decoded by the receiver.

How It Works

The Opus codec supports multiple frame durations: 2.5ms, 5ms, 10ms, 20ms, 40ms, and 60ms. For VoIP applications, 20ms is the standard choice — it balances latency, bandwidth overhead, and codec efficiency.

CallMeter reads the duration of each decoded frame from the Opus decoder and reports the most recent value. This serves as a real-time indicator of the encoder's packetization interval.

Common frame durations and their use cases:

DurationTypical UseTrade-off
10msUltra-low latency applicationsHigher packet rate, more overhead
20msStandard VoIP (most common)Optimal balance of latency and efficiency
40msBandwidth-constrained linksLower overhead, higher latency
60msMaximum efficiencySignificant latency, not suitable for interactive calls

Why It Matters

Packet duration is a diagnostic metric that confirms encoder behavior. In normal operation, it should remain constant at the configured value (typically 20ms). Changes in packet duration indicate:

  • Adaptive packetization — Some encoders change frame size dynamically based on network conditions or content type
  • Configuration errors — Encoder misconfigured with a non-standard frame duration
  • Transcoding effects — An intermediary device re-packetizing the audio at a different interval
  • Codec mode switches — Opus switching between SILK and CELT modes, which may use different frame sizes

Common Causes of Unexpected Packet Duration

CauseExplanation
Non-standard encoder configEncoder configured for 40ms or 60ms frames instead of the standard 20ms
SBC re-packetizationSession Border Controller combining or splitting audio frames
Adaptive encodingEncoder adjusting frame size based on network conditions
Conference bridge mixingBridge re-encoding mixed audio with different frame sizes
Codec mode transitionOpus SILK/CELT mode switches during low-bandwidth adaptation

How to Fix It

  1. Verify encoder configuration — Confirm that the Opus encoder is set to 20ms frame duration for VoIP use.
  2. Check for intermediaries — If packet duration changes between send and receive, an SBC or transcoder in the path may be re-packetizing.
  3. Disable adaptive packetization — If the encoder supports adaptive frame sizing, consider fixing it at 20ms for consistent behavior.
  4. Review SDP negotiation — Check whether the ptime attribute in SDP is requesting a non-standard packetization interval.
  5. Correlate with other changes — If packet duration changes coincide with Opus Bandwidth drops, the encoder may be adapting to poor network conditions.
  • Opus Bandwidth — Codec bandwidth mode; may change alongside frame duration during adaptation
  • Opus Packet Loss % — Loss patterns may differ with different frame durations
  • Avg Packet Spacing — Network-level timing between packets; should match the frame duration
  • Packets Sent Rate — Packet rate inversely correlates with frame duration

On this page