Skip to content

feat: register Opus codec in media-sdk opus package - #84

Merged
biglittlebigben merged 3 commits into
livekit:mainfrom
dbloembe:register-opus-codec
Aug 28, 2026
Merged

feat: register Opus codec in media-sdk opus package#84
biglittlebigben merged 3 commits into
livekit:mainfrom
dbloembe:register-opus-codec

Conversation

@dbloembe

Copy link
Copy Markdown
Contributor

Summary

  • registers Opus by package side effect, following the existing g711/g722/dtmf pattern
  • keeps Opus opt-in via Disabled: true and exposes SDPName = "opus/48000/2"
  • adds configurable encoder bitrate, complexity, in-band FEC, and packet-loss tuning through EncodeWith
  • makes the CGO requirement explicit on both Opus source files

This carries forward all changes from #69 on top of the current main branch while preserving the original commits and authorship.

Review feedback addressed

  • omit RTPClockRate so RegisterCodec defaults it to SampleRate
  • add the //go:build cgo constraint to opus.go

Verification

  • gofmt / git diff --check
  • CI-equivalent native dependencies in a Go 1.26 Debian container
  • all relevant packages compile and pass; the only local full-suite failures were pre-existing AMR-WB golden hashes on ARM64, while upstream CI runs x86_64

Related

thetillhoff and others added 3 commits August 28, 2026 14:29
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>
@CLAassistant

CLAassistant commented Aug 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@biglittlebigben
biglittlebigben merged commit cb2363a into livekit:main Aug 28, 2026
3 of 9 checks passed
@biglittlebigben

Copy link
Copy Markdown
Contributor

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants