docker-wyze-bridge
docker-wyze-bridge copied to clipboard
Performance issue on 6 cameras
Try to troubleshoot for performance for 6 cameras, [docker-wyze-bridge] v2.3.13 wyze bridge video view is acceptable, but homekit video is unusable, rule out cpu, memory, network bottleneck, where can i find performance issue?
Probably a network issue. The wyze cams tend to flood the wifi which can cause issues. IGMP and multicast related configs may need to be adjusted on your AP/router.
See also: https://github.com/mrlt8/docker-wyze-bridge/discussions/891 https://support.wyze.com/hc/en-us/articles/360031479211-ASUS-Routers-and-Airtime-Fairness https://support.wyze.com/hc/en-us/articles/360031124632--ASUS-Routers-and-Smart-Connect-
👍, i added 6 cameras to raspberry pi4, my cpu usage is at 50% is the following code going to make wyze-bridge use less cpu?
devices: - /dev:/dev environment: - ROTATE_DOOR=True - H264_ENC=h264_v4l2m2m
It should help with re-encoding for the doorbell. may need to manually specify the devices on the pi:
devices:
- /dev/video10:/dev/video10
- /dev/video11:/dev/video11
- /dev/video12:/dev/video12
interesting, what are the video for?
pi@raspberrypi:/dev $ ls -ltra |grep video crw-rw---- 1 root video 10, 124 Aug 2 22:04 vchiq crw-rw---- 1 root video 10, 125 Aug 2 22:04 vcio crw-rw---- 1 root video 10, 122 Aug 2 22:04 vcsm-cma crw-rw---- 1 root video 238, 1 Aug 2 22:04 media1 crw-rw----+ 1 root video 81, 3 Aug 2 22:04 video16 crw-rw---- 1 root video 238, 0 Aug 2 22:04 media0 crw-rw----+ 1 root video 81, 0 Aug 2 22:04 video13 crw-rw----+ 1 root video 81, 9 Aug 2 22:04 video19 crw-rw---- 1 root video 238, 2 Aug 2 22:04 media2 crw-rw---- 1 root video 238, 3 Aug 2 22:04 media3 crw-rw----+ 1 root video 81, 6 Aug 2 22:04 video22 crw-rw----+ 1 root video 81, 8 Aug 2 22:04 video23 crw-rw----+ 1 root video 81, 12 Aug 2 22:04 video18 crw-rw----+ 1 root video 81, 2 Aug 2 22:04 video15 crw-rw----+ 1 root video 81, 11 Aug 2 22:04 video12 crw-rw----+ 1 root video 81, 7 Aug 2 22:04 video10 crw-rw----+ 1 root video 81, 1 Aug 2 22:04 video14 crw-rw----+ 1 root video 81, 4 Aug 2 22:04 video20 crw-rw----+ 1 root video 81, 5 Aug 2 22:04 video21 crw-rw----+ 1 root video 81, 10 Aug 2 22:04 video11 crw-rw----+ 1 root video 81, 13 Aug 2 22:04 video31 crw-rw---- 1 root video 237, 0 Aug 2 22:04 cec0 crw-rw---- 1 root video 237, 1 Aug 2 22:04 cec1
I believe 10 11 and 12 are used for h264_v4l2m2m. Not sure about the others.
Thanks, load reduce from 60% to 40%
I still have performance issue, with 40% cpu usage is anyway to optimize it?
here is docker-compose: wyze-bridge: container_name: wyze-bridge restart: unless-stopped image: mrlt8/wyze-bridge:latest ports: - 1935:1935 # RTMP - 8554:8554 # RTSP - 8888:8888 # HLS - 8889:8889 #WebRTC - 8189:8189/udp # WebRTC/ICE - 5000:5000 # WEB-UI devices: - /dev/video10:/dev/video10 - /dev/video11:/dev/video11 - /dev/video12:/dev/video12 environment: - ENABLE_AUDIO=True - SUBSTREAM=True - ROTATE_DOOR=True - H264_ENC=h264_v4l2m2m
Reduce the number of snapshots? Taking a snapshot requires the h264 to be decoded which can result in a CPU spike. We could try offloading that to the hardware decoder, but I'm not sure how much of a difference that might make. Will try to look into it.
@mrlt8 I want to try to use m1 mac, it perform much faster in scrypted, do you know there is any setting that i can do hardware decode h264 in macos?
cpu usage is really high
I don't believe it's possible to access VideoToolbox via docker. Might be able to do the decoding in scrypted since it runs directly in macOS?