ArticleslgStudy

computer science

Opus (audio format)

Opus (audio format) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Opus (audio format) rather than just read about it. In short: 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 (audio format) — main illustration
Opus (audio format) — illustration

Key takeaways

  • Opus (audio format) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Opus (audio format) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Opus (audio format) from memory before moving on to harder problems.

Reference excerpt

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 and pyramid vector quantization, 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. Opus is used by YouTube and TikTok if the client supports it. 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.

Features

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. The reference implementation is written in C and compiles on hardware architectures with or without a floating-point unit, although floating-point is currently required for audio bandwidth detection (dynamic switching between SILK, CELT, and hybrid encoding) and most speed optimizations.

Containers Opus packets are not self-delimiting, but are designed to be used inside a container of some sort which supplies the decoder with each packet's length. Opus was originally specified for encapsulation in Ogg containers, specified as audio/ogg; codecs=opus, and for Ogg Opus files the .opus filename extension is recommended. Opus streams are also supported in Matroska, WebM, MPEG-TS, and MP4. Alternatively, each Opus packet may be wrapped in a network packet which supplies the packet length. Opus packets may be sent over an ordered datagram protocol such as RTP. An optional self-delimited packet format is defined in an appendix to the specification. This uses one or two additional bytes per packet to encode the packet length, allowing packets to be concatenated without encapsulation.

Bandwidth and sampling rate

… excerpt ends here. Continue reading the full article.

Illustrations

Opus (audio format) illustration
Opus (audio format) illustration
Opus (audio format): Possible bitrate and latency combinations compared with other audio formats
Possible bitrate and latency combinations compared with other audio formats
Opus (audio format): Spectrogram of Opus-encoded (~1.0) audio as bitrate rises (~32 to ~160 kbit/s) clearly shows lowpass behavior and better preservation of the band energy with CELT (compare original, Vorbis, MP3, AAC).
Spectrogram of Opus-encoded (~1.0) audio as bitrate rises (~32 to ~160 kbit/s) clearly shows lowpass behavior and better preservation of the band energy with CELT (compare original, Vorbis, MP3, AAC).
Opus (audio format): Comparison of coding efficiency between Opus and other popular audio formats
Comparison of coding efficiency between Opus and other popular audio formats

Worked examples

Example 1 — a first encounter with Opus (audio format)

Start with the simplest possible case. Write down what Opus (audio format) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Opus (audio format) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Opus (audio format) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Opus (audio format)

In research
Opus (audio format) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Opus (audio format) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Opus (audio format) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free audio codecs, Lossy compression algorithms, Open formats, so understanding it makes those chapters shorter.
In everyday life
Look for Opus (audio format) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Opus (audio format)” →

How to study Opus (audio format) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Opus (audio format) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Opus (audio format) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Opus (audio format) in simple terms?

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…

Why does Opus (audio format) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Opus (audio format)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Opus (audio format).

Tags

  • Free audio codecs
  • Lossy compression algorithms
  • Open formats
  • Software using the BSD license
  • Speech codecs
  • Xiph.Org projects

Keep exploring