Opus Bitrate negotiated in SDP headers?


If I am not setting any specific configurations for opus in codecs.conf, what will determine the bitrate being used on a channel?
Is that something that’s negotiated in the SDP headers?


Yes, such information is negotiated in the SDP.


Where in below SDP header would I find the bitrate that is being offered:

o=5682 3890 3062 IN IP4
c=IN IP4
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
m=audio 5199 RTP/AVPF 96 101
c=IN IP4 80.123.456.7
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:101 telephone-event/48000
a=candidate:1 1 UDP 2130706431 7078 typ host
a=candidate:1 2 UDP 2130706430 7079 typ host
a=candidate:2 1 UDP 1694498815 80.123.456.7 5199 typ srflx raddr rport 7078
a=candidate:2 2 UDP 1694498814 80.123.456.7 5200 typ srflx raddr rport 7079
a=rtcp-fb:* trr-int 5000
a=rtcp-fb:* ccm tmmbr

There are no attributes to for Opus in that SDP, so they would be the defaults as defined in the RFC[1].

[1] https://tools.ietf.org/html/rfc7587

1 Like

I would assume, if it was there, it would be in the fmtp line. Presumably maxaveragebitrate, see https://tools.ietf.org/html/draft-ietf-payload-rtp-opus-11

Note, like most parameters, this is the receive parameter. The sender can use anything up to that value.

1 Like