Different "modes" of OPUS codec

37 views
Skip to first unread message

Elise Monaghan

unread,
Nov 4, 2021, 6:32:24 AMNov 4
to discuss-webrtc
I'm trying to save bandwidth by modifying the opus codec params in my sdp. The RFC spec makes several mentions of different "modes" of opus, namely a voice mode and audio mode, but I can't find a place to actually 'set' these modes in the SDP. Does anyone have any insight here? 


Philipp Hancke

unread,
Nov 4, 2021, 6:37:53 AMNov 4
to discuss...@googlegroups.com
you can't since the opus rtp rfc doesn't define any parameters for that.

You can control the bitrate via setParameters or the maxaveragebitrate SDP parameter which will ultimatively affect the mode.
The default gets you mode 14 while higher bandwidths go into CELT-only modes.
Lower bandwidths should give you a silk-only mode but ultimately you're not saving much at the expense of quality.
Higher packetization times (30+40ms) may provide more gains at the expense of latency.

Am Do., 4. Nov. 2021 um 11:32 Uhr schrieb Elise Monaghan <monaghan...@gmail.com>:
I'm trying to save bandwidth by modifying the opus codec params in my sdp. The RFC spec makes several mentions of different "modes" of opus, namely a voice mode and audio mode, but I can't find a place to actually 'set' these modes in the SDP. Does anyone have any insight here? 


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/f82817c0-6a75-43dd-b4de-21abbf3d0eabn%40googlegroups.com.

Elise Monaghan

unread,
Nov 4, 2021, 6:56:20 AMNov 4
to discuss-webrtc
1) Gotcha, so the way to 'apply' the mode is to individually apply specific bitrate settings, is that correct? 
2) Where did you find the info for 'mode 14' ? And what are CELT modes? The RFC spec doesn't seem to have any info on this?

Thanks!

Philipp Hancke

unread,
Nov 4, 2021, 7:54:34 AMNov 4
to discuss...@googlegroups.com
the modes are defined in table 2 here:
You can only see them if looking at the decrypted RTP packets. The exact relationship between mode, bitrate and framesize is probably defined somewhere in libopus.

Reply all
Reply to author
Forward
0 new messages