feat(doorbird): add continuous audio for live view and HKSV recordings#2001
Open
mrsvan wants to merge 1 commit intokoush:mainfrom
Open
feat(doorbird): add continuous audio for live view and HKSV recordings#2001mrsvan wants to merge 1 commit intokoush:mainfrom
mrsvan wants to merge 1 commit intokoush:mainfrom
Conversation
The Doorbird does not include audio in its RTSP video stream. Audio is only available via the separate HTTP audio-receive.cgi endpoint. The plugin previously fed silence (anullsrc) into the audio track, only connecting to the real microphone during two-way intercom. Add a "Continuous Audio" setting (enabled by default) that keeps a persistent connection to the Doorbird microphone. This provides real audio for HomeKit live view and HKSV recordings without requiring the intercom to be active. The implementation reuses the existing startSilenceGenerator method, replacing the anullsrc input with audio-receive.cgi when continuous audio is enabled. FFmpeg reconnect flags and auto-restart on exit provide resilience against connection drops. The existing intercom flow is unchanged — the doorbellAudioActive guard ensures intercom audio takes priority when two-way talk is active. Fixes koush#934, fixes koush#996
Owner
|
What's the implications of having the intercom always on? Does this change the audio provide to use echo cancellation and stuff like other 2 way systems? |
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
audio-receive.cgi)Problem
The Doorbird D101S (and other models) does not include audio in its RTSP video stream. Audio and video use separate endpoints:
/mpeg/media.amp(H.264 only, no audio track)/bha-api/audio-receive.cgi(pcm_mulaw, 8kHz, mono)The plugin currently feeds silence (
anullsrc) into the audio track and only connects to the real microphone during two-way intercom. This means:This has been reported in #934 and #996.
Solution
Replace the silence generator with a continuous connection to
audio-receive.cgiso the Doorbird's microphone audio flows at all times. The change is instartSilenceGenerator()which conditionally uses either the real audio endpoint or the originalanullsrcbased on the new setting.Key design decisions:
-reconnectflags handle HTTP stream drops gracefullydoorbellAudioActiveguard ensures intercom audio takes priorityTest plan
Fixes #934, fixes #996