Opus

Opus is the primary audio codec used in WebRTC. It is mandatory to implement (alongside G.711) in all WebRTC implementations. Opus supports audio from narrowband telephony to stereo fullband music. It operates at bitrates from 6 kbps to 510 kbps with high packet loss resiliency. Opus is defined in IETF RFC 6716.

Key features

  • Versatile: Handles speech, music, and mixed content equally well
  • Adaptive: Seamlessly switches between SILK (speech) and CELT (music/general audio) modes
  • Low latency: Algorithmic delay as low as 5ms, suitable for real-time conversation
  • Resilient: Built-in FEC for better performance under packet loss
  • Royalty-free: No licensing costs (unlike some competing codecs)

Opus in WebRTC

WebRTC uses Opus with specific configurations:

  • Default 48kHz sampling rate (fullband)
  • Support for DTX (Discontinuous Transmission) to save bandwidth during silence in large group call scenarios
  • CBR or VBR modes

Opus has become the de facto standard audio codec for real-time communication and is also widely used outside WebRTC in gaming, streaming, and VoIP.

Opus 1.5 (March 2024) introduced DRED, a neural deep-redundancy extension that carries up to a full second of past audio inside each Opus packet for recovery from bursty packet loss. It is still not supported by WebRTC implementations.

Additional reading

Tsahi Levent-Levi

Tsahi Levent-Levi

Independent WebRTC analyst. 20+ years in telecom, 13 focused on WebRTC. Writes for developers and product teams who need to understand, not just implement, real-time communications.