# Opus

The most efficient audio codec available — royalty-free and low-latency.

## Overview

### What It Is

Opus is an open, royalty-free audio codec standardized by the IETF (RFC 6716), developed collaboratively by Xiph.Org, Mozilla, and Skype/Microsoft. Released in 2012, Opus uniquely handles both speech and music with a single codec by combining SILK (speech) and CELT (music) technologies. Opus achieves transparent audio quality at 128 kbps — lower than any competing codec — and operates across an exceptionally wide bitrate range (6–510 kbps) with configurable latency as low as 2.5ms. Opus is the mandatory audio codec for WebRTC and is supported by Chrome, Firefox, Edge, and Safari 14.1+.

### When to Choose Opus

Choose Opus when:

- You are building a WebRTC application — Opus is the mandatory audio codec for WebRTC and handles both voice and music optimally.
- You need the best quality at low bitrates — Opus at 96 kbps matches AAC at 128 kbps and MP3 at 192 kbps.
- You need configurable latency — Opus supports algorithmic delay as low as 2.5ms for real-time communication.

Consider alternatives when:

- You are encoding audio for HLS delivery — [AAC](https://cloud.qencode.com/audio-formats-codecs/aac) is required by Apple’s HLS spec. Opus is not standard in HLS.
- You need maximum legacy device support — [AAC](https://cloud.qencode.com/audio-formats-codecs/aac) or [MP3](https://cloud.qencode.com/audio-formats-codecs/mp3) have broader support on older devices.
- Your container requires Vorbis — Some legacy WebM deployments use [Vorbis](https://cloud.qencode.com/audio-formats-codecs/vorbis); migrate to Opus for new projects.

### Key Characteristics

|     |     |
| --- | --- |
| Standard | IETF RFC 6716, developed by Xiph.Org/Mozilla/Skype |
| Bitrate range | 6 kbps – 510 kbps |
| Sweet spot bitrate | 96–128 kbps (transparent quality for most content) |
| Channels | Up to 255 channels (typically stereo or 5.1) |
| Latency | 2.5ms – 60ms (configurable) |
| Sample rates | 8, 12, 16, 24, 48 kHz (internally resampled to 48 kHz) |
| Royalty status | Royalty-free, open-source |
| Container support | [WebM](https://cloud.qencode.com/video-formats-codecs/webm), [MP4](https://cloud.qencode.com/video-formats-codecs/mp4) |
| Browser support | Chrome 33+, Firefox 15+, Edge 14+, Safari 14.1+ |
| Typical use case | WebRTC, low-latency streaming, voice + music at low bitrates |

### Browser & Device Support

| Platform | Opus | AAC | MP3 | Vorbis |
| --- | --- | --- | --- | --- |
| Chrome (desktop) | 33+ |  |  |  |
| Firefox (desktop) | 15+ |  |  |  |
| Safari (macOS) | 14.1+ |  |  |  |
| Edge | 79+ |  |  |  |
| iOS Safari | 14.5+ |  |  |  |
| Android Chrome |  |  |  |  |

### How Qencode Handles Opus

Qencode encodes Opus audio using libopus for WebM and supported container outputs. Specify `libopus` as the audio codec with your desired bitrate.

Pair Opus audio with Audio Normalization for consistent loudness, or use with [WebM](https://cloud.qencode.com/video-formats-codecs/webm) output for a completely royalty-free video + audio stack.

```
{
  "query": {
    "source": "https://your-storage.com/video.mp4",
    "format": [
      {
        "output": "webm",
        "video_codec": "libvpx-vp9",
        "resolution": 2160,
        "quality": 20,
        "audio_codec": "libopus"
      }
    ]
  }
}
```

Copy this payload and use it with your API key to encode Opus audio from any source.

### Opus vs. AAC

|  | Opus | AAC |
| --- | --- | --- |
| Transparent quality | 128 kbps | 192 kbps |
| Royalty status | Royalty-free | Licensed |
| WebRTC support | Mandatory | Not standard |
| HLS support | Not standard | Required (default) |
| Latency | 2.5–60ms (configurable) | ~20ms |
| Best for | WebRTC, low-bitrate, low-latency | HLS streaming, Apple ecosystem |

For a detailed AAC breakdown, see [AAC](https://cloud.qencode.com/audio-formats-codecs/aac).

### Audio Normalization

Standardize loudness levels across audio outputs.
