AlexxIT / WebRTC

Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.
https://github.com/AlexxIT/Blog
MIT License
1.54k stars 181 forks source link

webrtc card issue with vlan #769

Closed kei81131 closed 2 weeks ago

kei81131 commented 2 weeks ago

Hi Alex, some background Perviously frigate, go2rtc and ha both lived in vlan 10 and works perfectly, Thank you very much for your great job!!! <( )>

I've moved frigate and go2rtc to vlan tagged 50, while user vlan tagged 10 I use openwrt router and set both vlan 10 and 50 forward each other

I can watch rtsp stream using iphone vlc app in vlan 10

rtsp://<go2rtc_ip>:8554/cam1

However I cannot watch by using ha webrtc card when I am in vlan 10 (both ha and iphone are in vlan 10) that keeps "loading... " on the top right corner

type: custom:webrtc-camera
url: rtsp://<go2rtc_ip>:8554/cam1
mode: webrtc,webrtc/tcp

When iphone is in vlan 50 (which is same vlan with go2rtc) or turned off iphone's wifi using external url the access ha I can see webrtc stream (I've followed the instructions for external access webrtc, port forwarded)

ps. webrtc card use mode mse can watch stream, but that have some limits such as no 2 way audio and I can not digital ptz on iphone, so I prefer to use just webrtc

Does anyone have any idea? Thank you.

AlexxIT commented 2 weeks ago

WebRTC on different networks is always a complicated thing. Maybe this will help you: https://github.com/AlexxIT/go2rtc/blob/master/internal/webrtc/README.md

kei81131 commented 2 weeks ago

WebRTC on different networks is always a complicated thing. Maybe this will help you: https://github.com/AlexxIT/go2rtc/blob/master/internal/webrtc/README.md

Thanks for the information. ^_^ This let me know more about tcp and udp

And would like to share that I've successfully watched webrtc in vlan 10 while go2rtc in vlan 50

Similar to external access port forward, I added one more firewall port forward, which is from vlan10 port to vlan 50 port