#Help to use webRTC externally

23 messages · Page 1 of 1 (latest)

alpine flare
#

Trying to follow the docs here: https://github.com/AlexxIT/go2rtc#module-webrtc

I want to be able to use webRTC even when accessing Frigate/HA from my own domain. Mainly because it's using https, and that's required to use 2-way audio. Which is a bit confusing, as 2-way audio also requires webRTC and webRTC won't work on https unless I do this.

  • WebRTC works and loads fine when accessing locally. (using webRTC card to check, since new Frigate doesn't say which mode it's using). It doesn't load when accessing via my domain on https.
  • I've opened the 8555 port, see pic.
  • I have fixed IP.
  • I have added the following into my Frigate config
  • go2rtc logs attached.
  • Most errors are related to unplugged camera atm (bedroom).
go2rtc:
  streams:
    doorbell: ...
  
  webrtc:
    candidates:
      - <myfixedip>:8555 # Enable WebRTC via HTTP/S and not only locally.

What am I doing wrong/missing?

polar turret
#

you'll need to make sure the home network and the external network are not on a symmetric NAT

alpine flare
polar turret
#

it is not possible to work that way if you have a symmetric NAT

#

at least as far as I know

alpine flare
#

🤮

#

Alternatives? Or I'm just banned from using webRTC outside/via domain?

polar turret
#

you can try doing it on a computer in chrome and open chrome://webrtc-internals and it should show why it is not working

#

the alternative to ip / port would be using ngrok

alpine flare
polar turret
#

just open it and then try to use webrtc by enabling the microphone button in frigate ui, then press download dump

#

you can share it here but it would likely show the ip address

alpine flare
#

I'll delete it later on

#

not sure why it shows so many instances tho, or if it's dumping them all. I didn't see anything useful in the prev dump

#

This one seems more useful. Closed and reopened browser and now I picked the right one.

alpine flare
#

I have no idea what I did. But now it works.

I tried with ngrok but wasn't able to make it work. And just after some Frigate restart, I checked and suddenly RTC started loading fine both locally and externally. No clue.

Even with the symmetrical NAT. Only thing done since the beginning was opening the port 8555, and adding

webrtc:
    candidates:
      - myip:8555

to go2rtc.
For some reason it didn't work at first, but at some point it started to work without any more changes. 🤷‍♂️

alpine flare
#

Now it doesn't work again.

alpine flare
#

It seems to work intermittently. The RTSP sub seems to be the most consistent and quick to connect. But I've seen both FLV ones connecting once in a while.

If it manages to connect, even briefly, it means the technology issue is overcome (Symetrical NAT and all).

Just need to figure out why they are not reliable.

4 identical cards forcing RTC.

sections:
  - type: grid
    cards:
      - type: heading
        icon: ""
        heading: FLV main
        heading_style: title
      - type: custom:webrtc-camera
        streams:
          - url: doorbell
            mode: webrtc
            media: video,audio,microphone
      - type: heading
        icon: ""
        heading: RTSP main
        heading_style: title
      - type: custom:webrtc-camera
        streams:
          - url: doorbell_rtsp
            mode: webrtc
            media: video,audio,microphone
  - type: grid
    cards:
      - type: heading
        icon: ""
        heading: RTSP sub
        heading_style: title
      - type: custom:webrtc-camera
        streams:
          - url: doorbell_sub
            mode: webrtc
            media: video,audio,microphone
      - type: heading
        icon: ""
        heading: FLV sub
        heading_style: title
      - type: custom:webrtc-camera
        streams:
          - url: doorbell_sub_flv
            mode: webrtc
            media: video,audio,microphone
polar turret
#

I'm less able to help as I'm not familiar with the Frigate card

#

I just use Frigate itself as an app

alpine flare
#

That's not the Frigate card. It's the webRTC one. And I'm just using it as to test the RTC connection, since the Frigate UI doesn't allow me to see or force the mode quickly.

#

Also using Frigate adds more uncertainty to the debugging. Often Frigate shows no frames, but the stream is working just fine, so I was just looking for a way to be able to test RTC reliably and quickly and compare.