Opus Audio Codec
All audio codecs work by compressing and decompressing information. While not as common as MP3, Opus is one of the most popular codecs for audio on the Internet. Opus is regularly used by billions of users. It has built-in support in Windows 10, macOS, iOS, Android, and is part of major Unix multimedia systems. Additionally, since Opus is a mandatory part of the WebRTC standard for real-time data exchange, this audio codec is supported by every modern web browser. Major communication systems such as WhatsApp, Facebook Messenger, and most global video conferencing applications use Opus – and that's just the beginning. Let's take a closer look at the Opus codec: where it came from, what makes it special, how it's typically used, and what we can expect from audio codecs in the future.
How Opus Came to Be
This audio codec was the result of several other codec projects worked on by the Internet Engineering Task Force (IETF), whose goal was to create a universal audio codec for the Internet. Almost ten years ago, the IETF recognized that the Internet needed a single, reliable audio codec that could be used for any method of transmitting sound over the Internet, from voice to live music distribution. Opus's predecessor projects were the CELT and Speex codecs from Xiph.org and SILK from Skype. In fact, Opus incorporates key parts of these codecs. Opus was introduced in 2010 and standardized as RFC 6716 in 2012. As an internet standard, it was supported by browsers, operating systems, and the most popular audio/video software. Opus's position as the de facto codec for real-time communication was later cemented when its use became mandatory as part of the WebRTC standard.
Why Opus?
When it comes to audio codecs, Opus is the undisputed leader, combining a modern set of features designed to work in various conditions and formats. The internet standard certainly contributed to its popularity, but the codec became number one primarily due to its performance, unique features, lack of licensing fees, and numerous open-source references.
Quality
Everyone knows that internet codecs must provide compression to minimize bandwidth. This ratio must be balanced with the quality of the output sound and the processing required to encode and decode this audio information. One of the main reasons for Opus's success is its excellent performance in a wide variety of conditions.
Opus Audio Codec – The Best Tool for Video Streaming and Video Conferencing
The Opus audio codec works perfectly for signal reproduction at speeds ranging from 6 kbit/s to 510 kbit/s. In any case, compression is performed with minimal losses, practically imperceptible to the human ear. This codec can dynamically switch to compression with different bitrates depending on changes in bandwidth. To date, no alternative has emerged that provides better performance, range of capabilities, or sound and video quality.
Key Features and Main Advantages:
- Support for any sampling rates – from 8 to 48 kHz
- Bitrate from 6 to 510 Kbit/s
- Support for mono and stereo
- Support for both constant (CBR) and variable (VBR) bitrates
- Latency of just 5 milliseconds
- Easily scalable audio stream with the ability to dynamically change settings
As a result of numerous studies and tests, the Opus audio codec was recognized as the most suitable for speech compression. It's known that during video streaming, good sound quality is just as important as video. In comparison with other popular speech codecs, Opus received the highest performance and the ability to instantly switch between different encryption mechanisms. This made it an ideal tool for data transmission during video streaming. All participants can communicate with each other in the most comfortable sound environment, even with low-speed internet connections.
Comprehensive Combination of Performance Characteristics
Many users wonder: where does the Opus codec get such excellent performance? The answer is simple – it's all about the specially designed set of features and capabilities:
Low Latency
The time interval between when a user speaks and the interlocutor on the other side hears them is called audio latency. The shorter it is, the better, and this is especially important when you need real-time interactivity. Of course, physics and the nature of the Internet introduce some inherent delays, but Opus doesn't add long delays during encoding and decoding. This codec provides virtually imperceptible latency, specifically 26.5 ms, using default settings (frame size 20 ms), making it ideally suited for Voice over IP (VoIP).
From Narrowband to Fullband
One of the unique features of Opus is that it works for both human voice sampling and music. When a person speaks, most of the time a relatively limited frequency range is used, making it easier to compress – this is called narrowband sound. It has a subtle but noticeable distortion when you hear it. Wideband sound, covering the entire range of human speech – is what most speech-oriented codecs strive for. On the other hand, music covers the entire spectral range of what our ears can hear. Encoding these additional features requires more bits and is usually called fullband. Codecs that provide high compression at low bitrates are optimized for a limited frequency range. Unlike them, Opus supports low-bandwidth voice communication and the full spectrum of what we hear, such as music, since it actually combines parts of two different codecs, namely SILK for narrowband and CELT for wideband. In the very latest versions of the codec, a neural network algorithm based on deep learning is actually used to determine which option to use at any given time. This is why the optimal option is always automatically selected, even when both speech and music are present.
Where is it Used?
Now let's look at how Opus is applied on the Internet:
-
Typical Topologies
Opus is typically used in real-time communication applications, live streams, and online video viewing. This is often accompanied by video streams, though not necessarily. When it comes to the audio component, remember that video usually follows audio in parallel, ensuring ideal quality for both sound and picture.
-
Calls
Having its own internet standards, Opus can work without WebRTC, but WebRTC cannot work without Opus. Therefore, the codec perfectly transmits the audio part of internet calls.
-
Video Streaming Opus, with the help of the WebRTC standard, has also proven to be a very useful tool for conducting live streams. Instead of using specialized equipment, installed software, or flash memory, streamers can send audio (and video) directly from the browser, using only a microphone (and/or webcam).
Flussonic and OPUS
Starting with version 21.12, Flussonic Media Server supports the OPUS codec. Documentation