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

Reolink Video Doorbell discussion #331

luisiam opened this issue Apr 4, 2023 · 331 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.

@a-d-r-i-a-n-d
Copy link

Indeed HTTPS is also a requirement for 2-way audio to work.

@AlexxIT
Copy link
Owner

AlexxIT commented Aug 21, 2024

Browsers disable mic for HTTP sites. This is default behaviour. Hass mobile app is also a browser.

@vexersa
Copy link

vexersa commented Aug 21, 2024

Browsers disable mic for HTTP sites. This is default behaviour. Hass mobile app is also a browser.

This makes sense, reverse proxy it is. Do you know if webrtc is required if SSL is present?

@vexersa
Copy link

vexersa commented Aug 21, 2024

Thanks @a-d-r-i-a-n-d ,
Is your config similar to this (assuming you are using the Frigate card?):
image
Config:

type: custom:frigate-card
cameras:
  - camera_entity: camera.outside_gate_doorbell_v1_1
    live_provider: go2rtc
    icon: mdi:gate
live:
  draggable: false
  zoomable: false
  controls:
    builtin: true
    next_previous:
      style: none
    thumbnails:
      mode: none
  layout:
    fit: contain
  auto_unmute: selected
  preload: false
  lazy_load: false
  transition_effect: none
  show_image_during_load: false
  microphone:
    always_connected: true
performance:
  features:
    animated_progress_indicator: false
  style:
    border_radius: false
    box_shadow: false
timeline:
  show_recordings: false
menu:
  style: overlay
  buttons:
    frigate:
      enabled: false
    cameras:
      enabled: false
    live:
      enabled: false
    snapshots:
      enabled: false
    clips:
      enabled: false
    media_player:
      enabled: false
    microphone:
      enabled: true
      priority: 60
      type: toggle
    mute:
      enabled: true
      priority: 55
    screenshot:
      enabled: false
    timeline:
      enabled: false
    fullscreen:
      icon: mdi:overscan
  alignment: right
  position: top
  button_size: 70

My mic button does nothing, should it toggle on and off? I'd have thought so.

My microphone icon looked like that (and did not work) when is was accessing home assistant locally (and therefore using HTTP and by IP). If I changed to using my external URL (HTTPS) it worked ok.

Thank you 🙏

I will try and do this and update the thread if it works.

@AlexxIT
Copy link
Owner

AlexxIT commented Aug 21, 2024

Do you know if webrtc is required if SSL is present?

WebRTC can work on HTTP sites.

@AlexxIT
Copy link
Owner

AlexxIT commented Aug 23, 2024

@b0ddu
Copy link

b0ddu commented Aug 27, 2024

I'm able use the reolink doorbell flv with two way audio using go2rtc webrtc-camera card.
Anyone successfully able to cast the video using notify on android/chromecast screens?

@luisiam
Copy link
Author

luisiam commented Aug 27, 2024

I'm able use the reolink doorbell flv with two way audio using go2rtc webrtc-camera card. Anyone successfully able to cast the video using notify on android/chromecast screens?

I use dashcast that comes with webrtc camera integration and I can cast it to any nest hub or chromecast w/ google tv.

@bagobones
Copy link

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.

@AlexxIT
Copy link
Owner

AlexxIT commented Aug 29, 2024

Reolink RTSP problem depends on device firmware. They know how to fix it. But the firmware upgrade process is laid out horribly. Only by contacting technical support.

@bagobones
Copy link

bagobones commented Aug 29, 2024

The current public firmware for the black wifi doorbell fully works over RTSP and has working two way

The duo2 poe also fully works over RTSP.

@vexersa
Copy link

vexersa commented Aug 29, 2024

The current public firmware for the black wifi doorbell fully works over RTSP and has working two way

The duo2 poe also fully works over RTSP.

Would it be possible to share your config please? 🙏

I've tried many different configs and I just can't get the two way audio to work. I can hear the audio from the doorbell, but can't send audio back to it.

@n3xus1
Copy link

n3xus1 commented Aug 29, 2024

The current public firmware for the black wifi doorbell fully works over RTSP and has working two way
The duo2 poe also fully works over RTSP.

Would it be possible to share your config please? 🙏

I've tried many different configs and I just can't get the two way audio to work. I can hear the audio from the doorbell, but can't send audio back to it.

This is my lovelace card config that works for me

type: custom:frigate-card
cameras:
  - camera_entity: camera.front_door
    engine: frigate
    live_provider: go2rtc
    icon: mdi:doorbell-video
    go2rtc:
      modes:
        - webrtc
live:
  transition_effect: slide
  microphone:
    always_connected: true
  controls:
    builtin: true
    title:
      mode: none
  show_image_during_load: false
  preload: true
  zoomable: false
  auto_mute: all
view:
  default: live
dimensions:
  aspect_ratio_mode: static
  aspect_ratio: '4:3'
menu:
  style: overlay
  buttons:
    microphone:
      enabled: true
      type: toggle
    frigate:
      enabled: false
    cameras:
      enabled: false
    substreams:
      enabled: false
    clips:
      enabled: true
    timeline:
      enabled: false
    mute:
      enabled: false
timeline:
  enabled: false

@ltctceplrm
Copy link

ltctceplrm commented Sep 6, 2024

I've got 2 way audio working with the frigate lovelace card but when I try to play an audio file whether it's through webrtc or on the go2rtc server inside frigate (port 1984) it just doesn't work. This is what the logs say:

[api] POST /api/streams?dst=Doorbell&src=ffmpeg%3Ahttps%3A%2F%2Ffile-examples.com%2Fstorage%2Ffef44df12666d835ba71c24%2F2017%2F11%2Ffile_example_MP3_700KB.mp3%23audio%3Dpcma%23input%3Dfile 192.168.23.77:49967

[exec] run url=exec:ffmpeg -hide_banner -v error -re -i https://file-examples.com/storage/fef44df12666d835ba71c24/2017/11/file_example_MP3_700KB.mp3 -c:a pcm_alaw -ar:a 8000 -ac:a 1 -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/5c672577da7911e16aaef7f4e26da2fc cmd=ffmpeg -hide_banner -v error -re -i https://file-examples.com/storage/fef44df12666d835ba71c24/2017/11/file_example_MP3_700KB.mp3 -c:a pcm_alaw -ar:a 8000 -ac:a 1 -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/5c672577da7911e16aaef7f4e26da2fc

And chrome console gives

links.html?src=Doorbell:98
POST http://192.168.23.55:1984/api/streams?dst=Doorbell&src=ffmpeg%3Ahttps%3A%2F%2Ffile-examples.com%2Fstorage%2Ffef44df12666d835ba71c24%2F2017%2F11%2Ffile_example_MP3_700KB.mp3%23audio%3Dpcma%23input%3Dfile 500 (Internal Server Error)

Does anyone have an idea why it won't work?

Edit: I manually updated the go2rtc binary in frigate and now I can send an mp3 through this url: http://192.168.23.55:1984/api/ffmpeg?dst=Doorbell&file=https://file-examples.com/storage/fef44df12666d835ba71c24/2017/11/file_example_MP3_700KB.mp3 it looks like the format changed but it does work now.

The only thing I still need to get working is using webrtc as a media player in home assistant

@tasiotas
Copy link

I'm able use the reolink doorbell flv with two way audio using go2rtc webrtc-camera card. Anyone successfully able to cast the video using notify on android/chromecast screens?

@b0ddu could you share your go2rtc.yaml config? I can only get 2way audio on rtsp, not flv.

streams:
    doorbell_main:
        - rtsp://admin:[email protected]:554/h264Preview_01_main
        - ffmpeg:doorbell_main#audio=opus
    doorbell_main_flv:
        - http://192.168.1.20/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=qwert1234
        - ffmpeg:doorbell_main_flv#audio=opus

@fatshotty
Copy link

Hi, i'm not able to use 2-way-audio with my Reolink Doorbell wifi (white).
Any news about that? anyone can use 2-w-a?

thanks in advance

@DMedina559
Copy link

Hi, i'm not able to use 2-way-audio with my Reolink Doorbell wifi (white). Any news about that? anyone can use 2-w-a?

thanks in advance

Have you read the thread? There's many configurations you can use. Also make sure you're using https not http

@fatshotty
Copy link

Have you read the thread? There's many configurations you can use. Also make sure you're using https not http

yes, i have
i'm also use http/https and skip chrome security.
Using link via webrtc I see micrphone enabled on browser, but no audio: from doorbel to pc, nor from pc to doorbell. No audio.
I added doorbell stream using http:// .... flv?port=1935&app=bcs&stream.....` ; go2rtc correctly uses that link but no audio via webrtc and no 2-way-audio via any other link :/

did i miss somenthing? 🤔

@DMedina559
Copy link

DMedina559 commented Oct 3, 2024

Have you read the thread? There's many configurations you can use. Also make sure you're using https not http

yes, i have i'm also use http/https and skip chrome security. Using link via webrtc I see micrphone enabled on browser, but no audio: from doorbel to pc, nor from pc to doorbell. No audio. I added doorbell stream using http:// .... flv?port=1935&app=bcs&stream.....` ; go2rtc correctly uses that link but no audio via webrtc and no 2-way-audio via any other link :/

did i miss somenthing? 🤔

Do you have a rtsp stream configured also? I don't think the flv stream supports two way audio

@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:[email protected]: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:[email protected]: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.

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