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 · 350 comments
Open

Reolink Video Doorbell discussion #331

luisiam opened this issue Apr 4, 2023 · 350 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:password@192.168.10.51:554/Preview_01_sub#audio=opus#video=h264#backchannel=0
reolink_2: ffmpeg:rtsp://admin:password@192.168.10.51: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:password@192.168.10.51: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:password@192.168.10.51: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.

@DMedina559
Copy link

DMedina559 commented Oct 3, 2024

https://frigate-docs.netlify.app/configuration/camera_specific#reolink-cameras

This is how Frigate recommends setting up Reolink cameras with go2rtc for 2way audio to work

@fatshotty
Copy link

https://frigate-docs.netlify.app/configuration/camera_specific#reolink-cameras

This is how Frigate recommends setting up Reolink cameras with go2rtc for 2way audio to work

yes, i made exactly what frigate recommends in its doc.
Moreover, I have 2 separate containers: go2rtc and frigate.
In go2rtc, i cannot use microphone via browser as described in my previous message, so i dont know what kind of link use in frigate.
Maybe u r suggesting use go2rtc inside frigate container?

@tasiotas
Copy link

tasiotas commented Oct 5, 2024

after looking at Frigate docs, I made it work. 2 way audio with flv video stream.

streams:
    doorbell_main:
        - ffmpeg:http://192.168.1.20/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=********#video=copy#audio=copy#audio=opus
        - rtsp://admin:********@192.168.1.20:554/h264Preview_01_sub

@fatshotty
Copy link

fatshotty commented Oct 5, 2024

thanks @tasiotas
these are my links in go2rtc container
go2rtc_-_File_Editor

and here are links in frigate:
Config_Editor_-_Frigate

2-way-audio doesnt work :/
However, just to be sure: where can i find (and check if it works) 2-way-audio in frigate?

thanks

go2rtc; Version: 1.9.4
frigate: 0.14

@DMedina559
Copy link

Your frigate config is wrong

If you're using the internal go2rtc you should be using 127.0.0.1 , right now you have it set to go2rtc which won't connect to anything as it's not an IP address. The docs show you how to set up

https://docs.frigate.video/configuration/

@brdva
Copy link

brdva commented Oct 6, 2024

A few weeks ago my 2 way audio was working, don't know why it isn't anymore, maybe a Home Assistant update stopped it?
Reolink Black PoE - latest firmware version

My config:

mqtt:
  host: 192.168.x.xx
  port: xxx
  topic_prefix: frigate
  client_id: frigate
  user: xxxx
  password: xxxxxxxx
  stats_interval: 60

detectors:
  coral:
    type: edgetpu
    device: usb

go2rtc:
  streams:
    doorbell_sub:
      - "ffmpeg:https://192.168.xxx.x/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=xxxxxx&password=xxxxxxx#audio=copy#video=copy#audio=opus
      - rtsp://xxxxxx:xxxxxxx@192.168.xxx.x:554/h264Preview_01_sub
  webrtc:
    candidates:
      - 192.168.x.xx
  ffmpeg:
    bin: ffmpeg
    volume: -af "volume=30dB"

cameras:
  doorbell: # <------ Name the camera
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:554/doorbell_sub # <----- The stream you want to use for detection
          input_args: preset-rtsp-restream
          roles:
            - detect
      hwaccel_args: preset-vaapi
    detect:
      enabled: false
    live:
      stream_name: doorbell_sub
version: 0.14

When it was working, I was able to enable the 2 way audio by pressing the mic button when the I click the stream (not present in the screenshot below):
image

go2rtc probe logs:

{
  "producers": [
    {
      "type": "RTSP passive producer",
      "url": "rtsp://127.0.0.1:554/b52f72440d887866f19d74553db9a685",
      "remote_addr": "127.0.0.1:59692",
      "user_agent": "ffmpeg/go2rtc",
      "sdp": "v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=No Name\r\nc=IN IP4 127.0.0.1\r\nt=0 0\r\na=tool:libavformat LIBAVFORMAT_VERSION\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAM6wVFKDgFWQ=,aO48sA==; profile-level-id=640033\r\na=control:streamid=0\r\nm=audio 0 RTP/AVP 97\r\na=rtpmap:97 MPEG4-GENERIC/16000/1\r\na=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1408\r\na=control:streamid=1\r\nm=audio 0 RTP/AVP 98\r\nb=AS:64\r\na=rtpmap:98 opus/48000/2\r\na=control:streamid=2\r\n",
      "medias": [
        "video, recvonly, H.264 High 5.1",
        "audio, recvonly, MPEG4-GENERIC/16000",
        "audio, recvonly, OPUS/48000/2"
      ],
      "receivers": [
        "96 H264, bytes=43972718, senders=3",
        "97 MPEG4-GENERIC/16000, bytes=1097331, senders=3",
        "98 OPUS/48000/2, bytes=2164591, senders=1"
      ],
      "recv": 47798976
    },
    {
      "url": "rtsp://XXXXXXXX:xxxxxxxxxxx@192.168.x.xx:554/h264Preview_01_sub"
    }
  ],
  "consumers": [
    {
      "type": "RTSP passive consumer",
      "url": "rtsp://127.0.0.1:554/doorbell_sub",
      "remote_addr": "127.0.0.1:59678",
      "user_agent": "FFmpeg Frigate/0.14.1-f4f3cfa",
      "sdp": "v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.2\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAM6wVFKDgFWQ=,aO48sA==; profile-level-id=640033\r\na=control:trackID=0\r\nm=audio 0 RTP/AVP 97\r\na=rtpmap:97 MPEG4-GENERIC/16000\r\na=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1408\r\na=control:trackID=1\r\n",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC"
      ],
      "senders": [
        "96 H264, bytes=43972718, receivers=1",
        "97 MPEG4-GENERIC/16000, bytes=1097331, receivers=1"
      ],
      "send": 45592609
    },
    {
      "type": "MSE/WebSocket active consumer",
      "remote_addr": "192.168.x.x, 172.30.32.1, 172.30.32.2, 127.0.0.1:55706",
      "user_agent": "[redacted]",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC, PCMA, PCMU, L16, PCML, OPUS"
      ],
      "senders": [
        "96 H264, bytes=30466883, receivers=1",
        "97 MPEG4-GENERIC/16000, bytes=759225, receivers=1"
      ],
      "send": 17914715
    },
    {
      "type": "probe",
      "remote_addr": "192.168.x.x, 172.30.32.1:58916",
      "user_agent": "[redacted]",
      "medias": [
        "video, sendonly, ALL",
        "audio, sendonly, ALL",
        "audio, recvonly, ANY"
      ],
      "senders": [
        "96 H264, bytes=0, receivers=1",
        "97 MPEG4-GENERIC/16000, bytes=0, receivers=1",
        "98 OPUS/48000/2, bytes=0, receivers=1"
      ]
    }
  ]
}

What could I check to troubleshoot?

@fatshotty
Copy link

@DMedina559

i have 2 docker container in the same stack:

  • go2rtc
  • frigate
    frigate points to go2rtc via "container name", indeed each camera works well. But I cannot use 2wayaudio on reolink doorbell :-/
    i dont use the internal go2rtc; i have a different container.

should i use the internal go2rtc instance?

@fatshotty
Copy link

Ok, using go2rtc integrated in frigate seems to be working. I see microphone button.
however it is not showing on HA-companion app, even with https link 🤔

@bagobones
Copy link

bagobones commented Oct 7, 2024

Ok, using go2rtc integrated in frigate seems to be working. I see microphone button. however it is not showing on HA-companion app, even with https link 🤔

Is your home assistant companion app Internal AND External URL set to use HTTPS, it is essentially a browser wrapper and if the HA site isn't HTTPS the mic will not appear.

Edit: to clarify both the frigate interface imbedded in HA, and the frigate custom card in HA work fine for me in the companion app and present the mic.

@fatshotty
Copy link

fatshotty commented Oct 8, 2024

thanks @bagobones
HA-companion works with an internal url in http (not S); I know it is a limitation for the mic. But my external url is https via cloudflare tunnel: even using external link, i cannot be able to see (and use) the mic icon in frigate card. It works only via chrome browser in https :/

EDIT: i see the mic button, but it doesnt work :/
I can click the button; it is enabled, but while talking -> no audio in doorbell :/

@rbray89
Copy link

rbray89 commented Oct 8, 2024

thanks @bagobones HA-companion works with an internal url in http (not S); I know it is a limitation for the mic. But my external url is https via cloudflare tunnel: even using external link, i cannot be able to see (and use) the mic icon in frigate card. It works only via chrome browser in https :/

EDIT: i see the mic button, but it doesnt work :/ I can click the button; it is enabled, but while talking -> no audio in doorbell :/

I dont think the Cloudflare tunnel will proxy the WebRTC comms. Those are often UDP on a negotiated port.

@Za-Sing
Copy link

Za-Sing commented Nov 13, 2024

Does anyone know if the new firmware v3.0.0.4110_2410111119 breaks 2-way audio? I am very skeptical about updating my firmware...

@pavolholes
Copy link

pavolholes commented Nov 13, 2024

Today I updated my Doorbel PoE to version v3.0.0.4110_2410111120 and two way audio is working for me. I’m on Frigate 0.14 with updated go2rtc 1.9.7, and fully updated latest Home Assistant.
Also I just tried via my CloudFlare Zero Trust tunnel (https) and it’s working fine inside HA iOS companion app via mobile data.

@Alfons-Hetler
Copy link

Today I updated my Doorbel PoE to version v3.0.0.4110_2410111120 and two way audio is working for me. I’m on Frigate 0.14 with updated go2rtc 1.9.7, and fully updated latest Home Assistant. Also I just tried via my CloudFlare Zero Trust tunnel (https) and it’s working fine inside HA iOS companion app via mobile data.

Can you share your config for me and other users?
Thanks

@vexersa
Copy link

vexersa commented Nov 18, 2024 via email

@pavolholes
Copy link

@Alfons-Hetler and @vexersa
sorry, busy days... here is my Frigate config:

go2rtc:
  streams:
    doorbell:
      - ffmpeg:https://192.168.x.x/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user={FRIGATE_CAMERA_USERNAME}&password={FRIGATE_CAMERA_PASSWORD}
      - rtsp://{FRIGATE_CAMERA_USERNAME}:{FRIGATE_CAMERA_PASSWORD}@192.168.x.x:554/Preview_01_sub
      - ffmpeg:doorbell#audio=opus     # required by WebRTC; this doesn't work: [audio=volume]
    doorbell_clear:
      - ffmpeg:https://192.168.2.220/flv?port=1935&app=bcs&stream=channel0_main.bcs&user={FRIGATE_CAMERA_USERNAME}&password={FRIGATE_CAMERA_PASSWORD}
      - "ffmpeg:doorbell_clear#audio=opus" # required by WebRTC
	  
cameras:
  doorbell: # REOLINK DOORBELL firmware v3.0.0.4110_2410111120 # 2024-11-13 update from: v3.0.0.2033_23041302
    enabled: true
    detect:
      # HTTPS stream size
      width: 896
      height: 672
      # RTSP stream size
      # width: 640
      # height: 480
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-aac
      inputs:
        - path: rtsp://127.0.0.1:8554/doorbell?video=copy
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/doorbell_clear?video&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record

@Chaoscontrol
Copy link

Chaoscontrol commented Nov 20, 2024

I managed to get my WiFi doorbell working with 2-way audio both using RTSP and FLV after a lot of playing around.

  streams:
    doorbell: # Reolink Doorbell WiFi
      - rtsp://admin:password@192.168.1.232:554/h264Preview_01_main
      - ffmpeg:doorbell#audio=aac#audio=volume
      - ffmpeg:doorbell#audio=opus#audio=volume # Opus required for 2-way audio
    doorbell2: # Reolink Doorbell WiFi
      - ffmpeg:http://192.168.1.232/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password#video=copy#audio=copy#audio=opus
      - rtsp://admin:password@192.168.1.232:554/h264Preview_01_sub

This is the RTSP one:

{
  "producers": [
    {
      "type": "RTSP active producer",
      "url": "rtsp://192.168.1.232/Preview_01_main/",
      "remote_addr": "192.168.1.232:554",
      "user_agent": "go2rtc/1.9.2",
      "sdp": "v=0\r\no=- 1732112657495355 1 IN IP4 192.168.1.232\r\ns=Session streamed by \"preview\"\r\nt=0 0\r\na=tool:BC Streaming Media v202210012022.10.01\r\na=type:broadcast\r\na=control:*\r\na=range:npt=now-\r\na=x-qt-text-nam:Session streamed by \"preview\"\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\nb=AS:8192\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==\r\na=recvonly\r\na=control:track1\r\nm=audio 0 RTP/AVP 97\r\nc=IN IP4 0.0.0.0\r\nb=AS:8192\r\na=rtpmap:97 MPEG4-GENERIC/16000\r\na=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408\r\na=recvonly\r\na=control:track2\r\nm=audio 0 RTP/AVP 0\r\na=control:track3\r\na=rtpmap:0 PCMU/8000\r\na=sendonly",
      "medias": [
        "video, recvonly, H.264 High 5.1",
        "audio, recvonly, MPEG4-GENERIC/16000",
        "audio, sendonly, PCMU/8000"
      ],
      "receivers": [
        "96 H264, bytes=2794454, senders=1",
        "97 MPEG4-GENERIC/16000, bytes=12864, senders=1"
      ],
      "recv": 2831834
    },
    {
      "url": "ffmpeg:doorbell#audio=aac#audio=volume"
    },
    {
      "url": "ffmpeg:doorbell#audio=opus#audio=volume"
    }
  ],
  "consumers": [
    {
      "type": "MSE/WebSocket active consumer",
      "remote_addr": "192.168.1.134, 127.0.0.1:54218",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC, PCMA, PCMU, L16, PCML, OPUS"
      ],
      "senders": [
        "96 H264, bytes=2794454, receivers=1",
        "97 MPEG4-GENERIC/16000, bytes=12864, receivers=1"
      ],
      "send": 2789512
    }
  ]
}

And this is the FLV setup:

{
  "producers": [
    {
      "type": "RTSP passive producer",
      "url": "rtsp://127.0.0.1:8554/19f7afa4cfc3487734b671f9ea12bfab",
      "remote_addr": "127.0.0.1:35958",
      "user_agent": "ffmpeg/go2rtc",
      "sdp": "v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=No Name\r\nc=IN IP4 127.0.0.1\r\nt=0 0\r\na=tool:libavformat 61.1.100\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==; profile-level-id=640033\r\na=control:streamid=0\r\nm=audio 0 RTP/AVP 97\r\na=rtpmap:97 MPEG4-GENERIC/16000/1\r\na=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1408\r\na=control:streamid=1\r\nm=audio 0 RTP/AVP 98\r\nb=AS:64\r\na=rtpmap:98 opus/48000/2\r\na=control:streamid=2\r\n",
      "medias": [
        "video, recvonly, H.264 High 5.1",
        "audio, recvonly, MPEG4-GENERIC/16000",
        "audio, recvonly, OPUS/48000/2"
      ],
      "receivers": [
        "96 H264, bytes=633010961, senders=2",
        "97 MPEG4-GENERIC/16000, bytes=3163150, senders=2",
        "98 OPUS/48000/2, bytes=7150363, senders=0"
      ],
      "recv": 649150942
    },
    {
      "url": "rtsp://admin:Pelea2x2x2@192.168.1.232:554/h264Preview_01_sub"
    }
  ],
  "consumers": [
    {
      "type": "RTSP passive consumer",
      "url": "rtsp://127.0.0.1:8554/doorbell2",
      "remote_addr": "127.0.0.1:35874",
      "user_agent": "FFmpeg Frigate/0.15.0-e76f4e9",
      "sdp": "v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.2\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAM6wVFKAoAPGQ,aO48sA==; profile-level-id=640033\r\na=control:trackID=0\r\nm=audio 0 RTP/AVP 97\r\na=rtpmap:97 MPEG4-GENERIC/16000\r\na=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1408\r\na=control:trackID=1\r\n",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC"
      ],
      "senders": [
        "96 H264, bytes=633010961, receivers=1",
        "97 MPEG4-GENERIC/16000, bytes=3163150, receivers=1"
      ],
      "send": 643280447
    },
    {
      "type": "MSE/WebSocket active consumer",
      "remote_addr": "192.168.1.134, 127.0.0.1:51658",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC, PCMA, PCMU, L16, PCML, OPUS"
      ],
      "senders": [
        "96 H264, bytes=26719617, receivers=1",
        "97 MPEG4-GENERIC/16000, bytes=132985, receivers=1"
      ],
      "send": 26921796
    }
  ]
}

But I have a few questions.

  1. When debugging on go2rtc, I thought what told me if 2-way audio was working was the line "audio, sendonly, PCMU/8000". That is present in the RTSP camera, but not in the FLV one. Why? What am I looking for in the probe to check it's working?
  2. When using Frigate via HA, via https, the mic button appears in both cameras. But when activated, the video goes off. I can still send audio and it's heard on the doorbell. As soon as I disable the mic, the stream reappears. Is it because WebRTC video is not working when accessed externally?
  3. Can someone help me understand what the rtsp://admin:password@192.168.1.232:554/h264Preview_01_sub stream is in the FLV camera? If opus is what's needed for WebRTC, and that is being encoded from the FLV url, why the need for a second RTSP sub stream for the audio (that's what Frigate docs say)?

I use PIPup on android TV and use Home Assistant to trigger a picture in picture feed when the doorbell rings. I am just using rtsp, I am not using FLV on any of my newer reolink devices.

@bagobones Mind sharing how do you call the PIPup HA action? I'm trying camera URLs, but can't make it work. I'm ALMOST there.

@bagobones
Copy link

@bagobones Mind sharing how do you call the PIPup HA action? I'm trying camera URLs, but can't make it work. I'm ALMOST there.

Note there seem to be various forks of PIPup with the original being broken IIRC, I don't recall which one I ended up using.

Setup a rest command


pipup_url_on_tv:
  # Use with Webrtc camera as described here:
  # https://github.com/AlexxIT/WebRTC/wiki/Cast-or-share-camera-stream#html-page
  url: http://{{ ip }}:{{ port | default(7979) }}/notify
  content_type: 'application/json'
  verify_ssl: false
  method: 'post'
  timeout: 20
  payload: >
    {
      "duration": {{ duration | default(20) }},
      "position": {{ position | default(0) }},
      "title": "{{ title | default('') }}",
      "titleColor": "{{ titleColor | default('#50BFF2') }}",
      "titleSize": {{ titleSize | default(12) }},
      "message": "{{ message }}",
      "messageColor": "{{ messageColor | default('#fbf5f5') }}",
      "messageSize": {{ messageSize | default(14) }},
      "backgroundColor": "{{ backgroundColor | default('#0f0e0e') }}",
      "media": { 
        "web": {
          "uri": "{{ url }}", 
          "width": {{ width | default(1024) }},
          "height": {{ height | default(576) }}
        }
      }
    }


Automation call in HA with the direct go2rtc URL to the camera stream.

data:
  ip: 192.168.1.9
  duration: 15
  url: http://frigate:1984/stream.html?src=doorbell_sub
action: rest_command.pipup_url_on_tv

@Chaoscontrol
Copy link

Chaoscontrol commented Nov 20, 2024

Amazing! Thanks!

I'm using the original PIPup app as it's the only apk I could find. The fork doesn't have it available atm. It's working fine though.

I managed to make it work using this amazing tutorial: https://seanblanchfield.com/2023/06/realtime-pip-cameras-on-tv-with-home-assistant-v2

But tbh for this use case your URL works straight away without the need of WebRTC or it's action to create a link.

My only bother now is that the notification shows perfect and instant, but the stream takes a couple seconds to load. See here. . Ignore the RTC/MSE switch. It does the same when loading directly into MSE. Were you able to reduce/remove this load time?

@bagobones
Copy link

bagobones commented Nov 20, 2024

Were you able to reduce/remove this load time?

Sorry I just realized I have two automations one FORCES WebRTC which reduces load time, the first URL does detection which is a little slower..

I will also note I intentionally use the SUB stream as it is smaller and seems to load faster.

data:
  ip: 192.168.1.9
  duration: 20
  url: http://frigate:1984/stream.html?src=doorbell_sub&mode=webrtc
  width: 640
  height: 480
action: rest_command.pipup_url_on_tv

@Chaoscontrol
Copy link

I have 3 differences:

  • Atm I'm not able to use RTC for some reason. It just won't load. It's a different issue I'm debugging.
  • In my case I cannot use frigate as host either, I need to use the IP. I don't think this makes any difference. Unsure why your Chromecast is able to resolve the host name but not mine.
  • I'm trying to use the sub stream using FLV and not RTSP but can't make it work. go2rtc log shows no error, but probe is empty. This is the url I'm using:
doorbell_sub:
  - ffmpeg:http://192.168.1.232/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=redacted&password=redacted

@bagobones
Copy link

Ya my host is literally named frigate, that is just specific to my config. Also in my case I am not using a chrome cast but a Google TV is my target. so it may be slightly different. Both sort of out of scope here.

FYI I DON'T use the FLV stream I use RTSP, other than a frame drop here or there it works fine as long as you aren't on really old firmware on the doorbell.

  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
    doorbell_sub: #Reolink Doorbell
      - rtsp://admin:{FRIGATE_RTSP_PASSWORD}@192.168.103.6:554/h264Preview_01_sub
      - ffmpeg:doorbell_sub#audio=opus   # transcodes audio to opus for webrtc compatibility

@Chaoscontrol
Copy link

So... somehow I managed to make RTC work. No clue how but it works.
Now I've done these 2 for testing:

    doorbell_sub:
      - rtsp://admin:redacted@192.168.1.232:554/h264Preview_01_sub
      - ffmpeg:doorbell#audio=opus#audio=volume
    doorbell_sub_flv:
      - ffmpeg:http://192.168.1.232/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=redacted#video=copy#audio=copy#audio=opus

Which turns into these 2 links:
http://192.168.1.158:1984/stream.html?src=doorbell_sub&mode=webrtc
http://192.168.1.158:1984/stream.html?src=doorbell_sub_flv&mode=webrtc

Both of them work on RTC when opening in the PC. But when sending them to PIPup, only the first one loads. The FLV one won't load for some reason. No clue.

Also, it's true that the load delay was reduced a bit, but it's still noticeable. Is it that way for you? Any chance you can record it?

@bagobones
Copy link

Both of them work on RTC when opening in the PC. But when sending them to PIPup, only the first one loads. The FLV one won't load for some reason. No clue.

Try this instead

    doorbell_sub_flv:
      - ffmpeg:http://192.168.1.232/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=redacted#video=copy#audio=copy
      - ffmpeg:doorbell_sub_flv#audio=opus

@Chaoscontrol
Copy link

Try this instead

    doorbell_sub_flv:
      - ffmpeg:http://192.168.1.232/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=redacted#video=copy#audio=copy
      - ffmpeg:doorbell_sub_flv#audio=opus

I tried, but no difference. One attempt it actually loaded after like 10s or so, but then it didn't happen again. I'll leave it like that since the YAML looks cleaner to me.
Any chance you can record yours to see if I can achieve less delay?

@bagobones
Copy link

I don't use the FLV stream.

Make sure your I frame setting is set to 1x on the doorbell for both streams . That impacts delay the most on the camera side.

@Chaoscontrol
Copy link

image
Yeah, I adjusted the main stream that I had on 2x, but still the one I'm sending is the sub stream anyway, and that was 1x already.

I know, I'm also using the sub RTSP now, but there's still a decent time to load. That's what I'd like to see yours. Maybe it's the best it can be and I'm worrying over nothing. Can you record it?

@bagobones
Copy link

bagobones commented Nov 21, 2024

Maybe it's the best it can be and I'm worrying over nothing. Can you record it?

Record what?

How long http://xxxxxxx:1984/stream.html?src=doorbell_sub&mode=webrtc takes to load?

it is variable, cold (after a frigate/go2rtc reboot) can take 7s, however after I have loaded it once the next load tends to be more like 3s or less sometimes near instant.

@Chaoscontrol
Copy link

Record what?

I mean a video like this one, showing the notification loading the stream. This one is the sub stream on RTSP, on 1x. Just want to know if I can get better than that.

@bagobones
Copy link

Record what?

I mean a video like this one, showing the notification loading the stream. This one is the sub stream on RTSP, on 1x. Just want to know if I can get better than that.

That is as fast as I have ever gotten.

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