mrlt8 / docker-wyze-bridge

WebRTC/RTSP/RTMP/LL-HLS bridge for Wyze cams in a docker container
GNU Affero General Public License v3.0
2.45k stars 151 forks source link

RTMP port change doesn't seem to work / WebRTC Camera HACS addon port conflict #1267

Open RyanEwen opened 1 week ago

RyanEwen commented 1 week ago

Describe the bug

After updating docker-wyze-bridge and Home Assistant today I started getting an error from MediaMTX that port 8554 is already in use. netstat was able to reveal that go2rtc from the WebRTC HACS addon for Home Assistant was using the same port.

I found that I if I start docker-wyze-bridge before starting Home Assistant, then all seems fine on the surface. I'm sure it breaks something in the WebRTC Camera addon and I just haven't noticed.

I am not sure if this issue is actually new, or if I had been starting docker-wyze-bridge first by sheer luck all this time before now.

In attempt to allow the WebRTC HACs addon to use 8554, I decided to try trlling docker-wyze-bridge to use 8664. This seems like it should be as simple as the following in my docker-compose.yml:

    environment:
      - MTX_RTSPADDRESS=:8664
      - WB_RTSP_URL=rtsp://192.168.2.10:8664/

However, after recreating the container, RTSP streams are not accessible from within the Web UI nor external software. MediaMTX no longer complains about the port being in use, and netstat confirms that it's running on 8665. The WebUI also shows the updated port. There are no errors in the log. In fact it never sees the request for the stream at all.

Environment (if applicable)

RyanEwen commented 1 week ago

It occurs to me that if docker-wyze-bridge now supports outputting WebRTC then I shouldn't need the WebRTC Camera HACS addon anymore, should I? I'm not sure what kind of card I would use in HA to display a native WebRTC stream, though.

mrlt8 commented 1 week ago

You need to change the external port that the container is using (you should be able to find it lower down on the config) and not MTX_RTSPADDRESS which will change the port that mtx is using inside the wyze bridge container.

RyanEwen commented 1 week ago

I am using host networking (I should have mentioned that somewhere other than the end of the post sorry)