feat: add opt-in Opus codec support for SIP media negotiation#738
Open
thetillhoff wants to merge 11 commits into
Open
feat: add opt-in Opus codec support for SIP media negotiation#738thetillhoff wants to merge 11 commits into
thetillhoff wants to merge 11 commits into
Conversation
Register Opus (48kHz, mono) as an audio codec for SIP SDP offer/answer negotiation. Opus is enabled by default alongside G711 and G722, providing higher audio quality for peers that support it (e.g., WhatsApp Business Calling API). Changes: - Register Opus codec via media-sdk's NewAudioCodec (CGo-only) - Add Opus to the default codec set - Fix codecSet to resolve multi-part SDP names (opus/48000/2) - Fix test SDP name parsing for 3-part codec names Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bff3b8c to
b6ace8f
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #738 +/- ##
==========================================
+ Coverage 65.25% 66.09% +0.84%
==========================================
Files 51 42 -9
Lines 6588 7831 +1243
==========================================
+ Hits 4299 5176 +877
- Misses 1915 2183 +268
- Partials 374 472 +98 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b6ace8f to
2b02d64
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uppercase encoder labels Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2b02d64 to
bfb5ef8
Compare
Opus is lossy/perceptual; waveform fidelity assertions don't hold. Covered by media_codecs_opus_test.go instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Matches the AMR-WB pattern: codec is registered but opt-in. Previously Opus was absent from the map entirely. 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>
dd06d12 to
e6fe0c2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
enable_opus: false) — zero behavior change for existing deploymentsenable_opus: trueto offeropus/48000/2(48 kHz mono, priority 10 > G722 > G711)opus:block tunes bitrate, complexity, and FEC per deploymentpanicon codec init failure with error log + return nilThe
go.modcurrently has a local replace directive pointing at a fork of media-sdk that addsEncodeWith. This will be replaced with a proper version pin once livekit/media-sdk#69 merges.Related
EncodeWith; this PR depends on it