ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Forum for questions and support relating to the 1.32.x releases only.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by pat2 »

rockedge wrote: Tue Aug 13, 2019 1:17 pm so to clarify for me once again...you can see the live stream...an alarm will trigger an event.....the event is recorded successfully but the mp4 version will not replay...and you can see the jpeg stills.
you undestood correctly. and it happens in all 1.32 and 1.33 versions.
moreover if I ask to ZM to generate a video from recorded jpegs, the video is generated by ZM and it is possible to see it!!
so it seems an issue only when replaying jpegs with ZM.
rockedge wrote: Tue Aug 13, 2019 1:17 pm what happens when you try to reach the /cgi-bin via URL in the browser?
let me try to reinstall (currently I downgraded to 1.30.4) and check.
rockedge wrote: Tue Aug 13, 2019 1:17 pm AND IMPORTANT: does the system clock / timezone match what is set in the php.ini file for PHP??

If there is any discrepancy in the timezone - clock settings between PHP,mysql and the system there can be mystifying errors created
system clock and timezone are set correctly and coherently. I know about this issue... :-)
please try to address the issue to developers.
I think that using the same procedure -currently used to read jpegs to generate video- to replay jpegs should be enough to solve.

thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by liderbug »

Problem is staring us right in the face > rate 0 <
At least on my RasPi load. I got to looking at the URL and it had everything except "rate". I have an older system where the URL had "rate=". So example:
/usr/share/zoneminder/www/skins/classic/views/js/event.js line 402 location.replace(thisUrl + '?view=event&eid=' + prevEventId + '&rate=100'+ filterQuery + sortQuery);
I added " + '&rate=100' " to the line and all the other lines I could find "(thisUrl..." and it's working
Note: "100" should be "$rate" as queried from DB or code.

my temp fix for www/skins/classic/views/events.php
191 <td class="colId"><a href="?view=event&amp;eid=<?php echo $event->Id().'&rate=100'.$fil...
192 <td class="colName"><a href="?view=event&amp;eid=<?php echo $event->Id().'&rate=100'.$filterQ...
===========================
Here are the files I've "fixed" on my system:
./www/skins/classic/js/skin.js
./www/skins/classic/views/js/timeline.js
./www/skins/classic/views/js/montagereview.js
./www/skins/classic/views/js/event.js
./www/skins/classic/views/js/watch.js
./www/skins/classic/views/js/events.js
./www/skins/classic/views/events.php
=========== by adding '&rate=100'
I'm 80% sure I did 80% right ...
User avatar
iconnor
Posts: 2882
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by iconnor »

rate=0 is a perfectly valid mode, however zms wasn't handling it well. It also wasn't handling negative rate. I have just pushed some fixes to master.
liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by liderbug »

Thanks. Any time to fix? A week? month? I'm looking to swap out my older RasPi B -> server for a self contained 3B+. Not pushing, just planning. tks.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by rockedge »

I think the changes are already now in the master
pms
Posts: 11
Joined: Sat Aug 24, 2019 3:59 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by pms »

I just want to aknowledge I have the same problem with V1.32.3 and it isn't the Time Zone. :(
note:
The first time I started ZoneMinder just after installation, it did not start because there was no Time zone configured in php.ini
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by pat2 »

Thanks a lot, rockedge! You are a ROCK!

I have just come back from holidays. Installed 1.33.14 and tested.
Bug solved!!
Thanks a lot, rock!


Note: I will try to reinstall everything from scratch and continue to test since I did many expriments on the board with previous not working versions and I need a clean version. But the feeling is it seems working. Thanks a lot, rock! After final tests I will report to the Odroid forum they could upgrade from 1.30.4. Rockedge, you did a great service not to me but to the zoneminder enthusiasts.

Note: really I cannot understand why all this time long to fix and why all previous version starting from 1.32.x are broken. I will not mention the list of master users of this forum contacted (in private way too) from which I received no answers or rude answers...anyway thanks a lot, ROCKEDGE!
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by pat2 »

Unfortunately I was wrong. The bug is not solved.


I went to Storage section. It was:
Save Jpegs: disabled
Video writer: X264 Encode - Not compatible on ARM

it was working even if I'm on an ARM architecture.

I changed to:
Save Jpegs: Frames only
Video writer: disabled

the bug appeared and it is not possibile to return to the previous configuration.
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
User avatar
iconnor
Posts: 2882
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by iconnor »

Um, I think x264 encode works on arm now.... yup it does.

I have just pushed a fix to allow you to select it again.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by pat2 »

iconnor wrote: Wed Aug 28, 2019 12:53 pm Um, I think x264 encode works on arm now.... yup it does.

I have just pushed a fix to allow you to select it again.
uh, great news. thanks.
let me upgrade and let you know. thx
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by pat2 »

:-) Thanks. Its' possible to select X264 Encode on your last ZM 1.34 version.

And I confirm that X264 encoding is now working for ARM too.

There are 2 advantages:

1. with this workaround it's not necessary to solve the bug (i confirm too that the bug remains if "Save JPEGS" is enabled)
2. space! it is saved space on disk with X264 encoding !

thansk for the fast option enabling!
thanks

note: at the end my prophecy has been true! the bug was not solved and the issue solved when X264 support enabled for ARM too!
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
y52
Posts: 3
Joined: Thu Aug 29, 2019 6:58 pm

ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by y52 »

iconnor wrote: Sat Apr 27, 2019 2:55 pm When viewing a .mp4 we just send the .mp4 to the browser. WHen viewing jpegs we use the cgi program zms. If your cgi paths are not correct in apache config, then zms doesn't get run and you don't get to view the event. This is literally reported every day here. Which is why we have such a long detailed error message which every still doesn't read.

There should be a line in your apache config for zoneminder /etc/apache2/conf-enabled/zoneminder.conf ? That says

ScriptAlias "/zm/cgi-bin/" "/usr/lib/zoneminder/cgi-bin/"

If you are not using the /zm at the end of the url you can add another

ScriptAlias /cgi-bin /usr/lib/zoneminder/cgi-bin/
Hello,
I am experiencing the similar experience from this forum after migrating from ZM 1.29 on Debian 8 to ZM 1.32 on Debian 10 set on the ARM board Orange Pi plus together with the H264DVR ONVIF camera. I've also dumped 1,29 database and moved it's content together with the events jpeg's to the new setup.
I installed the ZM 1.32 several times both from the Multimedia repository as well as the Debian's SID repository.
After checking configuration files and reinstalling several times, I understand, that the issue is related to ZM.
When I choose the event, populated with jpeg's, the ZMS error occurs :
Aug 29 22:34:22 opiplus web_php[2733]: ERR [Socket /run/zm/zms-004826s.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.

The error message is quite contradictory, as the "/run/zm/zms-004826s.sock" does exist :
# ls -al /run/zm/
total 8
drwxr-xr-x 2 www-data www-data 380 Aug 29 22:34 .
drwxr-xr-x 23 root root 720 Aug 29 19:13 ..
-rw-r--r-- 1 www-data www-data 4 Aug 29 19:14 zm.pid
-rw-r--r-- 1 www-data www-data 4 Aug 29 22:05 zmaudit.pid
srwxr-xr-x 1 www-data www-data 0 Aug 29 19:14 zmdc.sock
-rw------- 1 www-data www-data 0 Aug 29 22:34 zms-004826.lock
srwxr-xr-x 1 www-data www-data 0 Aug 29 22:34 zms-004826s.sock

I can't see jpeg's streaming from zm's console.
jpegs.replay.err.console.1.jpg
jpegs.replay.err.console.1.jpg (92.12 KiB) Viewed 7997 times
If I click the stop button and play afterwards, the errors produce:
Aug 29 22:39:51 opiplus web_php[1660]: ERR [socket_sendto( /run/zm/zms-004826s.sock ) failed: Connection refused]
Aug 29 22:39:51 opiplus web_php[1660]: ERR [getCmdResponse stream error: socket_sendto( /run/zm/zms-004826s.sock ) failed: Connection refused - checkStreamForErrors()]
Aug 29 22:39:52 opiplus web_php[1660]: ERR [socket_sendto( /run/zm/zms-004826s.sock ) failed: Connection refused]
Aug 29 22:39:52 opiplus web_php[1660]: ERR [getCmdResponse stream error: socket_sendto( /run/zm/zms-004826s.sock ) failed: Connection refused - checkStreamForErrors()]

On the contrary, if I click the "STILLS" menu and move the slide bar, than the individual jpeg images appear.

I can also change the camera settings in the storage tab, disabling the "Save JPEGs" and setting "Video Writer" to "H264 camera passthroug". The events are saved as "xxxx-video.mp4". The events saved as mp4 could be viewed as normal.

Anyway, for compatibility with the archive under ZM 1.29, I am seeking to stream the jpeg-saved events naturally, without converting them to mp4.
Is there a bug fix, or a missing library to achieve this task?
Thanks in advance.
pms
Posts: 11
Joined: Sat Aug 24, 2019 3:59 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by pms »

y52 wrote: Thu Aug 29, 2019 9:00 pm
I can't see jpeg's streaming from zm's console.
[img:download/file.php?id=2415]

On the contrary, if I click the "STILLS" menu and move the slide bar, than the individual jpeg images appear.
I have the same problem and I noticed:
- clear all browser cache + cookies (Firefox)
- log in to zoneminder
- open an event

The event will play just fine! You can even rewind it.

But the next played event will fail and result in the image you uploaded.
I am interested if this works for you too!
User avatar
iconnor
Posts: 2882
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by iconnor »

Look guys,

I have fixed a lot of issues since 1.32. If you are having troubles, the first thing to do is upgrade to latest master. Then if still having troubles I can probably fix it pretty quick.

1.33 is not the big breaking upgrade that 1.32 was. More of a refinement.

Also I need more testers
liderbug
Posts: 125
Joined: Wed Dec 19, 2007 4:46 pm

Re: ZM 1.32.3 (and 1.33.1) - bug on replay recorded JPEG images

Post by liderbug »

I'm on a RasPi 3B+ running Buster (d10). I'm still getting 1.32.3 How do I get 1.33?
I'd be more than happy to be your guinea pig (tester)

tks
Post Reply