Minimum Bitrate for Libopus Narrowband Speech
This article explores the absolute minimum bitrate supported by the libopus library for narrow-band speech encoding. It details the exact technical limits of the Opus codec when configured for low-bandwidth voice communication, explains the underlying technology that enables this efficiency, and provides the configuration parameters required to achieve this minimum limit.
The Absolute Minimum Bitrate
The absolute minimum bitrate supported by the libopus
encoder for narrow-band speech encoding is 6 kbps (6,000 bits
per second).
While the Opus codec standard (RFC 6716) technically allows the
encoder to be configured down to 6 kbps for narrowband, the physical
layout of the bitstream can technically support bitrates as low as 5
kbps in highly specific configurations with large frame sizes. However,
6 kbps is the officially supported, stable minimum
limit enforced by the libopus API for standard narrowband
speech. At this bitrate, the audio remains highly intelligible for human
speech.
How Libopus Achieves Low Bitrates
Opus is a hybrid codec that combines two different technologies: SILK (developed by Skype for speech) and CELT (developed by the Xiph.Org Foundation for music and low latency).
To achieve the absolute minimum bitrate of 6 kbps, libopus utilizes the SILK engine. SILK is highly optimized for voice signals and uses Linear Predictive Coding (LPC) to model the human vocal tract. This allows it to compress voice data much more aggressively than transform-based codecs like CELT.
To encode at 6 kbps, the encoder must be restricted to the following parameters: * Audio Bandwidth: Narrowband (8 kHz sampling rate, passing audio frequencies up to 4 kHz). * Channels: Mono (1 channel). * Frame Size (Latency): 20 ms, 40 ms, or 60 ms. Longer frame sizes (such as 60 ms) are highly recommended at 6 kbps because they reduce the packet header overhead, leaving more of the allocation for the actual voice payload.
Required Encoder Settings
To force the libopus encoder to its absolute minimum
bitrate for speech, you must configure the encoder using the following
control (CTL) parameters in your code:
Set Application to VOIP: Configure the encoder for voice-optimized coding.
opus_encoder_ctl(encoder, OPUS_SET_APPLICATION(OPUS_APPLICATION_VOIP));Set Bandwidth to Narrowband: Force the codec to restrict the audio bandwidth to 8 kHz.
opus_encoder_ctl(encoder, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_NARROWBAND));Set Bitrate: Explicitly set the bitrate to 6000 bps.
opus_encoder_ctl(encoder, OPUS_SET_BITRATE(6000));Use a Large Frame Size: When calling the encode function, pass an audio frame size corresponding to 40 ms (320 samples at 8 kHz) or 60 ms (480 samples at 8 kHz) to ensure the encoder can successfully compress the stream down to the 6 kbps threshold.