feat: register Opus codec in media-sdk opus package#69
Conversation
Mirrors the g711/g722/dtmf pattern: an init() in the codec's own package calls RegisterCodec so importers get the codec registered by side-effect. Opus is registered Disabled:true (opt-in) since SIP infrastructure interoperability varies; callers enable it via msdk.CodecSetEnabled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds OpusEncodeOptions and OpusConfig so deployments can tune bitrate, complexity, and FEC without rebuilding. The go.mod replace directive pointing at a local media-sdk fork (which adds EncodeWith) is temporary and will be removed once livekit/media-sdk#69 merges. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds OpusEncodeOptions and OpusConfig so deployments can tune bitrate, complexity, and FEC without rebuilding. Encoder option application is stubbed pending livekit/media-sdk#69 (EncodeWith). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
👍 for this approach. I independently ran into #281, built the same media-sdk registration plus a companion sip change, and only then found this was already in flight — I've closed my duplicate (#72) and won't open a competing sip PR against #738. One data point in case it's useful: I built this registration into a custom
So the One optional enhancement for the SIP encode path, as a follow-up if you think it fits: a telephony-tuned encoder — inband FEC + a packet-loss estimate so lossy mobile paths (wifi↔LTE handoff, phone in pocket) degrade gracefully, plus higher bitrate/complexity for a richer narrator/music-bed sound. I kept it in a separate |
Summary
init()in the codec's own package callsRegisterCodecso importers get the codec registered by side-effect//go:build cgo) — requires libopusDisabled: true— opt-in; callers enable viamsdk.CodecSetEnabled("opus/48000/2", true)SDPName = "opus/48000/2"constant for callersRelated