Setting Recording Events

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Quantum
Posts: 103
Joined: Fri Mar 25, 2011 3:34 pm

Setting Recording Events

Post by Quantum »

I currently have two monitors set for each camera, a low-rez and a hi-rez. The low-rez is set for MoCord and hi-rez is set for None and Linked Monitor for hi-rez is the low-rez monitor.

The low-rez monitor has 176 events, but hi-rez has 'null'. Am I Doing It Wrong™?

Also, the camera itself has the ability to recognize faces and objects. If I am too stupid to set up AI for ZM (as I have been in the past) is there a way to make the camera alert ZM of particular events? (Dahua IPC-HDW5449TM-SE-LED) Or is there a guide for getting AI to work?

And, if I transcode, I'd understood that AV1 is available, but I can't find it. Is it still here?
User avatar
iconnor
Posts: 3119
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Setting Recording Events

Post by iconnor »

You will need to run 1.37 to get these features like av1 and ONVIF events.

If you set the high res to None, then it will never record. You need Nodect.

I made this all easier in 1.37.
Quantum
Posts: 103
Joined: Fri Mar 25, 2011 3:34 pm

Re: Setting Recording Events

Post by Quantum »

Wow, alot of changes in 1.37.

But although it claims it's capturing, I'm not getting any video since the upgrade to 1.37.

Image

BTW, in Debian 12.6 the AV1 encoder is libaom.so.3. ZM can't seem to find it.
Last edited by Quantum on Mon Sep 23, 2024 2:55 pm, edited 1 time in total.
User avatar
iconnor
Posts: 3119
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Setting Recording Events

Post by iconnor »

In 1.37, we moved the username/password out into their own fields..so you don't have to escape them anymore.
Quantum
Posts: 103
Joined: Fri Mar 25, 2011 3:34 pm

Re: Setting Recording Events

Post by Quantum »

Ok. Any thoughts on my other questions?
User avatar
iconnor
Posts: 3119
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Setting Recording Events

Post by iconnor »

For ONVIF events, check the Event Listener checkbox on the ONVIF tab.

For av1, there will now be av1 encoders listed in the list of encoders.
Quantum
Posts: 103
Joined: Fri Mar 25, 2011 3:34 pm

Re: Setting Recording Events

Post by Quantum »

If I'm gathering correctly, assuming a camera has ONVIF-M it can trigger an event in ZM, which could in turn analyze a license plate number or face? Wouldn't ZM ML analysis with bounding boxes be better? (Although I was too stupid to ever make that work before. Pls note how long I've been a member here)

And please understand that amongst the AV1 encoders, libaom.so.3 is not listed, thus ZM can't do AV1 in Debian. Can this be added?

Finally, in the upgrade to 1.37 I have lost all video, as per the screenie above. It claims it's recording but I have no video display. Can you advise why?
User avatar
iconnor
Posts: 3119
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Setting Recording Events

Post by iconnor »

The apache2 config from 1.36 should work out of the box with 1.37. Yours is incorrect in it's CGI ScriptAlias.

libaom is listed in the encoders list along with libsvtav1 and qsv-av1. You will not be able to do av1 without hwaccel, which means an nvnidia 4000 series or intel arc.
Quantum
Posts: 103
Joined: Fri Mar 25, 2011 3:34 pm

Re: Setting Recording Events

Post by Quantum »

But I'm running nginx.

/etc/nginx/sites-enabled/default is:

Code: Select all

server {
#**********************************************
        listen 127.0.0.1:80 default_server;
#       listen [::]:80 default_server;
include /etc/nginx/zoneminder.conf;
#**********************************************

        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;

        root /var/www/html;

        # Add index.php to the list if you are using PHP
#       index index.html index.htm index.nginx-debian.html;
#**********************************************
index index.php index.html index.htm index.nginx-debian.html;
#**********************************************
        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

        # pass PHP scripts to FastCGI server
        #
        #location ~ \.php$ {
        #       include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        #       fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        #       # With php-cgi (or other tcp sockets):
        #       fastcgi_pass 127.0.0.1:9000;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}
}
zoneminder.conf is:

Code: Select all

location /cgi-bin {
auth_basic off;
        alias /usr/lib/zoneminder/cgi-bin;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_param HTTP_PROXY "";
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
location /zm/cache {
auth_basic off;
        alias /var/cache/zoneminder/cache;
}
location ~ /zm/api/(css|img|ico) {
auth_basic off;
        rewrite ^/zm/api(.+)$ /api/app/webroot/$1 break;
        try_files $uri $uri/ =404;
}
location /zm {
auth_basic off;
        alias /usr/share/zoneminder/www;
        try_files $uri $uri/ /index.php?$args =404;
        location /zm/api {
auth_basic off;
                rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;
         }
                location ~ \.php$ {
                auth_basic off;
                        include fastcgi_params;
                        fastcgi_param SCRIPT_FILENAME $request_filename;
                        fastcgi_param HTTP_PROXY "";
                fastcgi_index index.php;
                        fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
        }
    }
I've checked all the directories and they're there.
Quantum
Posts: 103
Joined: Fri Mar 25, 2011 3:34 pm

Re: Setting Recording Events

Post by Quantum »

Well now one camera's high stream has decided to not record at all. And its lo stream is telling me "Capturing, Analyzing Always, Recording Always, Use ONVIF", this last of which is a complete mystery.

I've spent all weekend on this and can not figure out what is wrong with CGI. I have no video. Zero, everywhere. I have to go back to 1.36.
User avatar
iconnor
Posts: 3119
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Setting Recording Events

Post by iconnor »

Your nginx is configured to use /cgi-bin as the path for cgi. But ZM is likely configured to use /zm/cgi-bin. Edit /etc/zm/conf.d/01-system-paths.conf and change PATH_ZMS to match.
Quantum
Posts: 103
Joined: Fri Mar 25, 2011 3:34 pm

Re: Setting Recording Events

Post by Quantum »

It's already set to /zm/cgi-bin/nph-zms . It's a symlink to the file /usr/lib/zoneminder/cgi-bin/zms which is there.

Image
User avatar
iconnor
Posts: 3119
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Setting Recording Events

Post by iconnor »

Once again, your nginx is set to use /cgi-bin, not /zm/cgi-bin. You need to either update nginx or the zm config so that they match.
Quantum
Posts: 103
Joined: Fri Mar 25, 2011 3:34 pm

Re: Setting Recording Events

Post by Quantum »

Oh for heaven's sake, now I get it. At the top of /etc/nginx/zoneminder.conf was

Code: Select all

location /cgi-bin {
I fixed that and now 1.37 works.
User avatar
iconnor
Posts: 3119
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Setting Recording Events

Post by iconnor »

hurray!
Post Reply