Wifi camera: frequent disconnects / image freezing

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
rilny
Posts: 15
Joined: Mon Jan 18, 2021 10:00 pm

Wifi camera: frequent disconnects / image freezing

Post by rilny »

I'm using 1.34.22 on CentOS 8, just one outdoor camera so far, a Foscam wifi bullet camera. The connection is wifi but the camera is powered (not battery).

I've been having a lot of issues with the camera cutting out or freezing during recording, or sometimes just when opening the stream on the console. It might freeze completely or sometimes it gets pixelated or full of artifacts for a few seconds. I also suspect that it's missing some motion events.

There's a section of the logfile below which shows a lot of errors. What's the most likely cause here, a hardware issue with the camera, or a ZM issue that might be more easily fixed?

Code: Select all

01/18/21 10:49:26.538556 zmc_m1[229781].INF-zm_monitor.cpp/2550 [cam-front: images:200 - Capturing at 4.76 fps, capturing bandwidth 46971bytes/sec]
01/18/21 10:50:40.465034 zmc_m1[229781].INF-zm_monitor.cpp/2550 [cam-front: images:300 - Capturing at 1.35 fps, capturing bandwidth 20211bytes/sec]
01/18/21 10:50:46.826353 zmc_m1[229781].INF-zm_videostore.cpp/63 [Opening video storage stream /home/zoneminder/1/2021-01-18/1366/1366-video.mp4 format: mp4]
01/18/21 10:50:46.879737 zmc_m1[229781].INF-zm_videostore.cpp/440 [some options not used, turn on debugging for a list.]
01/18/21 10:50:46.912792 zmc_m1[229781].INF-zm_ffmpeg_camera.cpp/883 [Event video offset is -2.578 sec (<0 means video starts early)]
01/18/21 10:52:07.114616 zmc_m1[229797].INF-zm_ffmpeg.cpp/84 [Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets]
01/18/21 10:52:07.501576 zmc_m1[229797].INF-zmc.cpp/223 [Starting Capture version 1.34.22]
01/18/21 10:52:12.919596 zmc_m1[229797].INF-zm_monitor.cpp/2550 [cam-front: images:1 - Capturing at 0.20 fps, capturing bandwidth 20897bytes/sec]
01/18/21 10:52:13.047909 zmc_m1[229797].INF-zm_monitor.cpp/2550 [cam-front: images:2 - Capturing at 2.00 fps, capturing bandwidth 21847bytes/sec]
01/18/21 10:52:22.364697 zmc_m1[229797].INF-zm_videostore.cpp/63 [Opening video storage stream /home/zoneminder/1/2021-01-18/1367/1367-video.mp4 format: mp4]
01/18/21 10:52:22.399224 zmc_m1[229797].INF-zm_videostore.cpp/440 [some options not used, turn on debugging for a list.]
01/18/21 10:52:22.466426 zmc_m1[229797].INF-zm_ffmpeg_camera.cpp/883 [Event video offset is -1.646 sec (<0 means video starts early)]
01/18/21 10:53:21.410001 zmc_m1[229797].INF-zm_monitor.cpp/2550 [cam-front: images:100 - Capturing at 1.47 fps, capturing bandwidth 27902bytes/sec]
01/18/21 10:54:59.070442 zmc_m1[229797].INF-zm_ffmpeg_camera.cpp/759 [Unable to read packet from stream 0: error -541478725 "End of file".]
01/18/21 10:54:59.098964 zmc_m1[229797].INF-zm_monitor.cpp/2464 [Return from Capture (-1), signal loss]
01/18/21 10:54:59.134509 zmc_m1[229797].INF-zmc.cpp/318 [Failed to capture image from monitor 1 cam-front (1/1)]
01/18/21 10:55:10.531634 zmc_m1[229817].INF-zm_ffmpeg.cpp/84 [Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets]
01/18/21 10:55:10.937464 zmc_m1[229817].INF-zmc.cpp/223 [Starting Capture version 1.34.22]
01/18/21 10:55:17.126214 zmc_m1[229817].INF-zm_monitor.cpp/2550 [cam-front: images:1 - Capturing at 0.14 fps, capturing bandwidth 16181bytes/sec]
01/18/21 10:55:51.452326 zmc_m1[229817].INF-zm_monitor.cpp/2550 [cam-front: images:100 - Capturing at 2.94 fps, capturing bandwidth 45904bytes/sec]
01/18/21 10:56:47.140193 zmc_m1[229817].INF-zm_videostore.cpp/63 [Opening video storage stream /home/zoneminder/1/2021-01-18/1368/1368-video.mp4 format: mp4]
01/18/21 10:56:47.170222 zmc_m1[229817].INF-zm_videostore.cpp/440 [some options not used, turn on debugging for a list.]
01/18/21 10:56:47.203311 zmc_m1[229817].INF-zm_ffmpeg_camera.cpp/883 [Event video offset is -0.167 sec (<0 means video starts early)]
01/18/21 10:58:02.397242 zmc_m1[229833].INF-zm_ffmpeg.cpp/84 [Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets]
01/18/21 10:58:02.780952 zmc_m1[229833].INF-zmc.cpp/223 [Starting Capture version 1.34.22]
01/18/21 10:58:08.474166 zmc_m1[229833].INF-zm_monitor.cpp/2550 [cam-front: images:1 - Capturing at 0.17 fps, capturing bandwidth 18251bytes/sec]
01/18/21 10:58:08.986729 zmc_m1[229833].INF-zm_videostore.cpp/63 [Opening video storage stream /home/zoneminder/1/2021-01-18/1369/1369-video.mp4 format: mp4]
01/18/21 10:58:09.109564 zmc_m1[229833].INF-zm_videostore.cpp/440 [some options not used, turn on debugging for a list.]
01/18/21 10:58:09.158746 zmc_m1[229833].INF-zm_ffmpeg_camera.cpp/883 [Event video offset is -0.020 sec (<0 means video starts early)]
01/18/21 10:58:28.744799 zmc_m1[229833].INF-zm_monitor.cpp/2550 [cam-front: images:100 - Capturing at 5.00 fps, capturing bandwidth 119743bytes/sec]
01/18/21 10:59:46.690719 zmc_m1[229833].INF-zm_monitor.cpp/2550 [cam-front: images:200 - Capturing at 1.28 fps, capturing bandwidth 19901bytes/sec]
01/18/21 11:00:43.333635 zmc_m1[229833].INF-zm_ffmpeg_camera.cpp/759 [Unable to read packet from stream 0: error -541478725 "End of file".]
01/18/21 11:00:43.371883 zmc_m1[229833].INF-zm_monitor.cpp/2464 [Return from Capture (-1), signal loss]
01/18/21 11:00:43.407328 zmc_m1[229833].INF-zmc.cpp/318 [Failed to capture image from monitor 1 cam-front (1/1)]
01/18/21 11:00:53.892838 zmc_m1[229849].INF-zm_ffmpeg.cpp/84 [Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets]
01/18/21 11:00:54.284844 zmc_m1[229849].INF-zmc.cpp/223 [Starting Capture version 1.34.22]
01/18/21 11:00:54.546504 zmc_m1[229849].ERR-zm_ffmpeg_camera.cpp/394 [Unable to open input rtsp://<user>:<password>@cam-front.lan:88/videoMain due to: Invalid data found when processing input]
01/18/21 11:01:06.191772 zmc_m1[229870].INF-zm_ffmpeg.cpp/84 [Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets]
01/18/21 11:01:06.582790 zmc_m1[229870].INF-zmc.cpp/223 [Starting Capture version 1.34.22]
01/18/21 11:01:18.255056 zmc_m1[229885].INF-zm_ffmpeg.cpp/84 [Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets]
01/18/21 11:01:18.664139 zmc_m1[229885].INF-zmc.cpp/223 [Starting Capture version 1.34.22]
01/18/21 11:01:24.389664 zmc_m1[229885].INF-zm_monitor.cpp/2550 [cam-front: images:1 - Capturing at 0.17 fps, capturing bandwidth 41529bytes/sec]
01/18/21 11:01:42.612816 zmc_m1[229885].INF-zm_monitor.cpp/2550 [cam-front: images:100 - Capturing at 5.56 fps, capturing bandwidth 62285bytes/sec]
01/18/21 11:02:07.773306 zmc_m1[229885].INF-zm_monitor.cpp/2550 [cam-front: images:200 - Capturing at 4.00 fps, capturing bandwidth 44122bytes/sec]
01/18/21 11:02:14.635984 zmc_m1[229885].INF-zm_videostore.cpp/63 [Opening video storage stream /home/zoneminder/1/2021-01-18/1370/1370-video.mp4 format: mp4]
01/18/21 11:02:15.101806 zmc_m1[229885].INF-zm_videostore.cpp/440 [some options not used, turn on debugging for a list.]
01/18/21 11:02:15.590171 zmc_m1[229885].INF-zm_ffmpeg_camera.cpp/883 [Event video offset is -0.893 sec (<0 means video starts early)]
01/18/21 11:03:41.934710 zmc_m1[229885].INF-zm_monitor.cpp/2550 [cam-front: images:300 - Capturing at 1.06 fps, capturing bandwidth 19304bytes/sec]
01/18/21 11:04:40.083531 zmc_m1[229901].INF-zm_ffmpeg.cpp/84 [Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets]
01/18/21 11:04:40.464127 zmc_m1[229901].INF-zmc.cpp/223 [Starting Capture version 1.34.22]
01/18/21 11:04:48.477722 zmc_m1[229901].INF-zm_monitor.cpp/2550 [cam-front: images:1 - Capturing at 0.12 fps, capturing bandwidth 12302bytes/sec]
01/18/21 11:05:21.952618 zmc_m1[229901].INF-zm_monitor.cpp/2550 [cam-front: images:100 - Capturing at 3.03 fps, capturing bandwidth 41728bytes/sec]
01/18/21 11:06:25.386895 zmc_m1[229901].INF-zm_monitor.cpp/2550 [cam-front: images:200 - Capturing at 1.56 fps, capturing bandwidth 14241bytes/sec]
01/18/21 11:06:32.167520 zmc_m1[229901].INF-zm_videostore.cpp/63 [Opening video storage stream /home/zoneminder/1/2021-01-18/1371/1371-video.mp4 format: mp4]
01/18/21 11:06:32.226540 zmc_m1[229901].INF-zm_videostore.cpp/440 [some options not used, turn on debugging for a list.]
01/18/21 11:06:32.260121 zmc_m1[229901].INF-zm_ffmpeg_camera.cpp/883 [Event video offset is -0.459 sec (<0 means video starts early)]
01/18/21 11:07:36.431784 zmc_m1[229918].INF-zm_ffmpeg.cpp/84 [Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets]
01/18/21 11:07:36.817096 zmc_m1[229918].INF-zmc.cpp/223 [Starting Capture version 1.34.22]
01/18/21 11:07:42.256692 zmc_m1[229918].INF-zm_monitor.cpp/2550 [cam-front: images:1 - Capturing at 0.17 fps, capturing bandwidth 15715bytes/sec]
01/18/21 11:07:49.885736 zmc_m1[229918].INF-zm_videostore.cpp/63 [Opening video storage stream /home/zoneminder/1/2021-01-18/1372/1372-video.mp4 format: mp4]
01/18/21 11:07:50.941480 zmc_m1[229918].INF-zm_videostore.cpp/440 [some options not used, turn on debugging for a list.]
01/18/21 11:07:51.007681 zmc_m1[229918].INF-zm_ffmpeg_camera.cpp/883 [Event video offset is -1.351 sec (<0 means video starts early)]
01/18/21 11:07:57.110531 zmc_m1[229918].INF-zm_monitor.cpp/2550 [cam-front: images:100 - Capturing at 6.67 fps, capturing bandwidth 135979bytes/sec]
01/18/21 11:08:17.111617 zmc_m1[229918].INF-zm_monitor.cpp/2550 [cam-front: images:200 - Capturing at 5.00 fps, capturing bandwidth 51586bytes/sec]
01/18/21 11:08:37.102351 zmc_m1[229918].INF-zm_monitor.cpp/2550 [cam-front: images:300 - Capturing at 5.00 fps, capturing bandwidth 52362bytes/sec]
Some configuration settings that might be relevant:
  • Device settings on the camera: 720P, 1M bitrate (vbr), 5fps, key frame interval = 20
  • Source type = ffmpeg
  • Function = Modect
  • Source = TCP (using rtsp address shown above)
  • Save JPEGs = Analysis images only
  • Video writer = H264 camera passthrough
  • Image buffer size = 70
  • Warmup frames = 0
  • Pre event image count = 10
  • Post event image count = 60
  • Stream replay image buffer = 0
  • Alarm frame count = 2
  • One zone, using Blobs
User avatar
Andyrh
Posts: 245
Joined: Sat Oct 28, 2017 3:55 am

Re: Wifi camera: frequent disconnects / image freezing

Post by Andyrh »

From your description it is a WiFi issue. You can test by getting your phone as close to the camera as possible and performing a speed test while using WiFi. If the test has a lot of jitter you may need to adjust the location of the AP. Compare the speed test close to the AP and close to camera. That should help ID where the problem is.
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
rilny
Posts: 15
Joined: Mon Jan 18, 2021 10:00 pm

Re: Wifi camera: frequent disconnects / image freezing

Post by rilny »

Thanks, it should have a strong signal in that location but I'll get out there with the phone and double check.
extercy
Posts: 9
Joined: Wed Nov 11, 2020 8:34 am

Re: Wifi camera: frequent disconnects / image freezing

Post by extercy »

If your camera have the option for wired LAN go for it.... unless you have a dedicated WiFi router/AP for the camera.

Because it is streaming the whole time, sharing the WiFi router with other devices is bad.

From my previous test, tested 1 WiFi camera and experienced what you are experiencing. I added camera no 2 and the drop frames increases even though increase my buffers to compensate. Then I went wired LAN for both and I experienced less drop frames, freezes, etc.. it reduced to about 10% when on WiFi. The existing 10% drop frames, freezes, etc are due to camera limitations and also when there is a sudden huge change in scenery / activity when it was basically "idling" / static for a while.
Post Reply