GSMCalls

Codecs

OpusAlso known as Opus codec, RFC 6716

Definition

Opus is an open, royalty-free audio codec standardised by the IETF in RFC 6716 (2012). It scales from about 6 kbit/s narrowband speech to 510 kbit/s fullband stereo music, adapts its bitrate to network conditions in real time, and is mandatory to implement in WebRTC, making it the default codec for browser and app calling.

How Opus works

Opus combines two technologies: SILK, a linear-prediction speech coder originally from Skype, for low bitrates, and CELT, a low-delay transform coder, for higher bandwidths and music. A hybrid mode uses both. The encoder switches between them seamlessly.

  • Audio bandwidth: narrowband (4 kHz) up to fullband (20 kHz), sampled internally at up to 48 kHz.
  • Frame sizes: 2.5 to 60 ms, with 20 ms typical for VoIP.
  • Resilience: in-band forward error correction (FEC) and packet-loss concealment keep speech intelligible on lossy networks.
  • Variable bitrate and discontinuous transmission save bandwidth in silence.

In RTP, Opus uses a dynamic payload type and always signals “opus/48000/2” in SDP, as specified in RFC 7587.

Opus vs other codecs

Around 16–24 kbit/s Opus delivers wideband speech comparable to or better than G.722 at 64 kbit/s, and it degrades more gracefully than G.711 when packets are lost. The trade-off is interoperability: most carriers and the PSTN still expect G.711 or G.729, so Opus calls are usually transcoded at the SBC or PBX before leaving the network.

Opus in GSMCalls

Because Opus adapts its bitrate during a call, it suits mobile data and Wi-Fi links whose capacity changes from minute to minute, where fixed-rate codecs would either waste bandwidth or break up.

GSMCalls uses G.722 or Opus on the device side where supported and G.711/G.729 on the trunk side, so audio from browsers and apps can stay wideband until it reaches your carrier or PBX. See the platform and WebRTC.

Frequently asked questions

Is Opus better than G.711?

For quality per bit and resilience to packet loss, yes. G.711 wins on universal compatibility with carriers and legacy equipment.

Is Opus free to use?

Yes. Opus is open source and royalty-free, with patent licences granted by its contributors.

What bitrate should I use for Opus voice?

About 16–24 kbit/s gives good wideband speech; 32 kbit/s or more approaches fullband quality.

Further reading

All glossary terms