zoneminder
zoneminder copied to clipboard
Timestamp is not shown in the video picture
-
Zoneminder 1.37.59
-
Installed via deb package (zoneminder_1.37.59~20240417.30-bookworm_amd64.deb)
-
Debian bookworm 12.5
-
Edge, Chrome, Firefox
-
Camera Axis M3005
The time stamp configured here:
is not shown in the video picture.
In the official debian version 1.36.33, it is functioning:
Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template!
schnudd31do3, thanx for the report, I was able to reproduce the behavior, you must see there is in fact a problem reported in your logs about that, it states that a font file is missing... that's why you're not seeing the time stamp. This is what my log shows.
A new release will fix the problem, but meanwhile there is a work around you can apply: download the file and place it in the corresponding forder.
The file is located here: https://github.com/ZoneMinder/zoneminder/blob/master/fonts/default.zmfnt
Once you have it, move it to the corresponding folder and restart zoneminder service so it gets recognized, that'll fix it.
Why was it missing I wonder? Should have been installed automatically.
I tried it twice. I restored my server to the state before updating and it was always the same result.
Now I found the reason: 1.36.33: /usr/share/zoneminder/www/fonts/default.zmfnt 1.37.59: /usr/share/zoneminder/fonts/default.zmfnt
After changing the options to the new path, the text was shown again.
I am wondering why you have changed the folder structure and why the upgrade process does not adapt this path in the options.
There is one question left. Why does the camera image only appear with a delay of about a minute after the URL is opened in the browser? https://mycamserver.de/zm/cgi-bin/zms?mode=jpeg&monitor=1&user=MyUser&pass=MyPass
By using mode=single, the image is shown immediately.
schnudd31do3, I'm glad you got your first issue fixed, about this second question, to try and figure out the problem is necessary to have some more information, logging, what browsers have you tried, etc.
I tried to replicate what you're saying but it's working fine in my Debian installs...
I dont have any errors in the apache2 logs nor in any other logfile. It is the same on Edge, Firefox and Chrome. I don't have any idea how to debug it. I observed it in both ways: Restarting the apache2 service or refreshing the browser by F5 stops streaming and starts the delay of about 1 minute. I know, that in former times the video stream was immediately shown but I am not sure when the behaviour rised.
Can you open the monitor view and right click on top of the stream then select "copy the image URL", that will give you a slightly different URL that the one you're using, try and use that one in another browser tab... it's important to leave UI monitor view prior to try and open this URL, because it will use the same randomizer number that the monitor view and it will delay the playback.
This URL has the same delay as a result: https://mycamserver.de/zm/index.php?view=watch&mid=1 It makes no difference using a separate tab
I think we would need to turn on debug logging and check the zms_m1.log
sorry my bad, maybe I didn't make myself clear, open the monitor view, and right click in the stream image directly to get the image URL, this is what it looks like in my browser, sorry is in spanish but you'll get the idea
the URL should look like this:
https://server_url/zm/cgi-bin/nph-zms?mode=jpeg&maxfps=&scale=100&state=1&monitor=16&rand=1713796252&connkey=957656
then go back to the console view to leave monitor view and open the image in a new tab. (else the new tab will be very slow to open)
if this is not faster to open, you should do as connortechnology said and turn on debug
Thanks. I got you. In my case it is : https://mycamserver.de/zm/cgi-bin/nph-zms?mode=jpeg&maxfps=&scale=100&state=1&monitor=1&auth=1315899ba107d0c2d0625ae643be8b5e&user=admin&rand=1713846240&connkey=308082.
Logging from the console:
3.04.24, 06:56:13 MESZ | web_js | 646 | ERR | eval violated CSP script-src | chrome-extension | 2 |
---|---|---|---|---|---|---|
23.04.24, 06:53:11 MESZ | web_js | 1131 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:51:55 MESZ | web_js | 1147 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:51:11 MESZ | web_js | 645 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:50:02 MESZ | web_js | 645 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:49:31 MESZ | web_js | 1148 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:49:29 MESZ | web_js | 1147 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:49:26 MESZ | web_js | 1147 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:37:17 MESZ | web_js | 11959 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:37:14 MESZ | web_js | 11959 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:35:09 MESZ | web_php | 16322 | ERR | Timed out waiting for msg /run/zm/zms-278999s.sock after waiting 5000 milliseconds | /usr/share/zoneminder/www/ajax/stream.php | 124 |
23.04.24, 06:35:08 MESZ | web_js | 16347 | ERR | eval violated CSP script-src | chrome-extension | 2 |
23.04.24, 06:35:04 MESZ | zms_m1 | 16791 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:35:04 MESZ | zms | 16791 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:35:04 MESZ | web_php | 11962 | ERR | Timed out waiting for msg /run/zm/zms-278999s.sock after waiting 5000 milliseconds | /usr/share/zoneminder/www/ajax/stream.php | 124 |
23.04.24, 06:34:59 MESZ | zms_m1 | 16788 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:59 MESZ | zms | 16788 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:59 MESZ | web_php | 16346 | ERR | Timed out waiting for msg /run/zm/zms-278999s.sock after waiting 5000 milliseconds | /usr/share/zoneminder/www/ajax/stream.php | 124 |
23.04.24, 06:34:53 MESZ | zms_m1 | 16784 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:53 MESZ | zms | 16784 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:53 MESZ | web_php | 11961 | ERR | Timed out waiting for msg /run/zm/zms-278999s.sock after waiting 5000 milliseconds | /usr/share/zoneminder/www/ajax/stream.php | 124 |
23.04.24, 06:34:48 MESZ | zms_m1 | 16779 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:48 MESZ | zms | 16779 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:48 MESZ | web_php | 16107 | ERR | Timed out waiting for msg /run/zm/zms-278999s.sock after waiting 5000 milliseconds | /usr/share/zoneminder/www/ajax/stream.php | 124 |
23.04.24, 06:34:42 MESZ | zms_m1 | 16775 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:42 MESZ | zms | 16775 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:41 MESZ | zms_m1 | 16772 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
23.04.24, 06:34:41 MESZ | zms | 16772 | ERR | fopen() for /var/log/zoneminder.log 23, error = Permission denied | zm_logger.cpp | 390 |
zoneminder logfile:
23.04.24, 06:31:45 MESZ.171487 web_php[16107].DBG [10.49.100.2] [CORS: NO origin] at /usr/share/zoneminder/www/includes/functions.php line 89 23.04.24, 06:31:45 MESZ.172951 web_php[16107].DBG [10.49.100.2] [View: options Request: Action: User: admin] at /usr/share/zoneminder/www/index.php line 186 23.04.24, 06:31:45 MESZ.503606 web_php[16107].DBG [10.49.100.2] [Array ( [__csrf_magic] => key:5d69c2eeb1bcf5284f94a898ec06eb6001abe48d,1713846705 [view] => request [request] => log [task] => create [level] => ERR [message] => eval%20violated%20CSP%20script-src [browser] => Array ( [name] => Chrome [version] => 124.0.0.0 [platform] => Windows )
[file] => chrome-extension
[line] => 2
)] at /usr/share/zoneminder/www/index.php line 33
I found this: https://github.com/ZoneMinder/zoneminder/issues/3340 . Do I have the same issue?
No errors, only waiting for responding.
I observed, restarting the zoneminder service causes about 4 seconds of delay while the website is kept open. Restarting the apache2 service causes a delay of about 36 seconds, where I have to refresh the website immediately after restarting the apache2 service.
Have you tried to access the monitor using the browser in "safe mode", that may give you an idea if is related to some browser extesion... another thing you can check is if the CPU usage spikes when you open the monitor view, that can cause a delay.
- I dont know how to activate "safe mode". I am not running it in a docker container.
- When opening with "mode=single", the picture ist shown immediately and by presing F5 as fast as I want, the video image ist updated without any delay. But using "mode=jpeg", the delay is there. Because cgi-bin/zms is a compiled file, I am not able to dig in, what the delay causes. I guess, that zms is buffering some frames before it shows the video image. An indication for that is that when stopping the zoneminder service, the video image continues for a few seconds.
- I am using 4 core with 2 CPU per socket and 4GB RAM. vSphere shows no spike when opening the URL and is running on about 15% of CPU load. So I dont beleve that there is a lack of power.
- I have this browser extension errors independend of Edge, Chrome and Forefox
Can you confirm 2. from above? If so, where can I disable this behaviour? I know for a fact that this behavior wasn't the case until some previous versions and I did not change my hardware
The answers will be in the zms logs. The CSP stuff is caused by some chrome extension. I don't think it is related. However you may try turning off extensions one by one until that goes away.
A bigger issue is a misconfig on your logging path.. it can't write to /var/log/zoneminder.log. This is a strange value. Logs should be in /var/log/zm/ so something is strange with your config. Please check /etc/zm/conf.d/01-system-paths.conf
zms does not buffer frames. It waits for zmc to have captured another image, then sends that out. There is a weird thing with Chrome where it doesn't display an image until it gets a second one. For this reason we actually sometimes send the same image twice. However I don't think this is relevant.
I checked this 01-system-paths.conf. I had the path configured here: ZM_PATH_LOGS=/var/log/zm. Perhaps it was an old error.
I have the chrome extension error on EACH browser (edge, chrome, firefox): 30.04.24, 08:58:24 MESZ | web_js | 76758 | ERR | eval violated CSP script-src | chrome-extension | 2
You said "It waits for zmc to have captured another image". But why can I capture immediately images as fast as I want by using the single mode and pressing F5? Where can check, on what zns is waiting for when using the jpeg mode?"
I just saw this problem today on a support call. Despite my best efforts to figure it out, so far I am stumped. They had two identical servers and one did it while the other did not. Independent of browser. zms logs clearly show images being sent, but the browser refuses to display them for around a minute. Also seems to not receive sigpipe when we browse away. Very puzzling. Logs all green.
Thanks, that you could confirm my observations. "logs all green." yes they are. I am pretty sure that in former versions of zms, it does not have this issue. But I can not remember since when it comes up.
Closing out as original issue with missing font was resolved. Please create a new issue to track browser delays secondary issue you experienced or if @connortechnology wants one created to track that issue
Just wanted to add an update RE my support call. That issue was resolved after discovering that the second server didn't have as many cpu cores. (Dual socket, only 1 socket filled). Adding another cpu solved that problem.
Doesn't really explain much though. mode=single uses a different code path and just sends out whatever the last image was and exits. mode=jpeg sends the last image and then waits for the next. Also, there is the communication socket setup so that we can send STOP/PAUSE get fps rates etc.