Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reolink Video Doorbell discussion #331

Open
luisiam opened this issue Apr 4, 2023 · 380 comments
Open

Reolink Video Doorbell discussion #331

luisiam opened this issue Apr 4, 2023 · 380 comments
Labels
camera Discussion on a particular camera model

Comments

@luisiam
Copy link

luisiam commented Apr 4, 2023

The latest FW 1859 enables 2-way audio via ONVIF profile T. I checked with Happytimesoft ONVIF client and 2-way audio works. Is there any chance to get it working in go2rtc?

Output from info page

{
  "producers": [
    {
      "type": "RTSP active producer",
      "url": "rtsp://192.168.10.21//",
      "remote_addr": "192.168.10.21:554",
      "user_agent": "go2rtc/1.3.1",
      "medias": [
        "video, recvonly, H.264 High 5.1",
        "audio, recvonly, MPEG4-GENERIC/16000"
      ],
      "receivers": [
        "96 H264, bytes=129455539, senders=1",
        "97 MPEG4-GENERIC/16000, bytes=1984536, senders=1"
      ],
      "recv": 132603331
    },
    {
      "type": "RTSP passive producer",
      "url": "rtsp://localhost:8554/fb75e35d718d1e0379580b00d5fcc0e7",
      "remote_addr": "127.0.0.1:43364",
      "user_agent": "ffmpeg/go2rtc",
      "medias": [
        "audio, recvonly, OPUS/48000/2"
      ],
      "receivers": [
        "96 OPUS/48000/2, bytes=2800207, senders=1"
      ],
      "recv": 2949215
    }
  ],
  "consumers": [
    {
      "type": "RTSP passive consumer",
      "url": "rtsp://localhost:8554/doorbell_test?audio",
      "remote_addr": "127.0.0.1:43354",
      "user_agent": "go2rtc/ffmpeg",
      "medias": [
        "audio, sendonly, ANY"
      ],
      "senders": [
        "96 MPEG4-GENERIC/16000, bytes=1984536, receivers=1"
      ],
      "send": 2046072
    },
    {
      "type": "WebRTC/WebSocket async passive consumer",
      "remote_addr": "tcp4 prflx 192.168.10.183:65337 related :0",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62",
      "medias": [
        "video, sendonly, VP8, RTX, VP9, H264, AV1, RED, ULPFEC, FLEXFEC-03",
        "audio, recvonly, OPUS/48000/2, RED/48000/2, G722/8000, PCMU/8000, PCMA/8000, CN/8000, TELEPHONE-EVENT/48000, TELEPHONE-EVENT/8000",
        "audio, sendonly, OPUS/48000/2, RED/48000/2, G722/8000, PCMU/8000, PCMA/8000, CN/8000, TELEPHONE-EVENT/48000, TELEPHONE-EVENT/8000"
      ],
      "receivers": [
        "111 OPUS/48000/2, bytes=812126, senders=0"
      ],
      "senders": [
        "96 H264, bytes=124447151, receivers=1",
        "96 OPUS/48000/2, bytes=2679873, receivers=1"
      ],
      "recv": 1054116,
      "send": 128596160
    }
  ]
}
@NickM-27
Copy link
Contributor

NickM-27 commented Apr 4, 2023

You need to enable trace logs for rtsp and send that here, looks like they changed the rtsp format from what I saw back in February

new one is here:

2023-04-04 07:17:04.634469822  07:17:04.634 TRC [rtsp] client response:
2023-04-04 07:17:04.634475702  RTSP/1.0 200 OK
2023-04-04 07:17:04.634477612  Cseq: 2
2023-04-04 07:17:04.634479202  Content-Type: application/sdp
2023-04-04 07:17:04.634480422  Content-Length: 758
2023-04-04 07:17:04.634482002  Content-Base: rtsp://192.168.50.151/Preview_01_main/
2023-04-04 07:17:04.634483572  Date: Tue, Apr 04 2023 13:17:04 GMT
2023-04-04 07:17:04.634484802  
2023-04-04 07:17:04.634485962  v=0
2023-04-04 07:17:04.634487332  o=- 1680614126554766 1 IN IP4 192.168.0.3
2023-04-04 07:17:04.634488652  s=Session streamed by "preview"
2023-04-04 07:17:04.634489802  t=0 0
2023-04-04 07:17:04.634491192  a=tool:BC Streaming Media v202210012022.10.01
2023-04-04 07:17:04.634493802  a=type:broadcast
2023-04-04 07:17:04.634495082  a=control:*
2023-04-04 07:17:04.634496262  a=range:npt=now-
2023-04-04 07:17:04.634549673  a=x-qt-text-nam:Session streamed by "preview"
2023-04-04 07:17:04.634551473  m=video 0 RTP/AVP 96
2023-04-04 07:17:04.634553103  c=IN IP4 0.0.0.0
2023-04-04 07:17:04.634554283  b=AS:8192
2023-04-04 07:17:04.634555563  a=rtpmap:96 H264/90000
2023-04-04 07:17:04.634557983  a=range:npt=now-
2023-04-04 07:17:04.634559843  a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==
2023-04-04 07:17:04.634591183  a=recvonly
2023-04-04 07:17:04.634592854  a=control:track1
2023-04-04 07:17:04.634594304  m=audio 0 RTP/AVP 97
2023-04-04 07:17:04.634595474  c=IN IP4 0.0.0.0
2023-04-04 07:17:04.634596774  b=AS:8192
2023-04-04 07:17:04.634598124  a=rtpmap:97 MPEG4-GENERIC/16000
2023-04-04 07:17:04.634599884  a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;
2023-04-04 07:17:04.634626834  a=recvonly
2023-04-04 07:17:04.634628414  a=control:track2
2023-04-04 07:17:04.634629784  m=audio 0 RTP/AVP 8
2023-04-04 07:17:04.634631014  a=control:track3
2023-04-04 07:17:04.634632324  a=rtpmap:8 PCMA/8000
2023-04-04 07:17:04.634633754  a=sendonly
2023-04-04 07:17:04.638836907  07:17:04.638 TRC [rtsp] client request:
2023-04-04 07:17:04.638839357  DESCRIBE rtsp://192.168.50.151:554/Preview_01_main RTSP/1.0
2023-04-04 07:17:04.638840717  Accept: application/sdp
2023-04-04 07:17:04.638842067  User-Agent: go2rtc/1.3.1
2023-04-04 07:17:04.638843257  CSeq: 3

@savage7
Copy link

savage7 commented Apr 6, 2023

@NickM-27 Is this the log you mean? I traced with Home assitant when opening the links.html in the go2rtc web ui.

2023-04-06 12:42:14.231 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m12:42:14.226�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 12:42:14.231 DEBUG (webrtc) [custom_components.webrtc.utils] DESCRIBE rtsp://192.168.1.128:554/h264Preview_01_main RTSP/1.0
2023-04-06 12:42:14.231 DEBUG (webrtc) [custom_components.webrtc.utils] Accept: application/sdp
2023-04-06 12:42:14.231 DEBUG (webrtc) [custom_components.webrtc.utils] User-Agent: go2rtc/1.2.0
2023-04-06 12:42:14.232 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 4
2023-04-06 12:42:14.232 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="bb3a00ecb74d14032862f0c4658acec3", uri="rtsp://192.168.1.128:554/h264Preview_01_main", response="2a9d069d5a28641ffa4513e0a7cdf1e1"
2023-04-06 12:42:14.232 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.232 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.269 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m12:42:14.269�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 12:42:14.270 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 12:42:14.270 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Base: rtsp://192.168.1.128/Preview_01_main/
2023-04-06 12:42:14.270 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Type: application/sdp
2023-04-06 12:42:14.270 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 4
2023-04-06 12:42:14.271 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Length: 689
2023-04-06 12:42:14.271 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 10:42:14 GMT
2023-04-06 12:42:14.271 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.271 DEBUG (webrtc) [custom_components.webrtc.utils] v=0
2023-04-06 12:42:14.272 DEBUG (webrtc) [custom_components.webrtc.utils] o=- 1680777518721511 1 IN IP4 192.168.1.128
2023-04-06 12:42:14.272 DEBUG (webrtc) [custom_components.webrtc.utils] s=Session streamed by "preview"
2023-04-06 12:42:14.272 DEBUG (webrtc) [custom_components.webrtc.utils] t=0 0
2023-04-06 12:42:14.272 DEBUG (webrtc) [custom_components.webrtc.utils] a=tool:BC Streaming Media v202210012022.10.01
2023-04-06 12:42:14.273 DEBUG (webrtc) [custom_components.webrtc.utils] a=type:broadcast
2023-04-06 12:42:14.273 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:*
2023-04-06 12:42:14.273 DEBUG (webrtc) [custom_components.webrtc.utils] a=range:npt=now-
2023-04-06 12:42:14.273 DEBUG (webrtc) [custom_components.webrtc.utils] a=x-qt-text-nam:Session streamed by "preview"
2023-04-06 12:42:14.273 DEBUG (webrtc) [custom_components.webrtc.utils] m=video 0 RTP/AVP 96
2023-04-06 12:42:14.273 DEBUG (webrtc) [custom_components.webrtc.utils] c=IN IP4 0.0.0.0
2023-04-06 12:42:14.274 DEBUG (webrtc) [custom_components.webrtc.utils] b=AS:8192
2023-04-06 12:42:14.274 DEBUG (webrtc) [custom_components.webrtc.utils] a=rtpmap:96 H264/90000
2023-04-06 12:42:14.274 DEBUG (webrtc) [custom_components.webrtc.utils] a=range:npt=now-
2023-04-06 12:42:14.274 DEBUG (webrtc) [custom_components.webrtc.utils] a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==
2023-04-06 12:42:14.274 DEBUG (webrtc) [custom_components.webrtc.utils] a=recvonly
2023-04-06 12:42:14.274 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:track1
2023-04-06 12:42:14.274 DEBUG (webrtc) [custom_components.webrtc.utils] m=audio 0 RTP/AVP 97
2023-04-06 12:42:14.275 DEBUG (webrtc) [custom_components.webrtc.utils] c=IN IP4 0.0.0.0
2023-04-06 12:42:14.275 DEBUG (webrtc) [custom_components.webrtc.utils] b=AS:8192
2023-04-06 12:42:14.275 DEBUG (webrtc) [custom_components.webrtc.utils] a=rtpmap:97 MPEG4-GENERIC/16000
2023-04-06 12:42:14.275 DEBUG (webrtc) [custom_components.webrtc.utils] a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;
2023-04-06 12:42:14.275 DEBUG (webrtc) [custom_components.webrtc.utils] a=recvonly
2023-04-06 12:42:14.275 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:track2
2023-04-06 12:42:14.276 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.276 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m12:42:14.269�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 12:42:14.276 DEBUG (webrtc) [custom_components.webrtc.utils] SETUP rtsp://192.168.1.128/Preview_01_main/track1 RTSP/1.0
2023-04-06 12:42:14.276 DEBUG (webrtc) [custom_components.webrtc.utils] Transport: RTP/AVP/TCP;unicast;interleaved=0-1
2023-04-06 12:42:14.276 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 5
2023-04-06 12:42:14.276 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="bb3a00ecb74d14032862f0c4658acec3", uri="rtsp://192.168.1.128/Preview_01_main/track1", response="098055c0972907cef37370c48286c95e"
2023-04-06 12:42:14.276 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.277 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.310 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m12:42:14.309�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 12:42:14.310 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 12:42:14.310 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 5
2023-04-06 12:42:14.310 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 10:42:14 GMT
2023-04-06 12:42:14.310 DEBUG (webrtc) [custom_components.webrtc.utils] Transport: RTP/AVP/TCP;unicast;destination=192.168.1.131;source=192.168.1.128;interleaved=0-1
2023-04-06 12:42:14.310 DEBUG (webrtc) [custom_components.webrtc.utils] Session: A7361AC6;timeout=65
2023-04-06 12:42:14.311 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.311 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.311 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m12:42:14.309�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 12:42:14.311 DEBUG (webrtc) [custom_components.webrtc.utils] SETUP rtsp://192.168.1.128/Preview_01_main/track2 RTSP/1.0
2023-04-06 12:42:14.311 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 6
2023-04-06 12:42:14.311 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="bb3a00ecb74d14032862f0c4658acec3", uri="rtsp://192.168.1.128/Preview_01_main/track2", response="1dfacc9d98cd09c1029cfefe2e05dbaf"
2023-04-06 12:42:14.312 DEBUG (webrtc) [custom_components.webrtc.utils] Session: A7361AC6
2023-04-06 12:42:14.312 DEBUG (webrtc) [custom_components.webrtc.utils] Transport: RTP/AVP/TCP;unicast;interleaved=2-3
2023-04-06 12:42:14.312 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.312 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.318 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m12:42:14.316�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 12:42:14.318 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 12:42:14.318 DEBUG (webrtc) [custom_components.webrtc.utils] Session: A7361AC6;timeout=65
2023-04-06 12:42:14.318 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 6
2023-04-06 12:42:14.318 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 10:42:14 GMT
2023-04-06 12:42:14.319 DEBUG (webrtc) [custom_components.webrtc.utils] Transport: RTP/AVP/TCP;unicast;destination=192.168.1.131;source=192.168.1.128;interleaved=2-3
2023-04-06 12:42:14.319 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.319 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.319 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m12:42:14.317�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 12:42:14.319 DEBUG (webrtc) [custom_components.webrtc.utils] PLAY rtsp://192.168.1.128/Preview_01_main/ RTSP/1.0
2023-04-06 12:42:14.319 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 7
2023-04-06 12:42:14.319 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="bb3a00ecb74d14032862f0c4658acec3", uri="rtsp://192.168.1.128/Preview_01_main/", response="7a4525bc6ebf9cdb3608d6952052b38a"
2023-04-06 12:42:14.319 DEBUG (webrtc) [custom_components.webrtc.utils] Session: A7361AC6
2023-04-06 12:42:14.320 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.320 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 12:42:14.371 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m12:42:14.371�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 12:42:14.372 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 12:42:14.372 DEBUG (webrtc) [custom_components.webrtc.utils] Rtp-Info: url=rtsp://192.168.1.128/Preview_01_main/track1;seq=57080;rtptime=2825565026,url=rtsp://192.168.1.128/Preview_01_main/track2;seq=35231;rtptime=7176368,url=rtsp://192.168.1.128/Preview_01_main/track3;seq=0;rtptime=0
2023-04-06 12:42:14.372 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 7
2023-04-06 12:42:14.372 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 10:42:14 GMT
2023-04-06 12:42:14.372 DEBUG (webrtc) [custom_components.webrtc.utils] Range: npt=0.000-
2023-04-06 12:42:14.372 DEBUG (webrtc) [custom_components.webrtc.utils] Session: A7361AC6

@NickM-27
Copy link
Contributor

NickM-27 commented Apr 6, 2023

No, the log I mean is the log I posted above.

@savage7
Copy link

savage7 commented Apr 6, 2023

Where can I find the log?

@NickM-27
Copy link
Contributor

NickM-27 commented Apr 6, 2023

My bad looks like those logs are them, but they don't show the third audio track like mine do. Maybe you didn't copy all of them?

@savage7
Copy link

savage7 commented Apr 6, 2023

ah ok now I get it, this log seams to be complete, it contains a third audio track:

2023-04-06 15:10:19.291 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:19.291�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:10:19.292 DEBUG (webrtc) [custom_components.webrtc.utils] TEARDOWN rtsp://192.168.1.128/Preview_01_main/ RTSP/1.0
2023-04-06 15:10:19.292 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 7
2023-04-06 15:10:19.292 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="9a2ca58906f04a0ca5cca246245e789a", uri="rtsp://192.168.1.128/Preview_01_main/", response="7f2597d27c0faa6c83c7ac7ea2dcbacf"
2023-04-06 15:10:19.292 DEBUG (webrtc) [custom_components.webrtc.utils] Session: C6411A82
2023-04-06 15:10:19.292 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:19.292 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.418 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.418�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:10:22.418 DEBUG (webrtc) [custom_components.webrtc.utils] DESCRIBE rtsp://192.168.1.128:554/h264Preview_01_main RTSP/1.0
2023-04-06 15:10:22.419 DEBUG (webrtc) [custom_components.webrtc.utils] Accept: application/sdp
2023-04-06 15:10:22.419 DEBUG (webrtc) [custom_components.webrtc.utils] Require: www.onvif.org/ver20/backchannel
2023-04-06 15:10:22.419 DEBUG (webrtc) [custom_components.webrtc.utils] User-Agent: go2rtc/1.2.0
2023-04-06 15:10:22.419 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 1
2023-04-06 15:10:22.419 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.419 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.426 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.424�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 15:10:22.427 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 401 Unauthorized
2023-04-06 15:10:22.427 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 1
2023-04-06 15:10:22.427 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 13:10:22 GMT
2023-04-06 15:10:22.427 DEBUG (webrtc) [custom_components.webrtc.utils] Www-Authenticate: Digest realm="BC Streaming Media", nonce="b293fa071333d64dfff845119f852285"
2023-04-06 15:10:22.427 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.427 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.427 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.424�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:10:22.428 DEBUG (webrtc) [custom_components.webrtc.utils] DESCRIBE rtsp://192.168.1.128:554/h264Preview_01_main RTSP/1.0
2023-04-06 15:10:22.428 DEBUG (webrtc) [custom_components.webrtc.utils] Accept: application/sdp
2023-04-06 15:10:22.428 DEBUG (webrtc) [custom_components.webrtc.utils] Require: www.onvif.org/ver20/backchannel
2023-04-06 15:10:22.428 DEBUG (webrtc) [custom_components.webrtc.utils] User-Agent: go2rtc/1.2.0
2023-04-06 15:10:22.428 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 2
2023-04-06 15:10:22.428 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="b293fa071333d64dfff845119f852285", uri="rtsp://192.168.1.128:554/h264Preview_01_main", response="b5ae1e7f8b3ec7d540fa80107164c374"
2023-04-06 15:10:22.428 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.428 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.466 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.465�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 15:10:22.466 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 15:10:22.466 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 2
2023-04-06 15:10:22.466 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 13:10:22 GMT
2023-04-06 15:10:22.466 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Type: application/sdp
2023-04-06 15:10:22.466 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Length: 760
2023-04-06 15:10:22.466 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Base: rtsp://192.168.1.128/Preview_01_main/
2023-04-06 15:10:22.466 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] v=0
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] o=- 1680777518721511 1 IN IP4 192.168.1.128
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] s=Session streamed by "preview"
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] t=0 0
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] a=tool:BC Streaming Media v202210012022.10.01
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] a=type:broadcast
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:*
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] a=range:npt=now-
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] a=x-qt-text-nam:Session streamed by "preview"
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] m=video 0 RTP/AVP 96
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] c=IN IP4 0.0.0.0
2023-04-06 15:10:22.467 DEBUG (webrtc) [custom_components.webrtc.utils] b=AS:8192
2023-04-06 15:10:22.469 DEBUG (webrtc) [custom_components.webrtc.utils] a=rtpmap:96 H264/90000
2023-04-06 15:10:22.469 DEBUG (webrtc) [custom_components.webrtc.utils] a=range:npt=now-
2023-04-06 15:10:22.469 DEBUG (webrtc) [custom_components.webrtc.utils] a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==
2023-04-06 15:10:22.469 DEBUG (webrtc) [custom_components.webrtc.utils] a=recvonly
2023-04-06 15:10:22.469 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:track1
2023-04-06 15:10:22.469 DEBUG (webrtc) [custom_components.webrtc.utils] m=audio 0 RTP/AVP 97
2023-04-06 15:10:22.469 DEBUG (webrtc) [custom_components.webrtc.utils] c=IN IP4 0.0.0.0
2023-04-06 15:10:22.469 DEBUG (webrtc) [custom_components.webrtc.utils] b=AS:8192
2023-04-06 15:10:22.470 DEBUG (webrtc) [custom_components.webrtc.utils] a=rtpmap:97 MPEG4-GENERIC/16000
2023-04-06 15:10:22.470 DEBUG (webrtc) [custom_components.webrtc.utils] a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;
2023-04-06 15:10:22.470 DEBUG (webrtc) [custom_components.webrtc.utils] a=recvonly
2023-04-06 15:10:22.470 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:track2
2023-04-06 15:10:22.470 DEBUG (webrtc) [custom_components.webrtc.utils] m=audio 0 RTP/AVP 8
2023-04-06 15:10:22.470 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:track3
2023-04-06 15:10:22.470 DEBUG (webrtc) [custom_components.webrtc.utils] a=rtpmap:8 PCMA/8000
2023-04-06 15:10:22.470 DEBUG (webrtc) [custom_components.webrtc.utils] a=sendonly
2023-04-06 15:10:22.471 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.469�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:10:22.471 DEBUG (webrtc) [custom_components.webrtc.utils] DESCRIBE rtsp://192.168.1.128:554/h264Preview_01_main RTSP/1.0
2023-04-06 15:10:22.471 DEBUG (webrtc) [custom_components.webrtc.utils] Accept: application/sdp
2023-04-06 15:10:22.471 DEBUG (webrtc) [custom_components.webrtc.utils] User-Agent: go2rtc/1.2.0
2023-04-06 15:10:22.471 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 3
2023-04-06 15:10:22.471 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.471 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.477 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.476�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 15:10:22.477 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 401 Unauthorized
2023-04-06 15:10:22.479 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 3
2023-04-06 15:10:22.480 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 13:10:22 GMT
2023-04-06 15:10:22.481 DEBUG (webrtc) [custom_components.webrtc.utils] Www-Authenticate: Digest realm="BC Streaming Media", nonce="2e6b810a56be3f4701db8104611d8ac6"
2023-04-06 15:10:22.482 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.483 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.484 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.477�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:10:22.484 DEBUG (webrtc) [custom_components.webrtc.utils] DESCRIBE rtsp://192.168.1.128:554/h264Preview_01_main RTSP/1.0
2023-04-06 15:10:22.484 DEBUG (webrtc) [custom_components.webrtc.utils] Accept: application/sdp
2023-04-06 15:10:22.484 DEBUG (webrtc) [custom_components.webrtc.utils] User-Agent: go2rtc/1.2.0
2023-04-06 15:10:22.484 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 4
2023-04-06 15:10:22.484 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="2e6b810a56be3f4701db8104611d8ac6", uri="rtsp://192.168.1.128:554/h264Preview_01_main", response="d575f15ace2a2ec305c023e3226ac01c"
2023-04-06 15:10:22.484 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.484 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.517 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.514�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 15:10:22.517 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 15:10:22.517 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Base: rtsp://192.168.1.128/Preview_01_main/
2023-04-06 15:10:22.517 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Type: application/sdp
2023-04-06 15:10:22.517 DEBUG (webrtc) [custom_components.webrtc.utils] Content-Length: 689
2023-04-06 15:10:22.517 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 4
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 13:10:22 GMT
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] v=0
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] o=- 1680777518721511 1 IN IP4 192.168.1.128
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] s=Session streamed by "preview"
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] t=0 0
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] a=tool:BC Streaming Media v202210012022.10.01
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] a=type:broadcast
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:*
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] a=range:npt=now-
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] a=x-qt-text-nam:Session streamed by "preview"
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] m=video 0 RTP/AVP 96
2023-04-06 15:10:22.518 DEBUG (webrtc) [custom_components.webrtc.utils] c=IN IP4 0.0.0.0
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] b=AS:8192
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] a=rtpmap:96 H264/90000
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] a=range:npt=now-
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] a=recvonly
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:track1
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] m=audio 0 RTP/AVP 97
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] c=IN IP4 0.0.0.0
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] b=AS:8192
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] a=rtpmap:97 MPEG4-GENERIC/16000
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;
2023-04-06 15:10:22.519 DEBUG (webrtc) [custom_components.webrtc.utils] a=recvonly
2023-04-06 15:10:22.520 DEBUG (webrtc) [custom_components.webrtc.utils] a=control:track2
2023-04-06 15:10:22.521 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.521 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.514�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:10:22.521 DEBUG (webrtc) [custom_components.webrtc.utils] SETUP rtsp://192.168.1.128/Preview_01_main/track1 RTSP/1.0
2023-04-06 15:10:22.521 DEBUG (webrtc) [custom_components.webrtc.utils] Transport: RTP/AVP/TCP;unicast;interleaved=0-1
2023-04-06 15:10:22.521 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 5
2023-04-06 15:10:22.521 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="2e6b810a56be3f4701db8104611d8ac6", uri="rtsp://192.168.1.128/Preview_01_main/track1", response="a3887d5b28622703977559d691ce93b8"
2023-04-06 15:10:22.521 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.521 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.556 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.556�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 15:10:22.557 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 15:10:22.557 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 5
2023-04-06 15:10:22.557 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 13:10:22 GMT
2023-04-06 15:10:22.557 DEBUG (webrtc) [custom_components.webrtc.utils] Transport: RTP/AVP/TCP;unicast;destination=192.168.1.131;source=192.168.1.128;interleaved=0-1
2023-04-06 15:10:22.557 DEBUG (webrtc) [custom_components.webrtc.utils] Session: 36AEED49;timeout=65
2023-04-06 15:10:22.557 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.557 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.558 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.558�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:10:22.558 DEBUG (webrtc) [custom_components.webrtc.utils] PLAY rtsp://192.168.1.128/Preview_01_main/ RTSP/1.0
2023-04-06 15:10:22.558 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 6
2023-04-06 15:10:22.558 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="2e6b810a56be3f4701db8104611d8ac6", uri="rtsp://192.168.1.128/Preview_01_main/", response="d0b744717d0b657e22d8448efe7b93d9"
2023-04-06 15:10:22.558 DEBUG (webrtc) [custom_components.webrtc.utils] Session: 36AEED49
2023-04-06 15:10:22.558 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.558 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.611 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:22.611�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 15:10:22.612 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 15:10:22.612 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 6
2023-04-06 15:10:22.612 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 13:10:22 GMT
2023-04-06 15:10:22.612 DEBUG (webrtc) [custom_components.webrtc.utils] Range: npt=0.000-
2023-04-06 15:10:22.612 DEBUG (webrtc) [custom_components.webrtc.utils] Session: 36AEED49
2023-04-06 15:10:22.612 DEBUG (webrtc) [custom_components.webrtc.utils] Rtp-Info: url=rtsp://192.168.1.128/Preview_01_main/track1;seq=43823;rtptime=1574432495,url=rtsp://192.168.1.128/Preview_01_main/track2;seq=0;rtptime=0,url=rtsp://192.168.1.128/Preview_01_main/track3;seq=0;rtptime=0
2023-04-06 15:10:22.612 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:22.612 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:47.559 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:47.558�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:10:47.561 DEBUG (webrtc) [custom_components.webrtc.utils] OPTIONS rtsp://192.168.1.128/Preview_01_main/ RTSP/1.0
2023-04-06 15:10:47.561 DEBUG (webrtc) [custom_components.webrtc.utils] Session: 36AEED49
2023-04-06 15:10:47.562 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 7
2023-04-06 15:10:47.562 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="2e6b810a56be3f4701db8104611d8ac6", uri="rtsp://192.168.1.128/Preview_01_main/", response="335b11fbcc4fd070215840db0c82be0a"
2023-04-06 15:10:47.562 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:47.562 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:47.570 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:10:47.570�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 15:10:47.570 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 15:10:47.571 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 7
2023-04-06 15:10:47.571 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 13:10:47 GMT
2023-04-06 15:10:47.571 DEBUG (webrtc) [custom_components.webrtc.utils] Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER
2023-04-06 15:10:47.571 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:47.571 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:10:55.989 ERROR (MainThread) [moonraker_api.websockets.websocketclient] Websocket connection error: Cannot connect to host 192.168.1.120:7125 ssl:default [Connect call failed ('192.168.1.120', 7125)]
2023-04-06 15:11:12.560 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:11:12.560�[0m �[35mTRC�[0m [rtsp] client request:
2023-04-06 15:11:12.560 DEBUG (webrtc) [custom_components.webrtc.utils] OPTIONS rtsp://192.168.1.128/Preview_01_main/ RTSP/1.0
2023-04-06 15:11:12.560 DEBUG (webrtc) [custom_components.webrtc.utils] Authorization: Digest username="admin", realm="BC Streaming Media", nonce="2e6b810a56be3f4701db8104611d8ac6", uri="rtsp://192.168.1.128/Preview_01_main/", response="335b11fbcc4fd070215840db0c82be0a"
2023-04-06 15:11:12.560 DEBUG (webrtc) [custom_components.webrtc.utils] Session: 36AEED49
2023-04-06 15:11:12.561 DEBUG (webrtc) [custom_components.webrtc.utils] CSeq: 8
2023-04-06 15:11:12.561 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:11:12.561 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:11:12.565 DEBUG (webrtc) [custom_components.webrtc.utils] �[90m15:11:12.565�[0m �[35mTRC�[0m [rtsp] client response:
2023-04-06 15:11:12.566 DEBUG (webrtc) [custom_components.webrtc.utils] RTSP/1.0 200 OK
2023-04-06 15:11:12.566 DEBUG (webrtc) [custom_components.webrtc.utils] Cseq: 8
2023-04-06 15:11:12.566 DEBUG (webrtc) [custom_components.webrtc.utils] Date: Thu, Apr 06 2023 13:11:12 GMT
2023-04-06 15:11:12.566 DEBUG (webrtc) [custom_components.webrtc.utils] Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER
2023-04-06 15:11:12.566 DEBUG (webrtc) [custom_components.webrtc.utils] 
2023-04-06 15:11:12.566 DEBUG (webrtc) [custom_components.webrtc.utils] 

@NickM-27
Copy link
Contributor

NickM-27 commented Apr 6, 2023

So you are seeing the same thing I am which is that when go2rtc requests the backchannel audio, the doorbell responds with RTSP/1.0 401 Unauthorized but for some reason the request without backchannel audio works without issue

@savage7
Copy link

savage7 commented Apr 6, 2023

Yes the same for me, I tried to play a sound file via curl and got:
RTSP/1.0 401 Unauthorized
Curl printed can't match media not sure why.

@NickM-27
Copy link
Contributor

NickM-27 commented Apr 6, 2023

I wonder if there is a setting or special permission that needs to be enabled in settings

@luisiam
Copy link
Author

luisiam commented Apr 6, 2023

I am trying the same thing with scrypted and looks like it's getting further. However, it is still not working. This is the trace from scrypted.

rtsp outgoing message
 OPTIONS rtsp://192.168.10.21:554/ RTSP/1.0
CSeq: 0
User-Agent: Scrypted



rtsp incoming message
 RTSP/1.0 200 OK
CSeq: 0
Date: Tue, Apr 04 2023 04:29:36 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER

rtsp outgoing message
 DESCRIBE rtsp://192.168.10.21:554/ RTSP/1.0
Require: www.onvif.org/ver20/backchannel
Accept: application/sdp
CSeq: 1
User-Agent: Scrypted



rtsp incoming message
 RTSP/1.0 401 Unauthorized
CSeq: 1
Date: Tue, Apr 04 2023 04:29:36 GMT
WWW-Authenticate: Digest realm="BC Streaming Media", nonce="7de360e2e91f3545c54e6b582719ce61"

rtsp outgoing message
 DESCRIBE rtsp://192.168.10.21:554/ RTSP/1.0
Require: www.onvif.org/ver20/backchannel
Accept: application/sdp
CSeq: 2
User-Agent: Scrypted
Authorization: Digest username="xxx", realm="BC Streaming Media", nonce="7de360e2e91f3545c54e6b582719ce61", uri="rtsp://192.168.10.21:554/", algorithm="MD5", response="214ea20b200764a3ad81871d9ef7b087"



rtsp incoming message
 RTSP/1.0 200 OK
CSeq: 2
Date: Tue, Apr 04 2023 04:29:36 GMT
Content-Base: rtsp://192.168.10.21//
Content-Type: application/sdp
Content-Length: 740

ONVIF Backchannel SDP:
v=0
o=- 1680582035944237 1 IN IP4 192.168.0.3
s=Session streamed by "preview"
t=0 0
a=tool:BC Streaming Media v202210012022.10.01
a=type:broadcast
a=control:*
a=range:npt=now-
a=x-qt-text-nam:Session streamed by "preview"
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:8192
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==
a=recvonly
a=control:track1
m=audio 0 RTP/AVP 97
c=IN IP4 0.0.0.0
b=AS:8192
a=rtpmap:97 MPEG4-GENERIC/16000
a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;
a=recvonly
a=control:track2
m=audio 0 RTP/AVP 8
a=control:track3
a=rtpmap:8 PCMA/8000
a=sendonly
rtsp outgoing message
 SETUP rtsp://192.168.10.21:554/track3 RTSP/1.0
Require: www.onvif.org/ver20/backchannel
Transport: RTP/AVP;unicast;client_port=43271-43272
CSeq: 3
User-Agent: Scrypted
Authorization: Digest username="xxx", realm="BC Streaming Media", nonce="7de360e2e91f3545c54e6b582719ce61", uri="rtsp://192.168.10.21:554/track3", algorithm="MD5", response="705c9971d5fde82bf1a11227e7e512a9"



rtsp incoming message
 RTSP/1.0 200 OK
CSeq: 3
Date: Tue, Apr 04 2023 04:29:36 GMT
Transport: RTP/AVP;unicast;destination=192.168.10.3;source=192.168.10.21;client_port=43271-43272;server_port=6974-6975
Session: A99439ED;timeout=65

backchannel transport {
  'RTP/AVP': undefined,
  unicast: undefined,
  destination: '192.168.10.3',
  source: '192.168.10.21',
  client_port: '43271-43272',
  server_port: '6974-6975'
}
-hide_banner -rtsp_transport udp -i rtsp:[REDACTED] -vn -acodec pcm_alaw -ar 8000 -ac 1 -payload_type 8 -ssrc 1981072471 -f rtp rtp://192.168.10.21:6974?localrtpport=43271&localrtcpport=43272
rtsp outgoing message
 PLAY rtsp://192.168.10.21:554/ RTSP/1.0
Require: www.onvif.org/ver20/backchannel
Range: npt=0.000-
CSeq: 4
User-Agent: Scrypted
Authorization: Digest username="xxx", realm="BC Streaming Media", nonce="7de360e2e91f3545c54e6b582719ce61", uri="rtsp://192.168.10.21:554/", algorithm="MD5", response="a467a91cd5eb13cbc47a06faf34b32f8"
Session: A99439ED



rtsp incoming message
 RTSP/1.0 200 OK
CSeq: 4
Date: Tue, Apr 04 2023 04:29:37 GMT
Range: npt=0.000-
Session: A99439ED
RTP-Info: url=rtsp://192.168.10.21//track1;seq=0;rtptime=0,url=rtsp://192.168.10.21//track2;seq=0;rtptime=0,url=rtsp://192.168.10.21//track3;seq=0;rtptime=0

intercom playing
Input #0, rtsp, from 'rtsp://127.0.0.1:39559':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp

Stream mapping:
  Stream #0:0 -> #0:0 (opus (native) -> pcm_alaw (native))
Press [q] to stop, [?] for help

Output #0, rtp, to 'rtp://192.168.10.21:6974?localrtpport=43271&localrtcpport=43272':
  Metadata:
    encoder         : Lavf59.16.100
  Stream #0:0: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
    Metadata:
      encoder         : Lavc59.18.100 pcm_alaw
size=       0kB time=00:00:00.01 bitrate=  81.8kbits/s speed=N/A    
video/audio detected, discarding further input
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.10.21
t=0 0
a=tool:libavformat 59.16.100
m=audio 6974 RTP/AVP 8
b=AS:64

@spawn451
Copy link

spawn451 commented Apr 6, 2023

How do you have configured your go2rtc.yaml in Home Assistant ?
Mine look like this :

go2rtc.yaml

reolink_1: ffmpeg:rtsp://admin:[email protected]:554/Preview_01_sub#audio=opus#video=h264#backchannel=0
reolink_2: ffmpeg:rtsp://admin:[email protected]:554/Preview_01_sub#audio=opus#video=h264

log:
level: debug # default level
api: debug
exec: debug
ngrok: info
rtsp: debug
streams: debug
webrtc: debug

2 ways audio doesn't work either but I cannot get a verbose log like you have, how did you manage to get all these informations in your log ?

configuration.yaml

logger:
default: info
logs:
custom_components.webrtc: debug

@NickM-27
Copy link
Contributor

NickM-27 commented Apr 6, 2023

@spawn451 you can't use ffmpeg, that does not support 2 way audio

@spawn451
Copy link

spawn451 commented Apr 6, 2023

@NickM-27 But if I don’t use ffmpeg and for example set this :
rtsp://admin:[email protected]:554/Preview_01_sub I don’t get any sound at all. I Sorry I’m a novice in this domain.

@NickM-27
Copy link
Contributor

NickM-27 commented Apr 6, 2023

@spawn451 you need to set it up like this:

streams:
  reolink:
    - rtsp://admin:[email protected]:554/Preview_01_sub
    - ffmpeg:reolink#audio=opus

@spawn451
Copy link

spawn451 commented Apr 6, 2023

@NickM-27 Thanks! I’m gonna change my config.

@luisiam
Copy link
Author

luisiam commented Apr 12, 2023

Scrypted is updated and 2-way audio is working with the ONVIF plugin

@kevdliu
Copy link

kevdliu commented Apr 12, 2023

This is the commit that added support koush/scrypted@ec3e16f

@kevdliu
Copy link

kevdliu commented Apr 12, 2023

@luisiam could you post a trace from scrypted with 2-way audio working? I want to compare it with the log you posted above to see if there are any differences.

@rbray89
Copy link

rbray89 commented Apr 12, 2023 via email

@NickM-27
Copy link
Contributor

@rbray89 more work is needed, the doorbell does not play audio in my testing

@rbray89
Copy link

rbray89 commented Apr 12, 2023

It could be a transcoding issue. Reolink only uses AAC, and Opus/PCM is used by webrtc.

@NickM-27
Copy link
Contributor

NickM-27 commented Apr 12, 2023

@rbray89 that is also incorrect. If you check the sendonly audio channel on the reolink doorbell, it is PCMA/8000 which you can see from the RTSP DESCRIBE response in an earlier comment #331 (comment)

@luisiam
Copy link
Author

luisiam commented Apr 12, 2023

@luisiam could you post a trace from scrypted with 2-way audio working? I want to compare it with the log you posted above to see if there are any differences.

Here it is

[WebRTC Plugin]: signalingState have-remote-offer
[WebRTC Plugin]: iceGatheringState gathering
[WebRTC Plugin]: signalingState stable
[WebRTC Plugin]: connectionState connecting
[WebRTC Plugin]: iceConnectionState checking
[WebRTC Plugin]: waiting ice connected
[WebRTC Plugin]: iceConnectionState completed
[WebRTC Plugin]: iceGatheringState complete
[WebRTC Plugin]: iceConnectionState connected
[WebRTC Plugin]: connectionState connected
[WebRTC Plugin]: ice transport { ipv4: true, isPrivate: true, destinationId: '192.168.10.164' }
[WebRTC Plugin]: Connection is local network: true
[WebRTC Plugin]: done waiting ice connected
[Rebroadcast Plugin]: Selected stream Profile000_MainStream
[Rebroadcast Plugin]: sending prebuffer 1999.25
[RTC Connection Bridge]: Client Stream Profile {
[RTC Connection Bridge]:   transcodeBaseline: false,
[RTC Connection Bridge]:   sessionSupportsH264High: true,
[RTC Connection Bridge]:   maximumCompatibilityMode: false,
[RTC Connection Bridge]:   userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.34',
[RTC Connection Bridge]:   capabilities: {
[RTC Connection Bridge]:     audio: { codecs: [Array], headerExtensions: [Array] },
[RTC Connection Bridge]:     video: { codecs: [Array], headerExtensions: [Array] }
[RTC Connection Bridge]:   },
[RTC Connection Bridge]:   screen: { devicePixelRatio: 1, width: 3440, height: 1440 }
[RTC Connection Bridge]: }
[RTC Connection Bridge]: rtsp/tcp h264
[RTC Connection Bridge]: a/v h264 opus found h264 undefined
[RTC Connection Bridge]: rtsp/tcp aac
[RTC Connection Bridge]: -hide_banner -i rtsp:[REDACTED] -acodec libopus -flags +global_header -ar 48k -b:a 40k -bufsize 96k -ac 2 -application lowdelay -dn -sn -vn -f rtp rtp://127.0.0.1:44508? -sdp_file pipe:4
[Rebroadcast Plugin]: Profile000_MainStream active rebroadcast clients: 1
[Rebroadcast Plugin]: Found sync frame in rtsp prebuffer.
[RTC Connection Bridge]: first video packet 405
[RTC Connection Bridge]: [rtsp @ 0x6dfa980] method SETUP failed: 461 Unsupported Transport
[RTC Connection Bridge]: Input #0, rtsp, from 'rtsp://127.0.0.1:41295':
[RTC Connection Bridge]:   Metadata:
[RTC Connection Bridge]:     title           : Session streamed by "preview"
[RTC Connection Bridge]:   Duration: N/A, start: 0.000000, bitrate: N/A
[RTC Connection Bridge]:   Stream #0:0: Audio: aac (LC), 16000 Hz, mono, fltp
[RTC Connection Bridge]: Stream mapping:
[RTC Connection Bridge]:   Stream #0:0 -> #0:0 (aac (native) -> opus (libopus))
[RTC Connection Bridge]: Press [q] to stop, [?] for help
[RTC Connection Bridge]: Output #0, rtp, to 'rtp://127.0.0.1:44508?':
[RTC Connection Bridge]:   Metadata:
[RTC Connection Bridge]:     title           : Session streamed by "preview"
[RTC Connection Bridge]:     encoder         : Lavf59.16.100
[RTC Connection Bridge]:   Stream #0:0: Audio: opus, 48000 Hz, stereo, flt, 40 kb/s
[RTC Connection Bridge]:     Metadata:
[RTC Connection Bridge]:       encoder         : Lavc59.18.100 libopus
[RTC Connection Bridge]: size=       0kB time=00:00:00.05 bitrate=  65.5kbits/s speed=5.75e+04x
[RTC Connection Bridge]: video/audio detected, discarding further input
rtsp outgoing message
 OPTIONS rtsp://192.168.10.21:554/ RTSP/1.0
CSeq: 0
User-Agent: Scrypted



rtsp incoming message
 RTSP/1.0 200 OK
CSeq: 0
Date: Wed, Apr 12 2023 23:32:14 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER

rtsp outgoing message
 DESCRIBE rtsp://192.168.10.21:554/ RTSP/1.0
Require: www.onvif.org/ver20/backchannel
Accept: application/sdp
CSeq: 1
User-Agent: Scrypted



rtsp incoming message
 RTSP/1.0 401 Unauthorized
CSeq: 1
Date: Wed, Apr 12 2023 23:32:14 GMT
WWW-Authenticate: Digest realm="BC Streaming Media", nonce="c191793b9885d76c0f965571993b7867"

rtsp outgoing message
 DESCRIBE rtsp://192.168.10.21:554/ RTSP/1.0
Require: www.onvif.org/ver20/backchannel
Accept: application/sdp
CSeq: 2
User-Agent: Scrypted
Authorization: Digest username="xxx", realm="BC Streaming Media", nonce="c191793b9885d76c0f965571993b7867", uri="rtsp://192.168.10.21:554/", algorithm="MD5", response="3bc6e9038db0bb4ad9fda4913fee369d"



rtsp incoming message
 RTSP/1.0 200 OK
CSeq: 2
Date: Wed, Apr 12 2023 23:32:15 GMT
Content-Base: rtsp://192.168.10.21//
Content-Type: application/sdp
Content-Length: 742

ONVIF Backchannel SDP:
v=0
o=- 1681318297217039 1 IN IP4 192.168.10.21
s=Session streamed by "preview"
t=0 0
a=tool:BC Streaming Media v202210012022.10.01
a=type:broadcast
a=control:*
a=range:npt=now-
a=x-qt-text-nam:Session streamed by "preview"
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:8192
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==
a=recvonly
a=control:track1
m=audio 0 RTP/AVP 97
c=IN IP4 0.0.0.0
b=AS:8192
a=rtpmap:97 MPEG4-GENERIC/16000
a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;
a=recvonly
a=control:track2
m=audio 0 RTP/AVP 8
a=control:track3
a=rtpmap:8 PCMA/8000
a=sendonly
rtsp outgoing message
 SETUP rtsp://192.168.10.21:554/track3 RTSP/1.0
Require: www.onvif.org/ver20/backchannel
Transport: RTP/AVP;unicast;client_port=49569-49570
CSeq: 3
User-Agent: Scrypted
Authorization: Digest username="xxx", realm="BC Streaming Media", nonce="c191793b9885d76c0f965571993b7867", uri="rtsp://192.168.10.21:554/track3", algorithm="MD5", response="41e6ac72b574787b4861ac179c4d3f90"



rtsp incoming message
 RTSP/1.0 200 OK
CSeq: 3
Date: Wed, Apr 12 2023 23:32:15 GMT
Transport: RTP/AVP;unicast;destination=192.168.10.3;source=192.168.10.21;client_port=49569-49570;server_port=6976-6977
Session: C0563045;timeout=65

backchannel transport {
  'RTP/AVP': undefined,
  unicast: undefined,
  destination: '192.168.10.3',
  source: '192.168.10.21',
  client_port: '49569-49570',
  server_port: '6976-6977'
}
rtsp outgoing message
 PLAY rtsp://192.168.10.21:554/ RTSP/1.0
Require: www.onvif.org/ver20/backchannel
Range: npt=0.000-
CSeq: 4
User-Agent: Scrypted
Authorization: Digest username="xxx", realm="BC Streaming Media", nonce="c191793b9885d76c0f965571993b7867", uri="rtsp://192.168.10.21:554/", algorithm="MD5", response="4e58e3c9fc6875a812d367822aa92043"
Session: C0563045



rtsp incoming message
 RTSP/1.0 200 OK
CSeq: 4
Date: Wed, Apr 12 2023 23:32:15 GMT
Range: npt=0.000-
Session: C0563045
RTP-Info: url=rtsp://192.168.10.21//track1;seq=0;rtptime=0,url=rtsp://192.168.10.21//track2;seq=0;rtptime=0,url=rtsp://192.168.10.21//track3;seq=0;rtptime=0

intercom playing
[WebRTC Plugin]: signalingState closed
[WebRTC Plugin]: connectionState closed
[WebRTC Plugin]: iceConnectionState closed
[Rebroadcast Plugin]: Profile000_MainStream active rebroadcast clients: 0
[RTC Connection Bridge]: ffmpeg exited

@SilverHazeLazers
Copy link

@NickM-27 Not sure if helpful but Reolink just released a new build DB_566128M5MP_P.2017_23041202.Reolink-Video-Doorbell-PoE.OV05A10.5MP.REOLINK.pak. Some users in the reolink forum are claiming 2 way audio issues they were having before have been resolved

@NickM-27
Copy link
Contributor

@SilverHazeLazers any idea where to get that build? as far as I can tell, reolink has removed the doorbell firmware builds from their website. Perhaps that is a sign that things are not ready yet.

@rbray89
Copy link

rbray89 commented Apr 13, 2023 via email

@NickM-27
Copy link
Contributor

Just tried it, seeing some errors in go2rtc:

2023-04-13 08:05:46.732406150  twcc_sender_interceptor ERROR: 2023/04/13 08:05:46 io: read/write on closed pipe
2023-04-13 08:05:46.832662953  twcc_sender_interceptor ERROR: 2023/04/13 08:05:46 io: read/write on closed pipe
2023-04-13 08:05:46.932403368  twcc_sender_interceptor ERROR: 2023/04/13 08:05:46 io: read/write on closed pipe
2023-04-13 08:05:47.032937544  twcc_sender_interceptor ERROR: 2023/04/13 08:05:47 io: read/write on closed pipe
2023-04-13 08:05:47.132591387  twcc_sender_interceptor ERROR: 2023/04/13 08:05:47 io: read/write on closed pipe

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 13, 2023

@NickM-27 Are you sure this logs from go2rtc? I don't know what is twcc_sender_interceptor
And it's very strange log format

@NickM-27
Copy link
Contributor

I agree it is a weird format and doesn't match go2rtc logs, but it definitely came from the process running go2rtc and it happened right when I tried to play the two way talk with the doorbell.

That being said, I did a handful of refreshes trying to get it to work so it may not be related to the reason two way talk isn't working with the doorbell.

@sharbich
Copy link

Hello, it's a pity that you can't help me. I'm getting the following error messages which are caused by your configuration.
github.com/AlexxIT/go2rtc/internal/streams/producer.go:170 > error="start from CONN state" url=rtsp://#####:###########@192.168.130.143:554/Preview_01_sub

@Joeviocoe
Copy link

now it isn't so clear the full "working setup".

I am having this issue. It seems like there should be a working setup marked and the issue closed, and perhaps the wiki updated.
But it is frustrating that the solution is still a mystery.

@bagobones
Copy link

bagobones commented Jan 2, 2025

As far as two way audio goes there isn't much to it in go2rtc it self. Most if the issues are outside of go2rtc.

go2rtc you need a WORKING webrtc config and you NEED to be transcoding the audio to opus for that.. You can chose to use the FLV or rtsp stream.. I prefer the rtsp stream.

go2rtc:
  webrtc:
    candidates:
      - stun:8555
  streams:
    doorbell: #Reolink Doorbell
      - rtsp://admin:{FRIGATE_RTSP_PASSWORD}@192.168.103.6:554/h264Preview_01_main
      - ffmpeg:doorbell#audio=opus   # transcodes audio to opus for webrtc compatibility

Camera.. The camera NEEDS to be on a WORKING firmware. (several older releases have BROKEN 2 way audio). The build in auto update LIES, go download from https://reolink.com/ca/download-center/

Reolink Video Doorbell WiFi
Hardware No.: DB_566128M5MP_W
Firmware Version: v3.0.0.4110_2410111119

There is still going to be a delay but make SURE you set your I-frame Interval to 1x to reduce it.

Last thing your front end NEEDS to be running HTTPS (there are workarounds) but in a practical sense you need to have setup HTTPS. This is a REQUIREMENT for Webrtc in all modern web browsers to enable the mic so you need to do this if you want it to work across multiple devices and browsers.

At this point frigate 0.15 beta (maybe 0.14) native UI setup with HTTPS should work for two way audio no additional config.

In home assistant WITH a working HTTPS config you can use the frigate custom card
https://github.com/dermotduffy/frigate-hass-card

This card has A LOT of options, I have it connect directly vita the frigate option with the go2rrtc live_provider.

I have this on a dedicated View in Panel (single card) mode just for two way audio.

type: custom:frigate-card
cameras:
  - frigate:
      camera_name: doorbell
    live_provider: go2rtc
live:
  controls:
    next_previous:
      style: none
    thumbnails:
      mode: none
    timeline:
      mode: none
    ptz:
      mode: "off"
    builtin: false
  microphone:
    always_connected: true
  auto_unmute:
    - microphone
  transition_effect: none
  display:
    mode: single
  draggable: false
  zoomable: false
  lazy_load: false
dimensions:
  aspect_ratio_mode: static
menu:
  style: outside
  buttons:
    frigate:
      enabled: false
    cameras:
      enabled: false
    substreams:
      enabled: false
    live:
      enabled: false
    clips:
      enabled: false
    snapshots:
      enabled: false
    download:
      enabled: false
    expand:
      enabled: false
    timeline:
      enabled: false
    media_player:
      enabled: false
    microphone:
      enabled: true
      type: toggle
    mute:
      enabled: true
    display_mode:
      enabled: false
    fullscreen:
      enabled: false
  position: bottom
  alignment: right
  button_size: 70
performance:
  style:
    border_radius: false
    box_shadow: false
  features:
    animated_progress_indicator: false
status_bar:
  style: none

There are other variations that I am sure work.

This configuration has about a 2-4 second audio delay however.

@Joeviocoe
Copy link

Joeviocoe commented Jan 2, 2025

So trying many combinations of configs found on threads like this one... I managed to get microphone working. But audio back from the doorbell cam did not work. That was with Neolink and an exec to a script in go2rtc config.

But now with your example... I get the opposite audio. Thank you for the detailed examples. I had most of it, but of course, code hinges on the small details.

I did not have candidates: stun:8555, the rtsp port or protocol :554/h264 and probably important... my card config looked quite a bit different.

type: custom:frigate-card
cameras:
  - camera_entity: camera.cam_driveway1
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
      stream: driveway_sub

@Joeviocoe
Copy link

Well, I thought it worked. Maybe I was too close and was just hearing the audio from my phone echo back after the 2-4 second delay.
The doorbell microphone to the phone works, but the microphone on the android does not. :(

@bagobones
Copy link

Well, I thought it worked. Maybe I was too close and was just hearing the audio from my phone echo back after the 2-4 second delay. The doorbell microphone to the phone works, but the microphone on the android does not. :(

If you are going to test it alone it is best to do it with headphones or something so the mic / speaker of both device is not creating a feedback loop.

If using a browser you must give the page permission to use the mic..

@Joeviocoe
Copy link

Joeviocoe commented Jan 2, 2025

Okay, so my go2rtc config:

go2rtc:
  streams:
    doorbell:
      - "ffmpeg:http://10.0.x.x/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=PASS#video=copy#audio=copy#audio=opus"
      - rtsp://admin:[email protected]:554/h264Preview_01_main
      - ffmpeg:doorbell#audio=opus

... tried either/or ffmpeg lines... same result

But the difference seems to be in the frigate hass card:

cameras:
  - camera_entity: camera.cam_doorbell1
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
      stream: doorbell

... Gives a working Android microphone to Doorbell speaker. But not the other direction. While...

cameras:
 - frigate:
     camera_name: doorbell
   live_provider: go2rtc

... Gives a working Doorbell microphone to Android speaker. But not the other direction.

The rest of the card config stays the exactly as your example and remains the same as I alternate the camera section.
I am essentially STUCK having 1-way audio, in the direction of my choice. I combine both configs in the same camera section, and it is still the same. Seems to use only the first/top entry.
Something wrong with the card config or a limitation of the HomeAssistant companion app for Android (webview browser)?

I guess a workaround that seems to work... two separate cards, with different camera configs. I can get 2-way audio working. I can fiddle around so that one card has the mic button and the other has the mute/speaker button, and then figure out how to get one of the cards not have any video so it looks better.

I am on the latest dermotduffy/frigate-hass-card, and maybe it's a bug with the card.

@bagobones
Copy link

bagobones commented Jan 2, 2025

So I don't know what to tell you that config works BOTH on iOS home assistant app AND on Windows Desktop in Chrome for me.

The critical parts are actually the parts that enable the mic as that is what didn't work for me. Go try on another device WITH a working mic.

Also did you CONFIRM you are on a correct working firmware for the doorbell? Are you on Firmware Version: v3.0.0.4110_2410111119 or something else. As I stated out of the 4-6 firmware's since the doorbell was released I think two way audio has worked in 2 maybe 3 of them.

This part of the HA customer card config is VERY important.

live:
  microphone:
    always_connected: true
  auto_unmute:
    - microphone

@Joeviocoe
Copy link

Joeviocoe commented Jan 2, 2025

Yes, that is my firmware for the doorbell.

Build No.build 2410111119
Hardware No.DB_566128M5MP_W
Config Versionv3.0.0.0
Firmware Versionv3.0.0.4110_2410111119
DetailsDB_566128M5MP_WS36E1W7U0108

I had issues with auto_unmute not being a valid config but seems to be accepted now.

What version of the card are you using that works? I am using 6.1.2 version of the frigate-card, 0.15.0-beta4 of the frigate addon, and version 5.6.0 of the frigate integration. Also HA v12.5 and the HA Android companion app v2024.12.1-min

@Joeviocoe
Copy link

The critical parts are actually the parts that enable the mic as that is what didn't work for me. Go try on another device WITH a working mic.

The mic does work on this device. But only if the card is set to the camera entity rather than the frigate camera name. But then the audio does not return FROM the doorbell.

I've tried a Chromium based browser on the phone, same issues.

@bagobones
Copy link

The mic does work on this device. But only if the card is set to the camera entity rather than the frigate camera name.

Not going to continue troubleshooting here but it is possible that you have multiple instances of the card fighting for mic control. Just a theory, I specifically made the card a separate view so it is only presented with mic enabled in one place.

@Joeviocoe
Copy link

Joeviocoe commented Jan 2, 2025

specifically made the card a separate view so it is only presented with mic enabled in one place.

Yes, I put it in it's own dashboard view too.

Mic control conflicts would not explain how the mic works with when I have a working card with this config in another dashboard that isn't loaded:

 - camera_entity: camera.cam_doorbell1
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
      stream: 

But thanks for the help. I've opened a ticket for the frigate-hass-card. Can you confirm that your versions match mine??

@bagobones
Copy link

But thanks for the help. I've opened a ticket for the frigate-hass-card. Can you confirm that your versions match mine??

I am running v6.1.2 and I confirmed my config was still working before I posted. - webrtc is going to FORCE webrtc mode which may be required on android? otherwise go2rtc should auto pick I believe. ONly other thing I can think to check if you are running this within frigate is if the frigate integration has the "Use Frigate-native WebRTC Support" advanced option checked. I have this turned off and might explain why camera_entity: camera.cam_doorbell1 even works for you.

@Joeviocoe
Copy link

I think you're right. It's the WebRTC that makes the microphone on the Android app work, but simultaneously breaks the audio coming from the doorbell.

So if I have the card config:

cameras:
 - frigate:
     camera_name: doorbell
   live_provider: go2rtc

I get audio only from Doorbell to Phone.

But if the config is:

cameras:
  - frigate:
      camera_name: doorbell
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc

... then the audio from the Doorbell to the Phone stop... and the Phone mic works to send audio to the Doorbell.

@Joeviocoe
Copy link

"Use Frigate-native WebRTC support" was always off for me. Turning it on didn't seem to make a difference.

Also, I need more info about:

  webrtc:
    candidates:
      - stun:8555

How does this play into it. Is there a separate port or something I need in my frigate config or addon/docker config?

@bagobones
Copy link

How does this play into it. Is there a separate port or something I need in my frigate config or addon/docker config?

port 8555 needs to be open to your go2rtc instance for webrtc to work this needs to be available internally and externally port forwarded.

That is why I in BOLD stated you need a WORKING webrtc config in go2rtc https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#module-webrtc

@Joeviocoe
Copy link

Hmm... well this is a local network only config. Frigate Addon handles the WebRTC port of udp/tcp:8555, and it is opened.

How do I verify that WebRTC is configured correctly? Is there a test or log errors I should expect to see?

@bagobones
Copy link

Hmm... well this is a local network only config. Frigate Addon handles the WebRTC port of udp/tcp:8555, and it is opened.

How do I verify that WebRTC is configured correctly? Is there a test or log errors I should expect to see?

You will need to add your frigate/go2rtc HOST IP to the candidates list, stun is a catch all that requires external access. If you go to the go2rtc admin interface you can launch a webtc only url if it doesn't work it isn't working.

@Joeviocoe
Copy link

go2rtc admin interface ?

@bagobones
Copy link

go2rtc admin interface ?

are you running frigate or bare go2rtc?

The go2rtc web interface is on port :1984 which will not be enabled by default in a frigate install. from there you can go to the links section of any stream you have configured and specifically test them

for example this link would force a webrtc connection to my doorbell stream using ONLY go2rtc.

http://192.168.102.30:1984/stream.html?src=doorbell&mode=webrtc

@Joeviocoe
Copy link

Frigate addon, includes go3rtc v1.9.2 built in. I've tried updating it to 1.9.7.

I'll see if I can get to the web interface.

@bagobones
Copy link

Frigate addon

https://docs.frigate.video/guides/configuring_go2rtc/

Navigate to port 1984 in your browser to access go2rtc's web interface.
If using Frigate through Home Assistant, enable the web interface at port 1984.

Looks like you will need to go to the addon screen and enable the port there..

@Joeviocoe
Copy link

Joeviocoe commented Jan 2, 2025

Okay, I'm in.

It seems to already have stun and my local IP properly as webrtc candidates in the go2rtc config, without needing it in the frigate.yml.

@Joeviocoe
Copy link

warn undefined error=start from CONN state url=rtsp://admin:[email protected]:554/h264Preview_01_main caller=github.com/AlexxIT/go2rtc/internal/streams/producer.go:170
This is the only error I get, well, warning.

At some point during my testing, without the go2rtc: modes: - webrtc, the microphone button stopped showing up entirely.

I'm trying to get a chromium or firefox based browser, on android or linux, to show the microphone when using the stream link http://SERVER:1984/webrtc.html?src=doorbell&media=video+audio+microphone
So far, no luck. But I also have seen somewhere that 2-way audio needs working SSL. My self-signed cert works for the HA app viewing lovelace cards, but not sure if it should be expected to work over http direct to go2rtc.

@bagobones
Copy link

To get the mic to work you would need to have it behind https, I was mostly interested if the webrtc link worked AT ALL directly to eliminate go2rtc as the cause.

I have never used it but I believe there is a way to turn off the SSL requirement in chrome for testing, I think AlexxIT posted it earlier in the thread.

If webrtc is working I would test it from the frigate interface assuming you have that behind https internally.

@Joeviocoe
Copy link

It sure seems like WebRTC is working fine. Especially since when I add go2rtc: modes: - webrtc to the camera config, the microphone works. So it seems like its more like, why does the audio FROM the doorbell stop working at that point.

test it from the frigate interface

What exactly do you mean? The Frigate interface live view? I don't usually get any audio in that. Only in clip / recording playback view.

@bagobones
Copy link

bagobones commented Jan 2, 2025

What exactly do you mean? The Frigate interface live view? I don't usually get any audio in that. Only in clip / recording playback view.

I am on frigate 0.15 beta but when I go to the frigate web interface via my https proxy in the top right I have the mic and speaker controls

image

I note this as my go2rtc example config works both in frigates web UI as a client and via the home assistant card on windows chrome.

We are speaking on an issue in the go2rtc repo and I am trying to provide different ways to confirm the issue on your end but I am fairly sure it is not a go2rtc issue at this point.

@bagobones
Copy link

bagobones commented Jan 3, 2025

to test absolutely DIRECT with JUST go2rtc and chrome (replace 192.168.102.30 with your instances IP)

chrome://flags/#unsafely-treat-insecure-origin-as-secure

image

Then http://192.168.102.30:1984/webrtc.html?src=doorbell&media=video+audio+microphone

Grant access to the mic, it should be blue and ON all the time then
image

Make sure to un mute the video and be sure it is playing.. it seems to audo pause.

I did find mic volume VERY faint but it did work this way.

@Joeviocoe
Copy link

Joeviocoe commented Jan 4, 2025

Thank you!
This was very helpful in testing. WebRTC is working at it should.

I have also discovered the Network view of go2rtc.
6
Brilliant. For visual learners, this is really helpful to see all the connections as they are made.

I have made some progress, but not quite there yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
camera Discussion on a particular camera model
Projects
None yet
Development

No branches or pull requests