feat(webrtc): add per-camera "Disable Opus Audio" option#2063
Open
laurent-builds wants to merge 1 commit into
Open
feat(webrtc): add per-camera "Disable Opus Audio" option#2063laurent-builds wants to merge 1 commit into
laurent-builds wants to merge 1 commit into
Conversation
Some cameras (notably certain Ring Pro doorbells) send 60ms SILK Opus over their direct WebRTC connection that decodes to crackle/interference on every decoder, from byte-perfect, in-order RTP. The audio is clean when the camera/media server transcodes it instead (triggered by a codec mismatch). Add a per-camera "Disable Opus Audio" toggle that offers only G.711 on the receiving connection, forcing that server-side transcode. Default off; other cameras are unaffected. Fixes crackly audio in both live view and recordings. Likely resolves koush#1617.
Owner
|
This may just be a gap in the opus repacketizer https://github.com/koush/scrypted/blob/main/plugins/homekit/src/types/camera/opus-repacketizer.ts |
Owner
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.
Problem
Some cameras — notably certain Ring Pro doorbells — deliver audio over their
direct WebRTC connection as 60ms SILK Opus that decodes to crackle on every
decoder tested (HomeKit/iOS, ffmpeg, browser), despite byte-perfect, in-order
RTP. Cameras that send 20ms CELT Opus are clean. The corruption is in the
camera's encoding on that path, upstream of Scrypted — which is why transcoding
downstream doesn't fix it.
Fix
The audio is clean when the camera/media server transcodes it server-side
instead of forwarding raw Opus (Ring does this on a codec mismatch). This adds a
per-camera "Disable Opus Audio" option that offers only G.711 on the receiving
WebRTC connection, forcing that server-side transcode.
Testing
multiple Ring cameras: the affected doorbell goes crackly → clean with the toggle on;
other Ring cameras are unaffected and keep full 48kHz Opus with it off.
Related to #1617 — this matches the symptoms there (Ring doorbell audio crackle
over HomeKit). Would appreciate the reporter confirming whether enabling this
option resolves it on their device.