dev or master branches. Try it at your own discretion by using the two-way-audio branch, and please share any feedback in the Issues on the GitLab repo.
Talk to whoever is standing in front of your camera, straight from the Shinobi dashboard. Your microphone goes to the camera's speaker — useful for answering a doorbell or telling someone to get off the driveway.
localhost is also treated as secure).
Most methods reuse the camera username and password you already entered for the video stream, so there is usually nothing more to fill in.
Once it is enabled, a Talk option appears in that monitor's menu in the Live Grid. Click it to start talking and click it again to stop. Your browser will ask for microphone permission the first time.
You will not hear yourself through the dashboard — that is deliberate, so you do not get an echo.
The standard method, and the one to try first if your camera is not listed below. It sends audio back over the same RTSP connection the video uses, so it usually needs no extra settings at all.
Firmware varies wildly here, so a few advanced settings exist to work around stubborn cameras:
1024 (about 128ms), which is the most widely compatible. Set 160 for strict 20ms packets if your camera prefers them.
For Amcrest and Dahua cameras and doorbells. Shinobi posts audio to the camera's audio.cgi over HTTP.
80. Set Two-Way Audio HTTP Port if yours differs.
For Hikvision cameras, and Hikvision video doorbells too — they share the same interface.
80.
For DoorBird video doorbells.
80.
This one is different from the rest. Shinobi talks to your Protect NVR (UDM, UNVR or CloudKey Gen2) rather than to the camera directly, so it needs different details:
443, since Protect uses HTTPS.
Do not know the camera id? Leave it blank and try to talk. The error message lists every camera on the NVR along with its id, so you can copy the right one.
160.
80), which is often not the RTSP port.
Recording or transmitting audio is regulated in some places. Check what is allowed in your area before using this feature.
Audio takes this path from your microphone to the camera:
browser mic
-> WebAudio Int16 PCM
-> socket.io ('talkChunk' binary)
-> ffmpeg (transcode to the codec the camera wants)
-> provider adapter
-> camera speaker
talkStart / talkChunk / talkStop).
connect(...) returns startBackchannel() and close(), and startBackchannel() returns writeAudio(buffer) plus the audio format it expects.
details.two_way_audio.
The vendor HTTP providers stream over raw TCP sockets rather than Node's HTTP client, because these embedded camera endpoints expect an audio body of unknown length — declared with a deliberately large Content-Length and streamed until the socket closes.
Per provider, in short:
DESCRIBE carrying Require: www.onvif.org/ver20/backchannel, picks the audio section the camera marked sendonly, prefers PCMU then PCMA, then SETUP + PLAY and pushes RTP. Digest auth, TCP interleaved by default.
POST to /cgi-bin/audio.cgi as a single-part stream, Content-Type: Audio/G.711A.
TwoWayAudio: GET the channel list to discover the id and codec, then PUT open, stream to audioData, and PUT close.
POST to /bha-api/audio-transmit.cgi, Content-Type: audio/basic.
The ONVIF provider deliberately departs from a strict reading of the spec in a few places because real firmware needs it — large G.711 frames with the marker bit set, retrying a session without the Require header when a camera answers 551, reconnecting from scratch after a failed SETUP, and normalising the malformed Content-Base values cameras commonly return. Those behaviours are exposed as the settings above so a stubborn camera can be worked around without patching Shinobi.