docker-wyze-bridge icon indicating copy to clipboard operation
docker-wyze-bridge copied to clipboard

2.9.0 suddenly causes poor connection to cameras

Open vipergts450 opened this issue 9 months ago • 16 comments

Hello,

I upgraded to 2.9.0 yesterday and suddenly the connections from the bridge to my two cameras is very unstable. The log has these messages every couple of seconds. I have ON_DEMAND=False set in my config but that did not help. Nothing about my configuration changed since the prior version which had been rock solid.

Possible related to this person's issue: https://github.com/mrlt8/docker-wyze-bridge/issues/1186#issuecomment-2106408697

2024-05-13T16:13:03.196702946Z  * Serving Flask app 'frontend'
2024-05-13T16:13:03.196970160Z [WyzeBridge] 📚 Using 'auth' from local cache...
2024-05-13T16:13:03.197045726Z  * Debug mode: off
2024-05-13T16:13:03.198131787Z [WyzeBridge] 📚 Using 'user' from local cache...
2024-05-13T16:13:03.199037258Z [WyzeBridge] 📚 Using 'cameras' from local cache...
2024-05-13T16:13:03.199659505Z [WyzeBridge] 🪄 FILTER ALLOWING: 2 of 3 cams
2024-05-13T16:13:03.200873864Z [WyzeBridge] [+] Adding cam1 [WYZE_CAKP2JFUS]
2024-05-13T16:13:03.203321704Z [WyzeBridge] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
2024-05-13T16:13:03.203474466Z  * Running on all addresses (0.0.0.0)
2024-05-13T16:13:03.203525782Z  * Running on http://127.0.0.1:5000
2024-05-13T16:13:03.203571620Z  * Running on http://172.23.0.2:5000
2024-05-13T16:13:03.203615671Z [WyzeBridge] Press CTRL+C to quit
2024-05-13T16:13:03.215488053Z [WyzeBridge] [+] Adding cam2 [WYZECP1_JEF]
2024-05-13T16:13:03.216297232Z [WyzeBridge] starting MediaMTX 1.1.1
2024-05-13T16:13:03.217069413Z [WyzeBridge] 🎬 2 streams enabled
2024-05-13T16:13:04.205027178Z [WyzeBridge] 172.23.0.1 - - [13/May/2024 16:13:04] "GET /api/sse_status HTTP/1.1" 200 -
2024-05-13T16:13:04.218120477Z [WyzeBridge] 🎉 Connecting to WyzeCam V3 - cam1 on 192.168.2.52
2024-05-13T16:13:04.245859903Z [WyzeBridge] 🎉 Connecting to WyzeCam Pan - cam2 on 192.168.2.50
2024-05-13T16:13:06.272797673Z [cam1] 📡 Getting 180kb/s HD stream (H264/20fps) via LAN mode (WiFi: 92%) FW: 4.36.11.8391 🔒
2024-05-13T16:13:06.273624367Z [cam1] 🔊 Audio Enabled - ALAW > AAC/16,000Hz
2024-05-13T16:13:06.351398248Z [cam2] 📡 Getting 180kb/s HD stream (H264/15fps) via LAN mode (WiFi: 97%) FW: 4.10.9.3006 🔒
2024-05-13T16:13:06.352678972Z [cam2] 🔊 Audio Enabled - MULAW > AAC/8,000Hz
2024-05-13T16:13:06.370007139Z [cam1] WARNING: Skipping wrong frame_size at start of stream [frame_size=1]
2024-05-13T16:13:06.446627324Z [cam2] WARNING: Skipping wrong frame_size at start of stream [frame_size=1]
2024-05-13T16:13:06.980112380Z [WyzeBridge] ✅ '/cam2 stream is UP! (3/3)
2024-05-13T16:13:07.438466197Z [WyzeBridge] 📖 New client reading from cam2
2024-05-13T16:13:08.033675802Z [WyzeBridge] ✅ '/cam1 stream is UP! (3/3)
2024-05-13T16:13:08.153190291Z [WyzeBridge] 📖 New client reading from cam2
2024-05-13T16:13:08.448102057Z [WyzeBridge] 📖 New client reading from cam1
2024-05-13T16:13:08.615706720Z [WyzeBridge] 📕 Client stopped reading from cam2
2024-05-13T16:13:09.649123751Z [WyzeBridge] 📖 New client reading from cam1
2024-05-13T16:13:10.017194505Z [WyzeBridge] 📕 Client stopped reading from cam1
2024-05-13T16:13:10.422995827Z [WyzeBridge] 📖 New client reading from cam1
2024-05-13T16:13:11.232538143Z [WyzeBridge] 📕 Client stopped reading from cam1
Config lines:
version: '2.4'
services:
    wyze-bridge:
        container_name: wyze-bridge
        restart: unless-stopped
        image: mrlt8/wyze-bridge:latest
        ports:
            - 1936:1935 # RTMP
            - 8555:8554 # RTSP
            - 8888:8888 # HLS
            - 8889:8889 #WebRTC
            - 8189:8189/udp # WebRTC/ICE
            - 8002:5000 # WEB-UI
        environment:
            # [OPTIONAL] (Can be set in the WebUI):
            - WYZE_EMAIL=xxxx
            - WYZE_PASSWORD=xxxx
            # [OPTIONAL] IP Address of the host to enable WebRTC e.g.,:
            - WB_IP=192.168.2.4
            - WB_API=xxxx
            # [OPTIONAL] Wyze API credentials:
            - API_ID=xxxx
            - API_KEY=xxxx
            - ENABLE_AUDIO=True
            - AUDIO_CODEC=AAC
            - FILTER_NAMES=cam1, cam2
            - SUBSTREAM=False
            - NET_MODE=LAN
            - ON_DEMAND=False

Could this be a port mapping issue that arose with the latest update? I don't see any log lines that suggest the bridge is losing the feed from the cameras, but seemingly clients connecting externally to the bridge to retrieve the feeds have this constant connect/disconnect problem.

The choppy stream, timeout when fetching snapshot on the WebUI (the auto refresh sometimes pulls a new snapshot image and sometimes does not for 15-20min), and general misbehavior seems to point to something between the front-end and the mediamtx backend, but I can't seem to figure out what exactly.

vipergts450 avatar May 13 '24 16:05 vipergts450