WebRTC: How To Say Opus Codec Uses Ultra-Wide Range / Full Band

I am working on a webRTC web application that has been working fine so far. I still do not understand how to say that the Opus codec (power) uses, for example, a "full band."

Setting up the codec for a 510 kHz transmission rate is simple:

desc.sdp=desc.sdp.replace(/a=mid:audio\r\n/g,'a=mid:audio\r\nb=AS:510\r\n');

But is there a way to tell Opus which band to use?

+4
source share
1 answer

Setting the range is not so bad. With opus, you simply specify the capabilities of the MAX rate and let it work from there. By default, OPUS switches to its maximum capabilities (48,000, as well as full-band).

, , rtp 48000 , .

rfc-7.

m=audio 54312 RTP/AVP 101
a=rtpmap:101 opus/48000/2
a=fmtp:101 maxplaybackrate=16000; sprop-maxcapturerate=16000

16 (aka Wideband).

m=audio 54312 RTP/AVP 101
a=rtpmap:101 opus/48000/2
a=fmtp:101 stereo=1; sprop-stereo=1

, , :

  • maxplaybackrate: , .
  • sprop-maxcapturerate: .

max:

  • NB: 8
  • : 12
  • WB: 16
  • SWB: 24
  • FB: 48 // webrtc

, , . , , , Opus , , , .

Script, webrtc , SDP, / opus. ( , , , ), Firefox , SDP, , .

+4

Source: https://habr.com/ru/post/1606543/


All Articles