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.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: ZM 1.32.3 and 1.33.1 - record MJPEG images

Post by rockedge »

No...but actually the fact that there are only 1-2 core developers and the couple of others volunteer time to test and respond to the many forum requests....try to get to the bottom of everyone's problem.

So relax....I will look into your problem here because I have seen almost all of them.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: ZM 1.32.3 and 1.33.1 - record MJPEG images

Post by rockedge »

can you see any recorded jpeg images in the events directory that corresponds to the recorded event?

I have as default storage /var/cache/zoneminder/events
detxm80
Posts: 38
Joined: Fri Oct 13, 2017 9:42 am

Re: ZM 1.32.3 and 1.33.1 - record MJPEG images

Post by detxm80 »

Yes, recording jpegs (many and many jpegs, frustrating) work fine.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: ZM 1.32.3 and 1.33.1 - record MJPEG images

Post by pat2 »

I confirm. In the folder there are many jpegs.
The strange is it's possible to play the stream, and record it in jpegs. But not possible to replay what recorded on jpegs.

My impression is the bug (if a bug) has not been still collected from ZM developers/testers since not frequent: only on ARM (X264 is not compatible on ARM, so Video writer is disabled on ARM) and on MJPEG cameras.

thanks
---------------------------------------------------------------------------
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 - record MJPEG images

Post by pat2 »

@rockedge, I have an update.

I installed VMware on my laptop (an Intel i5 6300U) and a fresh Ubuntu 18.04.
Then I installed ZM 1.32.3 following exactly the intructions/script at https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

So, for my MJPEG camera I'm able to replay the recorded streams if setting Save Jpeg = disabled and Video writer = X264 Encode (on this platform it is enabled)

if trying to set Save Jpeg = all possible values different from disabled and Video writer = disabled, I'm able to see all jpegs in /var/cache/zoneminder/events through the ls command, but I'm not able to replay the recorded JPEG images (exactly as it happens for the Odroid ARM board).

So it seems a bug on all platforms, not only on ARM. For platforms different by ARM it's not a big issue since there is a workaround: to use Video writer = X264 Encode (because enabled on all platform different by ARM); but on ARM platform is a roadblock.

I don't think it's an error of mine installing ZM since I exactly followed the instrctions/script mentioned above! :cry:

Is it possible none tested the case "MJPEG camera and Save Jpeg enabled" ??!?

It's a roadbloack for all owners of ARM boards (Raspberry, Odroid, ...) and MJPEG cameras. Not possible to replay recorded events on 1.32 and following versions! The only workaround -I found- is to go back 1.30.4 (probably the most stable version ever built), but that's unbelievable a regression on what already working well.
Please let me know. thanks

EDIT: moreover ZM 1.32 is able to generate a video from recorded JPEG images through the Video button. And then downloading the video it's possible to see it! So it seems ZM 1.32 correctly records jpeg images, but it's not able to view them clicking directly on the recorded event (note that it works in ZM 1.30.4!!).
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
User avatar
iconnor
Posts: 2879
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 »

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/
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 »

Hi Isaac, thanks for your answer.
I'm sorry but I cannot understand how hell for a fresh Ubuntu install and a fresh ZM install (according to the script provided on the wiki) I could modify the variables you are mentioning. And I have to be treated like a stupid.
Probably i'm a stupid newbie but you are forgetting the free spirit and the reason you started to develop ZM.

Anyway before disturbing you I already read the reccomendation at https://zoneminder.readthedocs.io/en/la ... untu-18-04 at chapter Socket_sendto or no live streaming

I have no issue on live MJPEG streaming, it is only on recorded JPEG (from mjpeg stream). Anyway:

First, the recommendation is valid for 1.30.4 since in 1.32 there is no more Paths sheet in Options.
Second, I found for 1.32 /etc/zm/conf.d/01-system-paths.conf (i hope i found the correct file) and I checked into it:

# ZoneMinder url path to the zms streaming server
ZM_PATH_ZMS=/zm/cgi-bin/nph-zms

I think it is correct.

In my /etc/apache2/conf-enabled/zoneminder.conf I have:

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

note: without "" before and at the end of /zm/cgi-bin

I'm able to view and NOT able to replay mjpeg stream.

I receive the warn/error msg in the log console:

Code: Select all

2019-04-27 19:36:52	web_js		3554	ERR	getCmdResponse stream error: No data to read from socket - checkStreamForErrors()	?view=event	
2019-04-27 19:36:52	web_php		3554	ERR	No data to read from socket	/usr/share/zoneminder/www/includes/functions.php	2048
2019-04-27 19:36:52	web_php		3554	ERR	Timed out waiting for msg /var/run/zm/zms-363525s.sock	/usr/share/zoneminder/www/ajax/stream.php	90
...
2019-04-27 19:36:07	zmdc		3392	WAR	Can't find process with command of 'zma -m 1'	zmdc.pl
....
2019-04-27 19:35:43	zmdc		3392	WAR	Can't find process with command of 'zma -m 1'	zmdc.pl
and in the apache error.log

Code: Select all

[Sat Apr 27 18:33:42.760038 2019] [cgi:warn] [pid 3502] [client 192.168.1.97:57956] AH01220: Timeout waiting for output from CGI script /usr/lib/zoneminder/cgi-bin/nph-zms, referer: http://192.168.1.208/zm/?view=event&eid=7&filter[Query][terms][0][attr]=MonitorId&filter[Query][terms][0][op]=%3d&filter[Query][terms][0][val]=1&page=1&popup=1
it seem waiting for data, but data are present:

Code: Select all

root@odroidxu4:/var/cache/zoneminder/events# ls /var/cache/zoneminder/events/IndoorZonagiorno/2019-04-27/9/
00001-capture.jpg  00018-capture.jpg  00035-capture.jpg  00052-capture.jpg  00069-capture.jpg  00086-capture.jpg  00103-capture.jpg  00120-capture.jpg  00137-capture.jpg
00002-capture.jpg  00019-capture.jpg  00036-capture.jpg  00053-capture.jpg  00070-capture.jpg  00087-capture.jpg  00104-capture.jpg  00121-capture.jpg  00138-capture.jpg
00003-capture.jpg  00020-capture.jpg  00037-capture.jpg  00054-capture.jpg  00071-capture.jpg  00088-capture.jpg  00105-capture.jpg  00122-capture.jpg  00139-capture.jpg
00004-capture.jpg  00021-capture.jpg  00038-capture.jpg  00055-capture.jpg  00072-capture.jpg  00089-capture.jpg  00106-capture.jpg  00123-capture.jpg  00140-capture.jpg
00005-capture.jpg  00022-capture.jpg  00039-capture.jpg  00056-capture.jpg  00073-capture.jpg  00090-capture.jpg  00107-capture.jpg  00124-capture.jpg  00141-capture.jpg
00006-capture.jpg  00023-capture.jpg  00040-capture.jpg  00057-capture.jpg  00074-capture.jpg  00091-capture.jpg  00108-capture.jpg  00125-capture.jpg  00142-capture.jpg
00007-capture.jpg  00024-capture.jpg  00041-capture.jpg  00058-capture.jpg  00075-capture.jpg  00092-capture.jpg  00109-capture.jpg  00126-capture.jpg  00143-capture.jpg
00008-capture.jpg  00025-capture.jpg  00042-capture.jpg  00059-capture.jpg  00076-capture.jpg  00093-capture.jpg  00110-capture.jpg  00127-capture.jpg  00144-capture.jpg
00009-capture.jpg  00026-capture.jpg  00043-capture.jpg  00060-capture.jpg  00077-capture.jpg  00094-capture.jpg  00111-capture.jpg  00128-capture.jpg  00145-capture.jpg
00010-capture.jpg  00027-capture.jpg  00044-capture.jpg  00061-capture.jpg  00078-capture.jpg  00095-capture.jpg  00112-capture.jpg  00129-capture.jpg  00146-capture.jpg
00011-capture.jpg  00028-capture.jpg  00045-capture.jpg  00062-capture.jpg  00079-capture.jpg  00096-capture.jpg  00113-capture.jpg  00130-capture.jpg  00147-capture.jpg
00012-capture.jpg  00029-capture.jpg  00046-capture.jpg  00063-capture.jpg  00080-capture.jpg  00097-capture.jpg  00114-capture.jpg  00131-capture.jpg  00148-capture.jpg
00013-capture.jpg  00030-capture.jpg  00047-capture.jpg  00064-capture.jpg  00081-capture.jpg  00098-capture.jpg  00115-capture.jpg  00132-capture.jpg  00149-capture.jpg
00014-capture.jpg  00031-capture.jpg  00048-capture.jpg  00065-capture.jpg  00082-capture.jpg  00099-capture.jpg  00116-capture.jpg  00133-capture.jpg  00150-capture.jpg
00015-capture.jpg  00032-capture.jpg  00049-capture.jpg  00066-capture.jpg  00083-capture.jpg  00100-capture.jpg  00117-capture.jpg  00134-capture.jpg
00016-capture.jpg  00033-capture.jpg  00050-capture.jpg  00067-capture.jpg  00084-capture.jpg  00101-capture.jpg  00118-capture.jpg  00135-capture.jpg
00017-capture.jpg  00034-capture.jpg  00051-capture.jpg  00068-capture.jpg  00085-capture.jpg  00102-capture.jpg  00119-capture.jpg  00136-capture.jpg
root@odroidxu4:/var/cache/zoneminder/events# ls /var/cache/zoneminder/events/1/2019-04-27/9/
00001-capture.jpg  00018-capture.jpg  00035-capture.jpg  00052-capture.jpg  00069-capture.jpg  00086-capture.jpg  00103-capture.jpg  00120-capture.jpg  00137-capture.jpg
00002-capture.jpg  00019-capture.jpg  00036-capture.jpg  00053-capture.jpg  00070-capture.jpg  00087-capture.jpg  00104-capture.jpg  00121-capture.jpg  00138-capture.jpg
00003-capture.jpg  00020-capture.jpg  00037-capture.jpg  00054-capture.jpg  00071-capture.jpg  00088-capture.jpg  00105-capture.jpg  00122-capture.jpg  00139-capture.jpg
00004-capture.jpg  00021-capture.jpg  00038-capture.jpg  00055-capture.jpg  00072-capture.jpg  00089-capture.jpg  00106-capture.jpg  00123-capture.jpg  00140-capture.jpg
00005-capture.jpg  00022-capture.jpg  00039-capture.jpg  00056-capture.jpg  00073-capture.jpg  00090-capture.jpg  00107-capture.jpg  00124-capture.jpg  00141-capture.jpg
00006-capture.jpg  00023-capture.jpg  00040-capture.jpg  00057-capture.jpg  00074-capture.jpg  00091-capture.jpg  00108-capture.jpg  00125-capture.jpg  00142-capture.jpg
00007-capture.jpg  00024-capture.jpg  00041-capture.jpg  00058-capture.jpg  00075-capture.jpg  00092-capture.jpg  00109-capture.jpg  00126-capture.jpg  00143-capture.jpg
00008-capture.jpg  00025-capture.jpg  00042-capture.jpg  00059-capture.jpg  00076-capture.jpg  00093-capture.jpg  00110-capture.jpg  00127-capture.jpg  00144-capture.jpg
00009-capture.jpg  00026-capture.jpg  00043-capture.jpg  00060-capture.jpg  00077-capture.jpg  00094-capture.jpg  00111-capture.jpg  00128-capture.jpg  00145-capture.jpg
00010-capture.jpg  00027-capture.jpg  00044-capture.jpg  00061-capture.jpg  00078-capture.jpg  00095-capture.jpg  00112-capture.jpg  00129-capture.jpg  00146-capture.jpg
00011-capture.jpg  00028-capture.jpg  00045-capture.jpg  00062-capture.jpg  00079-capture.jpg  00096-capture.jpg  00113-capture.jpg  00130-capture.jpg  00147-capture.jpg
00012-capture.jpg  00029-capture.jpg  00046-capture.jpg  00063-capture.jpg  00080-capture.jpg  00097-capture.jpg  00114-capture.jpg  00131-capture.jpg  00148-capture.jpg
00013-capture.jpg  00030-capture.jpg  00047-capture.jpg  00064-capture.jpg  00081-capture.jpg  00098-capture.jpg  00115-capture.jpg  00132-capture.jpg  00149-capture.jpg
00014-capture.jpg  00031-capture.jpg  00048-capture.jpg  00065-capture.jpg  00082-capture.jpg  00099-capture.jpg  00116-capture.jpg  00133-capture.jpg  00150-capture.jpg
00015-capture.jpg  00032-capture.jpg  00049-capture.jpg  00066-capture.jpg  00083-capture.jpg  00100-capture.jpg  00117-capture.jpg  00134-capture.jpg
00016-capture.jpg  00033-capture.jpg  00050-capture.jpg  00067-capture.jpg  00084-capture.jpg  00101-capture.jpg  00118-capture.jpg  00135-capture.jpg
00017-capture.jpg  00034-capture.jpg  00051-capture.jpg  00068-capture.jpg  00085-capture.jpg  00102-capture.jpg  00119-capture.jpg  00136-capture.jpg

I tried too, as you suggested, ScriptAlias /cgi-bin "/usr/lib/zoneminder/cgi-bin"

i'm NOT able to view and NOT able to replay mjpeg stream :-(

I checked too the contents of /usr/lib/zoneminder/cgi-bin:

Code: Select all

odroid@odroidxu4:~$ ls -lh /usr/lib/zoneminder/cgi-bin
total 1.1M
lrwxrwxrwx 1 root root    3 Dec  8 17:06 nph-zms -> zms
-rwxr-xr-x 1 root root 1.1M Dec  8 17:06 zms
is that correct? I think yes.

if you want I could expose my board for your check.
I could pay for support.
thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
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 »

you know if I remember correctly...a while ago I could see a live stream...also record an event but i could not replay the event as an mp4 or jpeg.....I think I fixed it by finding out I was missing a library but I don't remember the specific one. I will try to recall what I did to fix it...I do remember it was a simple fix.
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 »

hi rock,

you touched the point!
Able to see the live MJPEG stream, but not able to replay the recorded JPEG images.
The only difference: in case of ffmpeg camera, I'm able to replay the mp4 recorded file.
It's not a matter of the specific path of nph-zms differently I should not be able to see the live MJPEG stream.

There should be a difference between the developers platform and a fresh platform.
Debugging on a fresh platform like I described (wmware, new ubuntu 18.04, LAMP, script on wiki) it should be easy to check the error. Unfortunately I'm not expert on this technology.

Please, if you will remember the library to be installed let me know. Not nly for me, but for other users in the same situation.
thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
User avatar
iconnor
Posts: 2879
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 »

You are right, if live view works, the the zms path is correct.

Here's another thought: Is AUTH_HASH_LOGINS on? Options->SYstem->AUTH_HASH_LOGINS

I seem to remember a case where we weren't doing auth correctly without hash logins...

Are you using auth at all?

Please update to latest master, it has a lot of fixes since 1.33.1
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 »

Isaac, thanks for the answer.

Unfortunately AUTH_HASH_LOGINS is OFF.
I'm testing without AUTH at all.

I will try to install 1.33 from scratch and I will let you konow.

Thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
detxm80
Posts: 38
Joined: Fri Oct 13, 2017 9:42 am

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

Post by detxm80 »

Pat i ve already try 1.33.6 and the issue persist....
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 »

when viewing an Event you can play the mp4 but what are you doing to play the jpegs?

Can you use the Stills button to view the individual jpegs?
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 »

yes, confirmed.

Just installed the last ZM 1.33.6 on a fresh ubuntu 18.04 on Odroid XU4 (ARM processor).
Able to see the mjpeg live stream, not able to replay the recorded jpegs. Even if present the jpg files in /var/cache/zoneminder/events.

yes, I can replay mp4 when the source is ffmpeg.

when the source is mjpeg, since I'm on ARM platfrom, the only option is to save jpegs. and the image remains blocked.
i see the event with the thumbnail.

Interesting:
If I push Stills button, the first 7 x 14 +1 (=99) individual jpegs are grayed, the remaining (from 100 to 303) are correct!

I can scroll with >> and << buttons. The others buttons are disabled.

note: differently from 1.32.3, with 1.33.6 I'm not able to generate a video. It remains in "Generating video..." status.

thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
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 »

the fact that you can not create the video is a sign something is not right. Does the export function work?
I seem to remember the permissions and ownership of some directories were incorrect which caused it....but this could also be something else...I ran into all kinds of problems figuring out how to install and run ZM on different Puppy Linux variations...and what you describe was one of them.
Post Reply