CallMeter Docs

Opus Decoder Gain

Understand Opus decoder gain measurement — how CallMeter tracks volume adjustments applied by the Opus decoder, and what non-zero gain values reveal about audio level issues.

Opus Decoder Gain reports the volume adjustment applied by the Opus decoder to the output audio, measured in dB. A value of 0 dB means the decoder is playing audio at its original level. Positive values mean the decoder is amplifying the output. Negative values mean it is attenuating (reducing) the output.

Think of it as the decoder's volume knob. Ideally, the knob stays at zero — the encoder sends audio at the right level and the decoder plays it back as-is. When the decoder needs to adjust, it suggests something upstream is sending audio at an unexpected level.

Opus only

Decoder gain is an Opus-specific feature. Other codecs do not expose a per-frame gain adjustment at the decoder level.

How It Works

The Opus codec specification includes a header gain field and the ability for the decoder to apply additional gain adjustments. This mechanism is used for output level normalization — ensuring that decoded audio arrives at a consistent volume regardless of how it was encoded.

CallMeter reads the decoder gain value after each decode operation and reports it per measurement interval. The gain is expressed in dB:

  • 0 dB — No adjustment, audio played at encoded level
  • Positive dB — Decoder amplifying quiet audio
  • Negative dB — Decoder attenuating loud audio

Why It Matters

Non-zero decoder gain is a diagnostic signal. It reveals that the audio level entering the decoder does not match the expected output level, which points to issues in the audio chain:

  • Consistent positive gain — The encoder or source is too quiet, and the decoder compensates by amplifying
  • Consistent negative gain — The encoder or source is too loud, and the decoder attenuates to prevent clipping
  • Fluctuating gain — Automatic Gain Control (AGC) or variable encoding levels causing the decoder to constantly readjust

For enterprise VoIP testing, monitoring decoder gain helps identify misconfigured endpoints or media processing elements that alter audio levels.

Common Causes of Non-Zero Decoder Gain

CauseExplanation
Encoder output level misconfiguredSource audio encoded at abnormally high or low level
Opus header gain mismatchHeader gain value set incorrectly in the Opus stream
Media file normalizationTest audio files with non-standard peak or RMS levels
AGC on encoder sideAutomatic Gain Control producing variable output levels
Transcoder level adjustmentIntermediary device modifying audio level during transcoding

How to Fix It

  1. Check source audio levels — Ensure that media files or microphone input are producing audio at standard VoIP levels (approximately -20 dBov RMS).
  2. Review Opus header gain — Verify that the Opus stream's header gain field is set correctly. An incorrect header gain forces the decoder to compensate.
  3. Disable unnecessary AGC — If the encoder's AGC is causing level fluctuations, consider disabling it and setting a fixed gain instead.
  4. Test end-to-end levels — Compare Audio Signal Level on send and receive sides. If they differ significantly, find where the level change occurs.
  5. Inspect intermediary processing — SBCs, mixers, or conference bridges in the media path may be modifying audio levels.
  • Audio Signal Level — Speech-only RMS level; affected by decoder gain adjustments
  • Audio Level RMS — Overall output level including the decoder's gain adjustment
  • Opus Bandwidth — Codec configuration context; low bandwidth may correlate with gain anomalies
  • Audio Noise Level — Noise floor is also affected when decoder gain is applied

On this page