Opus (audio format)
Opus (audio format)
Main page
819630

Opus (audio format)

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
Opus (audio format)

Opus is a free and open source lossy audio coding format developed by the Xiph.Org Foundation and standardized by the Internet Engineering Task Force, designed for efficient low-latency encoding of both speech and general audio. Due to its lower latency relative to other standard codecs, Opus finds specific use cases in real-time interactive communication for low-end embedded processors. Opus replaces both Vorbis and Speex for new applications.

Opus combines the speech-oriented LPC-based SILK algorithm and the lower-latency MDCT-based CELT algorithm, switching between or combining them as needed. Bitrate, audio bandwidth, complexity, and algorithm choice can be adjusted for each individual frame. Opus has low algorithmic delay (26.5 ms by default) ideal for use as part of a real-time communication link, networked music performances, and live lip sync; by trading off quality or bitrate, the delay can be further reduced down to 5 ms. Its delay thus is significantly lower compared to competing codecs, which require well over 100 ms. Opus remains competitive with these formats in terms of quality per bitrate.

As an open format standardized through RFC 6716, a reference implementation called libopus is available under the New BSD License. The reference has both fixed-point and floating-point optimizations for low- and high-end devices, with SIMD optimizations on platforms that support them. All known software patents that cover Opus are licensed under royalty-free terms. Opus is widely used as a voice over IP (VoIP) codec in applications such as Discord, WhatsApp, and the PlayStation 4. Listening tests have ranked it higher-quality than other standard audio formats at any given bitrate until transparency is reached, including MP3, AAC, and HE-AAC.

Opus supports constant and variable bitrate encoding from 6 kbit/s to 510 kbit/s (or up to 256 kbit/s per channel for multi-channel tracks), frame sizes from 2.5 ms to 60 ms, and five sampling rates from 8 kHz (with 4 kHz bandwidth) to 48 kHz (with 20 kHz bandwidth, the human hearing range). An Opus stream can support up to 255 audio channels, and it allows channel coupling between channels in groups of two using mid-side coding.

Opus has very short latency (26.5 ms using the libopus default of 20 ms frames and default application setting), which makes it suitable for real-time applications such as telephony, voice over IP and videoconferencing; research by Xiph led to the CELT codec currently adopted by Opus, which preserved quality while maintaining low delay. In any Opus stream, the bitrate, bandwidth, and delay can be continually varied without introducing any distortion or discontinuity; mixing packets from different streams will cause a smooth non-intrusive change, rather than the distortion common in other codecs. Unlike Vorbis, Opus does not require large codebooks for each individual file, making it relatively more efficient and resilient for short clips of audio.

The Opus format is based on a combination of the full-bandwidth CELT format and the speech-oriented SILK format, both heavily modified: CELT is based on the modified discrete cosine transform (MDCT) that most music codecs use, using CELP techniques in the frequency domain for better prediction, while SILK uses linear predictive coding (LPC) and an optional long-term prediction filter to model speech. In Opus, both were modified to support more frame sizes, as well as further algorithmic improvements and integration, such as using CELT's range encoder for both types. To minimize overhead at low bitrates, if latency is not as pressing, SILK has support for packing multiple 20 ms frames together, sharing context and headers; SILK also allows Low Bitrate Redundancy (LBRR) frames, allowing low-quality packet loss recovery. CELT includes both spectral replication and noise generation, similar to AAC's SBR and PNS, and can further save bits by filtering out all harmonics of tonal sounds entirely, then replicating them in the decoder. Better tone detection is an ongoing project to improve quality.

The format has three different modes: speech, hybrid, and CELT. When compressing speech, SILK is used for audio frequencies up to 8 kHz. If wider bandwidth is desired, a hybrid mode uses CELT to encode the frequency range above 8 kHz. The third mode is pure-CELT, designed for general audio. SILK is inherently VBR and cannot hit a bitrate target, while CELT can always be encoded to any specific number of bytes, enabling hybrid and CELT mode when CBR is required.

SILK supports frame sizes of 10, 20, 40 and 60 ms. CELT supports frame sizes of 2.5, 5, 10 and 20 ms. Thus, hybrid mode only supports frame sizes of 10 and 20 ms; frames shorter than 10 ms will always use CELT mode. A typical Opus packet contains a single frame, but packets of up to 120 ms are produced by combining multiple frames per packet. Opus can transparently switch between modes, frame sizes, bandwidths, and channel counts on a per-packet basis, although specific applications may choose to limit this.

See all
User Avatar
No comments yet.