Firefox does not show events

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
paulberendts
Posts: 5
Joined: Wed Feb 28, 2024 6:17 pm

Firefox does not show events

Post by paulberendts »

I run zoneminder on a raspberry, and use a windows PC with firefox to monitor the events.
I can see the direct streams from the camera's and zoneminder records events based on motion detection.
When I try to look at the events in firefox, I see the timeline, but not the video stream.

How can I watch the events in Firefox?
dougmccrary
Posts: 1205
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Firefox does not show events

Post by dougmccrary »

What settings are you using to record? Also, maybe a screenshot of what you're seeing, to be certain I understand.
paulberendts
Posts: 5
Joined: Wed Feb 28, 2024 6:17 pm

Re: Firefox does not show events

Post by paulberendts »

I'm using Zoneminder version 1.36.33 installed on a Raspberry PI 5 with 8 Gb memory.
Screenhots of console, live view and event view are attached, together with all the options.
I've tried al combinations of options M_WEB_H_CAN_STREAM and ZM_WEB_H_STREAM_METHOD, but no luck.

Firefox is the latest version, 123,0 64 bits. I've run Firefox without any extensions and marked the website safe. That did not help.

In the past I ran an older version on a rPI 3, and that version did show the events, although sometimes the playback froze.
Unfortunately that rPI and version is no longer available. The disc crashed, and I decided to upgrade to the latest hardware and software.

Hope you can help.
Attachments
Console.jpg
Console.jpg (38.11 KiB) Viewed 1899 times
Event view.jpg
Event view.jpg (31.94 KiB) Viewed 1899 times
Config.csv
(132.51 KiB) Downloaded 12 times
dougmccrary
Posts: 1205
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Firefox does not show events

Post by dougmccrary »

Possibly h265 from the cameras? Most browsers won't play it. See https://www.lambdatest.com/web-technologies/hevc
And your Monitor->Storage settings?
paulberendts
Posts: 5
Joined: Wed Feb 28, 2024 6:17 pm

Re: Firefox does not show events

Post by paulberendts »

Tha camera is a standard Tapo C310, which uses as far as I can see H264.
I can see the live video, so the stream arrives correctly.

The camera -> storage values are unchanched:
Storage area Default
Save Jpegsa Frames + Analysis images
Video write disabled.

I increased the Stream replay image buffer to 10, but no change.

I found out that the events do show when I use Edge as a webbrowser.
I really want to keep using firefox though.

Can you help me?
User avatar
iconnor
Posts: 2896
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Firefox does not show events

Post by iconnor »

Uh oh...

well first check for javascript errors by right clicking, inspect element, go to console tab.

You probably want to turn off jpeg storage, and turn on video write => Passthrough. This will drastically reduce cpu and storage use.

As always, look at your logs.
paulberendts
Posts: 5
Joined: Wed Feb 28, 2024 6:17 pm

Re: Firefox does not show events

Post by paulberendts »

Looking for errors while trying to display an event I get the error :

XHR GET http://pi-paul.home/zm/index.php?comman ... est=stream [HTTP/1 500 Internal Server Error 47ms]

I've copied te info in the attached txt file.

Can you tell me how and where to turn off jpeg storage and turn onvideo write (as you suggested)? I looked in the options and in Firefox, but i could not find anything related to that.
Attachments
Script errors.txt
(3 KiB) Downloaded 12 times
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Firefox does not show events

Post by bbunge »

There is an old Firefox "fix" in my file archives. May help:

Enter about:config in the address bar

scroll down to
browser.cache.check_doc_frequency 3
change the 3 to a 1

browser.cache.disk.enable True -> False
network.http.max-connections-per-server -> put a value of 100
network.http.max-persistent-connections-per-proxy -> 100 again
network.http.max-persistent-connections-per-server -> 100 again


Should not be required for modern Firefox.

Your Pi setup. Did you use a pre made image? If so you may want to do your own install.
https://wiki.zoneminder.com/Debian_11_B ... der_1.36.x works with Bullseye AKA Debian 11
https://wiki.zoneminder.com/Debian_12_B ... er_1.36.33 should work with Bookworm AKA Debian 12
Make sure you use the lite version of the RPI OS.
User avatar
iconnor
Posts: 2896
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Firefox does not show events

Post by iconnor »

The logs say apache returned internal server error. So check apache logs.
paulberendts
Posts: 5
Joined: Wed Feb 28, 2024 6:17 pm

Re: Firefox does not show events

Post by paulberendts »

Apache error:
[Tue Mar 05 00:00:11.966260 2024] [mpm_prefork:notice] [pid 3918] AH00163: Apache/2.4.57 (Raspbian) configured -- resuming normal operations
[Tue Mar 05 00:00:11.966302 2024] [core:notice] [pid 3918] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 05 09:18:02.810508 2024] [php:error] [pid 22851] [client 192.168.68.100:59140] PHP Fatal error:
Uncaught ValueError: 64-bit format codes are not available for 32-bit versions of PHP in /usr/share/zoneminder/www/ajax/stream.php:167\n
Stack trace:\n
#0 /usr/share/zoneminder/www/ajax/stream.php(167): unpack()\n
#1 /usr/share/zoneminder/www/index.php(269): require_once('...')\n
#2 {main}\n thrown in /usr/share/zoneminder/www/ajax/stream.php on line 167, referer: http://pi-paul.home/zm/?view=event&eid= ... [0][val]=1
[Tue Mar 05 09:18:03.269392 2024] [php:warn] [pid 23189] [client 192.168.68.100:59141] PHP Warning: socket_bind(): Unable to bind address [98]:
Address already in use in /usr/share/zoneminder/www/ajax/stream.php on line 42, referer: http://pi-paul.home/zm/?view=event&eid= ... [0][val]=1

Machine and PHP info:
PHP Version=8.2.7
PHP integer size=4
PHP integer max=2147483647
OS info=Linux PI-Paul 6.1.0-rpi8-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64

8.2.7 should be 64 bit? Is the latest version I can find. Integer size says 32 bit.

stream.php:
case MSG_DATA_EVENT :
if ( version_compare( phpversion(), '5.6.0', '<') ) {
ZM\Debug('Using old unpack methods to handle 64bit event id');
$data = unpack('ltype/ieventlow/ieventhigh/dduration/dprogress/irate/izoom/Cpaused', $msg);
$data['event'] = $data['eventhigh'] << 32 | $data['eventlow'];
} else {
Line 167: $data = unpack('ltype/Qevent/dduration/dprogress/irate/izoom/Cpaused', $msg);
}
$data['rate'] /= RATE_BASE;
$data['zoom'] = round($data['zoom']/SCALE_BASE, 1);
if ( ZM_OPT_USE_AUTH && (ZM_AUTH_RELAY == 'hashed') ) {
$auth_hash = generateAuthHash(ZM_AUTH_HASH_IPS);
if ( isset($_REQUEST['auth']) and ($_REQUEST['auth'] != $auth_hash) ) {
$data['auth'] = $auth_hash;
}
}

Changing the value in version_compare to 9.6.0 makes the error disappear, but still shows no event.

If I run the same eventview in Edge, I get the same error, but the event is shown.

It looks as if this error has nothing to do with showing the event.

What would really be the problem?
aquadot
Posts: 17
Joined: Tue Apr 26, 2022 10:13 pm

Re: Firefox does not show events

Post by aquadot »

Sounds like you've got something configured wrong in apache. I've run into this with Alias settings for paths to cgi-bin and other settings. Check your apache settings to see if adjusting anything there will get it working.
Post Reply