New to ZoneMinder and having a few issues

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
wp6529
Posts: 4
Joined: Sun Apr 20, 2025 12:17 am

New to ZoneMinder and having a few issues

Post by wp6529 »

Environment summary:

System information
Model
Dell Inc. Precision 7920 Rack
CPU
8x Intel(R) Xeon(R) Silver 4112 CPU @ 2.60GHz
Memory
64G

Centos Stream 9 (fresh install)
ZM v1.36.35

Usage (fresh boot with ZM running)
CPU
9% of 8 CPUs
Memory
3.2 / 62 GiB
Network
~28Mb RX

Cameras are 5x Alibi ALI-NS3014R and an Amcrest IP4M-1053E.

Storage is currently on the OS FS (mirrored 500G) while I wait for a carrier to arrive so I can install an 8TB Seagate Skyhawk drive as the record drive.

I have all of the cameras set for max resolution, but only 1fps so in theory at least the load shouldn't be that bad and the CPU and Mem stats seem to confirm that. What I am seeing is unstable record performance and significant delays i.e. I'm seeing in the montage view something that left the scene over an hour ago in some cases and not on every camera as some appear to be current. Also I've not had any success with the PTZ control of the Amcrest camera using the info found here: https://wiki.zoneminder.com/Amcrest though the stream info there worked.

Suggestions?

Thanks,

Pete
User avatar
burger
Posts: 472
Joined: Mon May 11, 2020 4:32 pm

Re: New to ZoneMinder and having a few issues

Post by burger »

You didn't mention what your monitor settings are, but with 4K cameras, you will want
to use H264 passthrough. The camera should have H264 on the RTSP stream, and
the FPS should be set at the camera, not at ZM.

See: https://wiki.zoneminder.com/Dummies_Gui ... Zoneminder

PTZ is another thing. If the guides don't work, I can't help you there. But you could do
more research online or try to reverse engineer it.
https://wiki.zoneminder.com/Finding_Camera_Stream_Paths

I don't know how stable Centos Stream is, you may want to consider the non rolling variants like Rocky Linux, or go with https://wiki.zoneminder.com/Debian or https://wiki.zoneminder.com/Ubuntu You should probably be using the RPM repo at zmrepo.zoneminder.com (though to be clear, I run Debian not RH with ZM). There was an issue recently with the RPM repo, it was resolved, I think. See: viewtopic.php?p=136536

It's possible the Alibi camera streams don't work well with FFMPEG. I haven't used them, and I don't know anything about them. Maybe they are a rebadged Dahua or similar? If they are a good brand like that, you may be OK. But if they are anything else, who knows.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
wp6529
Posts: 4
Joined: Sun Apr 20, 2025 12:17 am

Re: New to ZoneMinder and having a few issues

Post by wp6529 »

I was away a a bit so just getting back to this. My drive carrier arrived and I got the record moved over to the proper drive now.

The Alibi cameras are pretty solid, I've used them for about a decade. In IP Scan the manufacturer identifies as "Hangzhou Hikvision Digital Technology Co.,Ltd.", which the dummies guide to ZM indicates is a recommended brand.

I seem to be having issues with any live views now. I have the monitors set to camera bypass and it seems to record the mp4s properly, but no live views are working. I have analysis turned off since the cameras are mostly outdoors and motion detection wouldn't be very effective with varying shadows, moving tree branches, etc. I do have decode turned on but this seems to not be working. I tried turning analysis on one monitor as well and still no live video. As previously, still not a lot of load on the server though ZM does seem to eat up memory over time.

As for distro, I try to stick with RHEL / Centos as I have a great distain for all the silly distro cliques.
cookiemonster
Posts: 64
Joined: Sat Aug 15, 2015 1:46 pm

Re: New to ZoneMinder and having a few issues

Post by cookiemonster »

" but no live views are working. "
What does it show on the UI ? I recently had a problem after a reinstall (Ubuntu though) and the problem was down to the webserver (Apache).
So it is is important to understand what is happening. Webbrowser built-in tools are useful. I was getting 404s
wp6529
Posts: 4
Joined: Sun Apr 20, 2025 12:17 am

Re: New to ZoneMinder and having a few issues

Post by wp6529 »

The webserver is nginx, and the live views did initially work so some later change broke that, though it's not clear what. The only changes were to add the new record drive and to try the camera bypass to write to mp4, do no analysis and save no jpgs.

Looking at it again just now I did manage to catch a couple errors in the logs:

5/8/25, 1:48:58 AM UTC web_php 46709 ERR Can't create frame images from video for this event 2328-video.mp4 Command was: /usr/bin/ffmpeg -ss 1 -i /DVR_Record/8/2025-05-07/2328/2328-video.mp4 -frames:v 1 /DVR_Record/8/2025-05-07/2328/snapshot.jpg 2>&1 Output was: ffmpeg version 5.1.6 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 11 (GCC) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libjxl --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libshaderc --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lv2 --enable-avfilter --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55fe4350e480] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none(tv, bt709), 2048x1536): unspecified pixel formatConsider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options/DVR_Record/8/2025-05-07/2328/2328-video.mp4: could not seek to position 1.000Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/DVR_Record/8/2025-05-07/2328/2328-video.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso6iso2avc1mp41 title : Zoneminder Security Recording encoder : Lavf59.27.100 Duration: N/A, bitrate: N/A Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none(tv, bt709), 2048x1536, 90k tbr, 90k tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0]Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))Press [q] to stop, [?] for helpCannot determine format of input stream 0:0 after EOFError marking filters as finishedConversion failed! views/image.php 198

5/8/25, 1:48:45 AM UTC web_php 46708 ERR Socket /var/lib/zoneminder/sock/zms-259885s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information. includes/functions.php 1884

Checking procs, there are six zmc procs which correlate with the four cameras currently set on record and two on monitor (others are set to none). There are a good number of zms procs present as well. Looking at the referenced doc section I see it is referencing IE and I'm using Firefox currently.

[root@nvr1 wp6529]# ps -ef | grep -i zm
nginx 2606 1068 0 May03 ? 00:01:19 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 2617 1072 0 May03 ? 00:01:14 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 2618 1073 0 May03 ? 00:01:10 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 2736 1080 0 May03 ? 00:01:14 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 2749 1085 0 May03 ? 00:01:14 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 2864 1091 0 May03 ? 00:01:13 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 2879 1097 0 May03 ? 00:01:12 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 2983 1075 0 May03 ? 00:01:14 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 2996 1082 0 May03 ? 00:01:09 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3219 1069 0 May03 ? 00:01:10 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3233 1078 0 May03 ? 00:01:15 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3337 1087 0 May03 ? 00:01:10 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3351 1096 0 May03 ? 00:01:16 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3459 1074 0 May03 ? 00:01:11 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3580 1067 0 May03 ? 00:01:15 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3682 1081 0 May03 ? 00:01:14 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3695 1089 0 May03 ? 00:01:15 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3809 1070 0 May03 ? 00:01:18 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3822 1083 0 May03 ? 00:01:18 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 3924 1094 0 May03 ? 00:01:15 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4040 1090 0 May03 ? 00:01:17 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4053 1071 0 May03 ? 00:01:09 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4167 1079 0 May03 ? 00:01:06 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4268 1093 0 May03 ? 00:01:04 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4281 1088 0 May03 ? 00:01:13 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4391 1084 0 May03 ? 00:01:01 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4405 1077 0 May03 ? 00:01:12 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4504 1076 0 May03 ? 00:01:13 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4641 1095 0 May03 ? 00:01:11 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4654 1066 0 May03 ? 00:01:12 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4767 1092 0 May03 ? 00:01:12 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 4872 1086 0 May03 ? 00:01:12 /usr/libexec/zoneminder/cgi-bin/nph-zms
nginx 33117 1 0 May06 ? 00:00:30 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
nginx 33205 33117 0 May06 ? 00:00:58 /usr/bin/perl -wT /usr/bin/zmwatch.pl
nginx 33210 33117 0 May06 ? 00:00:01 /usr/bin/perl -wT /usr/bin/zmstats.pl
nginx 33460 33117 0 May06 ? 00:00:01 /usr/bin/zmcontrol.pl --id 7
nginx 37087 33117 0 00:00 ? 00:00:12 /usr/bin/perl -wT /usr/bin/zmfilter.pl --filter_id=2 --daemon
nginx 37095 33117 0 00:00 ? 00:00:08 /usr/bin/perl -wT /usr/bin/zmfilter.pl --filter_id=1 --daemon
nginx 41962 33117 6 06:21 ? 00:54:13 /usr/bin/zmc -m 8
nginx 41968 33117 6 06:21 ? 00:58:08 /usr/bin/zmc -m 9
nginx 41974 33117 7 06:21 ? 01:02:59 /usr/bin/zmc -m 10
nginx 41980 33117 4 06:21 ? 00:38:12 /usr/bin/zmc -m 11
nginx 41986 33117 7 06:21 ? 01:05:35 /usr/bin/zmc -m 12
nginx 41990 33117 4 06:21 ? 00:35:58 /usr/bin/zmc -m 14
root 46776 43225 0 21:00 pts/0 00:00:00 grep --color=auto -i zm

I found some interesting bits in ngine error.log:

2025/05/07 21:17:43 [error] 1524#1524: *17205 connect() to unix:/run/fcgiwrap/fcgiwrap-nginx.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 192.168.1.77, server: =, request: "GET /cgi-bin-zm/nph-zms?mode=jpeg&scale=11&maxfps=10&replay=single&rate=400&source=event&event=2350&rand=1746670658 HTTP/1.1", upstream: "fastcgi://unix:/run/fcgiwrap/fcgiwrap-nginx.sock:", host: "192.168.1.94", referrer: "https://192.168.1.94/zm/index.php?view=watch&mid=8"
2025/05/07 21:24:17 [error] 1524#1524: *17287 connect() to unix:/run/fcgiwrap/fcgiwrap-nginx.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 192.168.1.77, server: =, request: "GET /cgi-bin-zm/nph-zms?scale=2&mode=single&monitor=8&rand=1746671056 HTTP/1.1", upstream: "fastcgi://unix:/run/fcgiwrap/fcgiwrap-nginx.sock:", host: "192.168.1.94", referrer: "https://192.168.1.94/zm/index.php"

Thoughts?
cookiemonster
Posts: 64
Joined: Sat Aug 15, 2015 1:46 pm

Re: New to ZoneMinder and having a few issues

Post by cookiemonster »

Doesn't seem permissions related so far to me.
First block seems to be ffmpeg unable to deal with the image/stream type.
Second is a well known one, link on it but I would first focus on first and last. Last one might be either a misconfiguration of nginx or zm to connect to it, or simply that nginx died for a reason.
Limit to a single camera and restart the server, so all needed processes (including nginx) start fresh?
wp6529
Posts: 4
Joined: Sun Apr 20, 2025 12:17 am

Re: New to ZoneMinder and having a few issues

Post by wp6529 »

Interesting, I set all but one camera/monitor to "none" and rebooted the server entirely and the live images started working. I added the other three cameras / monitors that are important back to "record" and they are working as well. Strange since I had rebooted the server previously with no change in the issue.
Post Reply