webrtc_codecs_opus (webrtc_codecs v0.1.0)
View SourceOpus codec plugin, on libopus.
webrtc:add_transceiver(Pc, audio, #{frames => true, codec_plugin => {webrtc_codecs_opus, #{}}}).decode/2 gives webrtc_codecs:audio/0. When frames were lost
before the one it is given, it first gives the audio that fills the
gap: recovered from the redundancy in the packet (in-band FEC) for the
last lost frame, synthesized for the others.
encode/2 takes webrtc_codecs:audio/0 at 8000, 12000, 16000, 24000
or 48000 Hz, one or two channels, 2.5, 5, 10, 20, 40 or 60 ms at a
time. It follows bitrate (bits per second) and packet_loss (percent
the peer reports, which sizes the redundancy) given in the raw map.
Options, each defaulting to what the negotiated fmtp says:
sample_rate: of decoded audio, default 48000channels: of decoded audio, default 2 withstereo=1, else 1bitrate: of the encoder at start, default chosen by libopusfec: in-band FEC, defaultuseinbandfecdtx: send nothing during silence, defaultusedtxpacket_loss: percent expected at start, default 0application:voip(default),audioorlowdelaycomplexity: 0 to 10, default chosen by libopus