What is OPUS_APPLICATION_RESTRICTED_LOWDELAY in Libopus?

This article explains the purpose, technical mechanics, and practical applications of the OPUS_APPLICATION_RESTRICTED_LOWDELAY configuration mode in the Libopus audio codec. You will learn how this mode minimizes latency by bypassing specific encoding steps, how it differs from other Opus modes, and when you should implement it in your audio applications.

Understanding the Opus Application Modes

The Opus codec (libopus) is a highly versatile audio format designed to handle both speech and general-purpose audio. To optimize performance for different scenarios, the encoder provides three primary application modes:

  1. OPUS_APPLICATION_VOIP: Optimized for voice clarity and low bitrates, favoring the SILK LPC-based compression engine.
  2. OPUS_APPLICATION_AUDIO: Optimized for high-fidelity music and general audio, favoring the CELT MDCT-based compression engine.
  3. OPUS_APPLICATION_RESTRICTED_LOWDELAY: Optimized strictly for the lowest possible algorithmic latency.

How RESTRICTED_LOWDELAY Achieves Low Latency

The OPUS_APPLICATION_RESTRICTED_LOWDELAY mode achieves ultra-low latency by restricting the encoder to use CELT mode only.

In standard configurations, Opus can dynamically switch between two internal engines: SILK (ideal for voice at low bitrates) and CELT (ideal for music and high bitrates), or even use a hybrid of both. However, this flexibility comes at a cost:

By enforcing these constraints, the codec can operate with an algorithmic delay of less than 5 milliseconds, making it significantly faster than the VOIP or Audio modes.

Trade-offs of Using This Mode

While OPUS_APPLICATION_RESTRICTED_LOWDELAY provides the fastest possible audio processing, it introduces specific trade-offs:

Ideal Use Cases

This mode is designed specifically for scenarios where interactive delay must be kept to an absolute minimum, even at the expense of compression efficiency for speech: