[Help] Two-Way Audio with Dahua (DH-P5AE-PV) Camera via go2rtc & WebRTC – No Audio Output

areajennie

n3wb
Jul 2, 2025
3
0
viet nam
The Issue
I am trying to achieve two-way audio (talkback) with my Dahua camera using go2rtc and WebRTC. The video and audio from the camera stream to the browser just fine. However, when I try to send audio from the browser/client back to the camera, there is no sound output from the camera speaker. The stream appears to be received, but nothing is played.

Questions
  • Has anyone managed to get two-way audio working with Dahua cameras using go2rtc and WebRTC?
  • Are there any special settings, protocols, or stream configurations required for the camera to play back audio sent from the client?
  • Is there a specific audio codec or SDP tweak needed for talkback to work?
  • Any troubleshooting tips or working examples would be greatly appreciated!

Thanks in advance for any help or advice!

Device Information​

  • Device Type: DH-P5AE-PV
  • System Version: V2.820.100Z000.0.R (Build Date: 2024-04-22)
  • WEB Version: V3.2.1.1786524
  • ONVIF Version: 22.12 (V2.0.1.0)
  • Security Baseline Version: V2.4
Audio Setting:
audio_setting.png

Safety Setting:
safety_setting.png


Go2rtc setting:
streams:
dahua: - rtsp:/username:password@192.168.31.100:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif

go2rtc.png
  • go2rtc is used to bridge the RTSP stream to WebRTC.
  • WebRTC client connects and receives both video and audio tracks.

Stream​

Here is the JSON output from my /api/streams?src=dahua endpoint:
{
"producers": [
{
"id": 2,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "192.168.31.100:554",
"url": "rtsp:/username:password@192.168.31.100:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif",
"sdp": "v=0\r\no=- 2229913047 2229913047 IN IP4 0.0.0.0\r\ns=Media Server\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=control:*\r\na=range:npt=now-\r\na=x-summary:Oversea\r\nm=video 0 RTP/AVP 96\r\na=control:trackID=0\r\na=framerate:25.000000\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1;profile-level-id=4D0028;sprop-parameter-sets=Z00AKOkA8ARPywgAAB9IAAYcECAA,aOqMbIAA\r\na=recvonly\r\nm=audio 0 RTP/AVP 8\r\na=control:trackID=1\r\na=rtpmap:8 PCMA/8000\r\na=recvonly\r\nm=application 0 RTP/AVP 107\r\na=control:trackID=4\r\na=rtpmap:107 vnd.onvif.metadata/90000\r\na=recvonly\r\n",
"user_agent": "go2rtc/1.9.6",
"medias": [
"video, recvonly, H264",
"audio, recvonly, PCMA/8000",
"application, recvonly, VND.ONVIF.METADATA"
],
"receivers": [
{
"id": 3,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 40,
"profile": "Main"
},
"childs": [
4
],
"bytes": 622495,
"packets": 1177
},
{
"id": 5,
"codec": {
"codec_name": "pcm_alaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
6
],
"bytes": 264320,
"packets": 826
}
],
"bytes_recv": 910939
}
],
"consumers": [
{
"id": 1,
"format_name": "webrtc",
"protocol": "ws+udp+udp+udp+udp+udp+udp+udp+udp+udp+udp+udp+udp+udp+udp+udp+udp",
"remote_addr": "[fd7a:115c:a1e0::f01:c77b]:39838 host",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
"medias": [
"video, sendonly, VP8, VP9, H264, AV1",
"audio, recvonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000",
"audio, sendonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000, L16, PCML"
],
"receivers": [
{
"id": 7,
"codec": {
"channels": 2,
"codec_name": "opus",
"codec_type": "audio",
"sample_rate": 48000
},
"bytes": 128032,
"packets": 1651
}
],
"senders": [
{
"id": 4,
"codec": {
"codec_name": "h264",
"codec_type": "video"
},
"parent": 3,
"bytes": 622495,
"packets": 1177
},
{
"id": 6,
"codec": {
"codec_name": "pcm_alaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 5,
"bytes": 264320,
"packets": 826
}
],
"bytes_recv": 162312,
"bytes_send": 904922
}
]
}
 
Does talk back feature for this camera works under DMSS mobile app?

Maybe speaker volume is setup to low?
I haven’t tried using the DMSS mobile app yet, but I have interacted with the camera via ONVIF. Here is the result I got from the ONVIF interface:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema"><s:Body><trt:GetCompatibleAudioOutputConfigurationsResponse><trt:Configurations token="AudioOutput000"><tt:Name>AudioOutput000</tt:Name><tt:UseCount>2</tt:UseCount><tt:OutputToken>AudioOutput000</tt:OutputToken><tt:SendPrimacy>www.onvif.org/ver20/HalfDuplex/Auto</tt:SendPrimacy><tt:OutputLevel>100</tt:OutputLevel></trt:Configurations></trt:GetCompatibleAudioOutputConfigurationsResponse></s:Body></s:Envelope>

As you can see, the output level is set to 100.
 
I haven’t tried using the DMSS mobile app yet, but I have interacted with the camera via ONVIF. Here is the result I got from the ONVIF interface:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema"><s:Body><trt:GetCompatibleAudioOutputConfigurationsResponse><trt:Configurations token="AudioOutput000"><tt:Name>AudioOutput000</tt:Name><tt:UseCount>2</tt:UseCount><tt:OutputToken>AudioOutput000</tt:OutputToken><tt:SendPrimacy>www.onvif.org/ver20/HalfDuplex/Auto</tt:SendPrimacy><tt:OutputLevel>100</tt:OutputLevel></trt:Configurations></trt:GetCompatibleAudioOutputConfigurationsResponse></s:Body></s:Envelope>

As you can see, the output level is set to 100.

Check is this speaker and talkback feature simply works using Dahua mobile app (DMSS)?

This camera is NOT a proper Dahua camera.. But rebrand of cheap consumer based Imou Life cam with some very cut Dahua firmware...

We don't know how bad/good is Dahua / ONVIF API implemented here..

try to use PCMA/8000 - which is most basic codec supported by Dahua...
 
Check is this speaker and talkback feature simply works using Dahua mobile app (DMSS)?

This camera is NOT a proper Dahua camera.. But rebrand of cheap consumer based Imou Life cam with some very cut Dahua firmware...

We don't know how bad/good is Dahua / ONVIF API implemented here..

try to use PCMA/8000 - which is most basic codec supported by Dahua...
why are you sure this is not dahua cam ?

Is this what you mean?

1751462396489.png
 
why are you sure this is not dahua cam ?

Is this what you mean?

View attachment 223771

Dahua had in past separate brand / company called Imou Life.
Which produced / distributed very cheap consumer based cams, designed to work with Imou Life mobile app and Imou Life cloud services and sold directly to consumers (without installers) as Imou Life brand. Those cams never had Dahua firmware, but very different Imou Life one with very different feature sets...

Now Imou Life brand was sold / separated from Dahua and Dahua released many cheap cams, based on Imou Life designs with some strange Dahua firmwares..
Those cams are available directly to consumers.. they use different model ID system than Dahua profesional cams...

Some models had very cut features - like no web service (to change any config / do live view over web etc), no ONVIF etc.. worked only with DMSS... and features were very limited...
other newer models looks more like Dahua normal cams and have better firmware..

We don't use on this forum those cams.. they are not a PART of normal Dahua catalog for installers.
And it's very hard to answer any questions does those models works like normal Dahua cams in every posible aspect...

Especially in situation when Dahua flooded market with many many new models from those lines..