Can download Events, but not view through webui

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
AfricanSwallow
Posts: 16
Joined: Sat Jun 23, 2018 6:56 pm

Can download Events, but not view through webui

Post by AfricanSwallow »

I have searched extensively to try and find the root of the issue. I can manually scp the files from the zoneminder machine /var/cache/zoneminder/events directory and the videos play. At first i thought it may have been an issue with events saving mp4 in the wrong directory and the event viewer not finding them, however I can view the stills which reside in the same directory so maybe thats not the issue.

If i go into a specific event I receive a black screen with an X in the middle and the error "The video could not be loaded, either because the server or network failed or because the format is not supported". I have found other posts with this error but none of the resolutions have worked for me. If i click "Stills" i can see them still frames, but if i click "Download MP4" I get a "Failed - No file" error. If i "Export" then all the files download correctly and work fine. It is indeed an mp4 file when exported.

All of the streams display fine, mind you, though every now and then events will not have the stills and just shows a broken image link. the video also doesn't play and if i export, the mp4 is corrupt and not playable and the still (just one) is viewable but fairly blurry and pixelated - i imagine that is just an image with the rtsp stream during that time.

The errors from log file are the following:
Can't create frame images from video for this event (2334-video.mp4
Capture file does not exist at /var/cache/zoneminder/events/6/2019-07-03/2334/00002-capture.jpg
Shared data not initialised by capture daemon for monitor LRCAM
'zma -m 4' exited abnormally, exit status 255
Got empty memory map file size 0, is the zmc process for this monitor running?

And some others. For several of these my research has concluded that it may not really be an error since zma may not be running if not in event state? Or the memory map said to enable shared memory (or disable, cant recall - but i did do the change from that thread and didn't resolve my issue)

Im not sure which of these errors are related and I should action on and which are 'normal' and can be ignored. Hopefully someone here has experienced this and knows a fix. I would go through all of the things i have done to resolve, but i've been working on it for over a week and can't even recall what all i've tried, though it was stuff like enabling/disabling shared memory, ensuring timezone set in php-fpm file, dir permissions to www-data and other tweaks such as that.

Ubuntu 18.04
PHP 7.3
ZoneMinder 1.32.3
Nginx 1.14.0

Thanks!
AfricanSwallow
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Can download Events, but not view through webui

Post by bbunge »

https://wiki.zoneminder.com/Ubuntu_Serv ... .2C_PHP.29

The above uses PHP7.2 but 7.3 should not be a problem.
AfricanSwallow
Posts: 16
Joined: Sat Jun 23, 2018 6:56 pm

Re: Can download Events, but not view through webui

Post by AfricanSwallow »

Thanks bbunge. I had visited that link before and though mine differed slightly, everything worked except for streaming events - as described in my original post. That said, i went ahead and took the exact config in the link provided for nginx and applied it to mine, only adjusting for the fact that i hit mine directly without subdir (ie zm.example.com as opposed to example.com/zm). I have restarted, and had one hiccup that it was not redirecting to index.php, which appears to be as expected, so i also modified that so that zm.example.com brings up zm.example.com/index.php by adding the following line:

Code: Select all

        index index.php
into line 4 of the below segment:

Code: Select all

 location / {
auth_basic off;
        alias /usr/share/zoneminder/www/;
        index index.php
        try_files $uri $uri/ /index.php?$args =404;
        location /api {
        auth_basic off;
                rewrite ^/api(.+)$ /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/php7.3-fpm.sock;
        }
 }
Unless you believe that could result in the issue, Im still unclear what my issue could be. Thanks again,
AfricanSwallow

EDIT: As a follow-up, i went ahead and removed those lines, restarted nginx and logged back into zoneminder - issue persists. Any other thoughts?
Post Reply