---
title: "What Is the Opus Codec? Bitrates, SILK and CELT Modes - CE.SDK Glossary"
description: "Opus is an open, royalty-free audio codec for speech and music. Hear what it keeps at each bitrate, and see how CE.SDK writes it into WebM and MP4 files."
url: "https://img.ly/glossary/opus-codec/"
type: "page"
---

> This is the markdown version of [What Is the Opus Codec? Bitrates, SILK and CELT Modes - CE.SDK Glossary](https://img.ly/glossary/opus-codec/). For all pages in one file, see [llms-full.txt](https://img.ly/llms-full.txt). For an index of all available pages, see [llms.txt](https://img.ly/llms.txt).

---

# Opus Codec

Also known as: Opus Interactive Audio Codec, Opus audio format

## What Is the Opus Codec?

Opus is an open, royalty-free [audio codec](https://img.ly/glossary/audio-codec.md) that handles speech and music in one format, standardized by the IETF as RFC 6716 in 2012. It is [lossy](https://img.ly/glossary/lossy-vs-lossless.md) and covers bitrates from 6 to 510 kbps, and the encoder can change its bitrate, audio band and mode from one packet to the next.

Opus joins two older codecs: SILK, which Skype built for speech, and CELT, a low-delay codec from Xiph.Org that also suits music. Every WebRTC endpoint is required to support it, so any browser that makes WebRTC calls can send and receive Opus, and WebM files allow it next to Vorbis.

**6 kbps** lowest bitrate — so a call can keep going on a weak connection, in narrowband | **510 kbps** highest bitrate — above the 64 to 128 kbps the spec suggests for stereo music | **5 ms** shortest delay — in the lowest-delay setting, which leaves SILK out and codes with CELT | **20 kHz** top of the audio band — Opus spends no bits on sound above it

## What Does Opus Keep at Each Bitrate?

At low bitrates the encoder narrows the audio band, dropping the highest sounds, and it can code a stereo clip as mono to save bits. Move the bitrate below and the readout shows what it chose, read from the first byte of every packet it wrote.

### Encode a clip with Opus

Pick a bitrate, a tuning and a frame length, then switch between the Opus version and the original to hear the difference.

The player encodes a 6-second stereo loop, or the first 15 seconds of an audio file you pick, with the browser's own Opus encoder at 6 to 128 kbps, tuned for voice, music or the lowest delay, in frames of 2.5, 5, 10, 20, 40 or 60 ms. It plays the result next to the original and reads each packet's first byte to report the mode Opus chose (SILK, Hybrid or CELT), the audio band it kept, mono or stereo, and the bitrate the packets add up to.

## How Do the SILK, Hybrid and CELT Modes Differ?

Opus codes each packet in one of three modes and can switch between them from one packet to the next. The first byte of every packet names the mode, the audio band and the frame length, which is how the player above reads them.

### SILK codes speech at low bitrates

The layer based on Skype's speech codec models the voice with linear prediction. It keeps sound up to 4, 6 or 8 kHz in frames of 10 to 60 ms.

### Hybrid mode splits the band at 8 kHz

SILK codes the voice below 8 kHz and CELT the sound above it, up to 12 or 20 kHz. Opus uses it for super-wideband and fullband speech at medium bitrates, in frames of 10 or 20 ms.

### CELT codes music and the shortest frames

The layer from Xiph.Org codes the spectrum with a transform, from narrowband up to 20 kHz. It is the only mode for frames under 10 ms, down to 2.5 ms, because SILK only takes frames of 10 ms or longer.

## What Bitrate Should You Use for Opus?

The Opus specification gives a sweet spot for each kind of audio at 20 ms frames, listed below. A voice-note app, for example, can send wideband speech at 16 to 20 kbps, while a stereo music track sits between 64 and 128 kbps. When speech and music mix, as in a video with a soundtrack, tune the encoder for music: the voice setting filters the sound to bring out speech, so music can come out different from the source even at high bitrates.

- **Calls on a weak connection**: Bitrate: 8 to 12 kbps, Sound kept up to: 4 kHz (narrowband)

- **Voice chat and voice notes**: Bitrate: 16 to 20 kbps, Sound kept up to: 8 kHz (wideband)

- **Speech in podcasts and videos**: Bitrate: 28 to 40 kbps, Sound kept up to: 20 kHz (fullband)

- **Mono music**: Bitrate: 48 to 64 kbps, Sound kept up to: 20 kHz (fullband)

- **Stereo music**: Bitrate: 64 to 128 kbps, Sound kept up to: 20 kHz in both channels

## Which Files Can Hold Opus Audio?

Opus has a published mapping for each of the common ways audio travels: files, streams and real-time calls. Ogg Opus files and RTP calls both count time in 48 kHz samples, whatever rate the source was recorded at.

- **.opus files** — Ogg Opus, the extension RFC 7845 recommends

- **WebM and MKV** — Matroska stores it under the codec ID A\_OPUS

- **MP4** — Through a mapping the Opus project publishes

- **MPEG-TS** — MPEG transport streams can carry it too

- **RTP for calls** — RFC 7587 sets how WebRTC and other calls carry it

## How Opus Works in CE.SDK

Opus is the default audio of the WebM files your users export with [video editing in CE.SDK](https://img.ly/products/video-sdk.md), and MP4 exports fall back to it when the browser has no [AAC](https://img.ly/glossary/aac-vs-mp3.md) encoder. Your app can also pick the codec itself, and Opus sound opens again on import.

### WebM exports carry Opus by default

Choose [WebM](https://img.ly/glossary/webm-vs-mp4.md) as the file type and the audio is Opus unless your app sets a different one. On the web CE.SDK uses the browser's own encoders, and since none of them writes Vorbis, web exports in WebM always get Opus. On iOS, macOS, Android and `@cesdk/node-native`, the engine bundles its own encoders, and Vorbis is an option too.

### MP4 exports switch to Opus without an AAC encoder

MP4 audio is AAC by default, but where AAC can't be encoded, as in Firefox or Linux versions of Chrome, the automatic setting writes Opus instead, so the export still works. The finished file opens for editing again on the web, Opus sound included.

### Choose the audio codec and check the encoder

With `audioCodec`, your app sets the codec itself: AAC or Opus in an MP4, and Opus in a WebM, or Vorbis in a WebM outside the web. Once `checkCapabilities()` has run, `getCapabilityState('opusEncode')` tells your app whether Opus encoding is available. Asking for a codec the file type can't hold ends the export in an error that lists the codecs that fit.

### Opus sound opens in WebM, MP4 and MKV files

Your users can import WebM, MP4 and MKV videos with Opus sound, and WebM audio files, then edit them on the timeline alongside their other footage. In a web app the decoding is the browser's job, and `getCapabilityState('opusDecode')` reports whether it can once the check has run.

## FAQs

### Opus Codec

**Q: Is Opus better than AAC?**

A: Each suits a different job. Opus is royalty-free and has less delay: MDN lists a latency of 5 to 66.5 ms for Opus against 20 to 405 ms for AAC, and WebRTC requires Opus for calls. AAC is the usual audio of MP4 files, and as a patented format it leans on the platform in some browsers, so Firefox plays it through the support the operating system provides.

**Q: Is Opus lossless?**

A: No. Opus is lossy, so the decoded sound comes close to the source without ever matching it bit for bit, and the original sample rate is not kept either. For an exact copy, pick FLAC or uncompressed WAV, which keep every sample.

**Q: What is a .opus file?**

A: An Ogg file holding one Opus audio stream. RFC 7845 defines how Opus goes into the Ogg container and recommends the .opus extension for these files. A header at the start names the channel count and the original sample rate, and a second one carries tags such as the title and artist in the same format Ogg Vorbis files use.

**Q: Does Opus work with 44.1 kHz audio?**

A: Yes, after a resample. The reference encoder takes input at 8, 12, 16, 24 or 48 kHz, so 44.1 kHz audio is converted on the way in, and a player decodes at 48 kHz when the hardware supports it. An Ogg Opus file can store the original rate as metadata for a tool that wants to convert back.

**Q: What are Opus FEC and DTX?**

A: Two features for calls. With in-band forward error correction, the encoder codes the most important parts of the speech, such as the start of a sound, a second time at a lower bitrate inside the next packet, so a decoder can fill in a packet that was lost. With discontinuous transmission, it sends only one frame every 400 ms during silence or background noise.

## Links

- [Video Editor SDK](https://img.ly/products/video-sdk.md): Your users edit video and sound on a timeline and export WebM or MP4 files with Opus or AAC audio.
- [To WebM](https://img.ly/docs/cesdk/js/export-save-publish/export/to-webm-764271.md): Export a video as WebM with VP8, VP9 or AV1 picture and Opus sound, and check the encoders first.
- [To MP4](https://img.ly/docs/cesdk/js/export-save-publish/export/to-mp4-c998a8.md): Export a video as MP4 and pick its audio codec, AAC or Opus, or let the engine choose.

---

## More Resources

- **[IMG.LY Website](https://img.ly/index.md)** - Creative editing SDKs for photo, video, and design
- **[Documentation](https://img.ly/docs/cesdk/)** - CE.SDK developer documentation
- **[Build with a coding agent](https://img.ly/SKILL.md)** - A skill that adds a CE.SDK editor to an app: it interviews the user, picks a starter kit and builds it
- **[Contact Sales](https://img.ly/forms/contact-sales.md)** - Get a custom quote. A public JSON API accepts the request directly, no account or key needed. Ask your user for consent and their details first.
- **[Free Trial](https://img.ly/pricing.md)** - Start building with CE.SDK
