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
| Cause | Explanation |
|---|---|
| Encoder output level misconfigured | Source audio encoded at abnormally high or low level |
| Opus header gain mismatch | Header gain value set incorrectly in the Opus stream |
| Media file normalization | Test audio files with non-standard peak or RMS levels |
| AGC on encoder side | Automatic Gain Control producing variable output levels |
| Transcoder level adjustment | Intermediary device modifying audio level during transcoding |
How to Fix It
- Check source audio levels — Ensure that media files or microphone input are producing audio at standard VoIP levels (approximately -20 dBov RMS).
- 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.
- Disable unnecessary AGC — If the encoder's AGC is causing level fluctuations, consider disabling it and setting a fixed gain instead.
- Test end-to-end levels — Compare Audio Signal Level on send and receive sides. If they differ significantly, find where the level change occurs.
- Inspect intermediary processing — SBCs, mixers, or conference bridges in the media path may be modifying audio levels.
Related Metrics
- 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
Opus Bandwidth
Understand Opus codec bandwidth measurement — how CallMeter tracks the frequency bandwidth of Opus audio streams, thresholds, and what bandwidth changes reveal about audio richness.
Opus Packet Loss %
Understand Opus-level packet loss percentage — how CallMeter measures audio loss from the decoder's perspective, thresholds, and why codec-level loss differs from network-level loss.