Pi 4 with 1.32.2 - only 1 camera works

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
fatboy
Posts: 47
Joined: Wed Jul 02, 2008 11:42 am
Location: Country of Texas

Pi 4 with 1.32.2 - only 1 camera works

Post by fatboy »

I have zoneminder 1.32.2 running as a Xen VM Buster. 6 Zero W's (mix of stretch and buster raspbian) running rtsp via github.com/mpromonet/v4l2rtspserver installed w/.deb, 1024@10fps. /dev/shm: 47% with 3 CPU's@3GHz and 4G RAM. Pretty much wonderful!!!

Have new pi4 w/4G ram, elcheapo KESU 250G USB3 hard drive from our buddy Bezos, as root partition, not overclocking yet (a bit cranky w/undervoltage even with pi power supply, seems to recover quick enough - did the I did the usb-storage.quirks=174c:55aa:u for occasional disk timeout, will leave it running at 2GHZ full time - see if this thing can hang) but am ready, thanks to yet another purchase from Jeff - aluminium pi case with dual fans.

I've reproduced my working install on the pi (it's hard wired, wireless doesn't work - to many dropped packets ;~(>

I add my 1st pi, works great. add the 2nd pi and works, but kills the 1st pi feed, added again this AM and 1st pi works, second doesn't - or vice-versa depending on "who knows" - whatever!

Log snippet from syslog:

Nov 2 09:42:15 x-pi4 zmwatch[704]: INF [Restarting capture daemon for Monitor-5, no image since startup. Startup time was 1572705726 - now 1572705735 > 5]
Nov 2 09:42:15 x-pi4 zmdc[662]: INF ['zmc -m 5' sending stop to pid 1384 at 19/11/02 09:42:15]
Nov 2 09:42:15 x-pi4 zmc_m5[1384]: INF [zmc_m5] [Got signal 15 (Terminated), exiting]
Nov 2 09:42:15 x-pi4 zmdc[662]: INF ['zmc -m 5' exited normally]
Nov 2 09:42:20 x-pi4 zmdc[662]: INF [Starting pending process, zmc -m 5]
Nov 2 09:42:20 x-pi4 zmdc[662]: INF ['zmc -m 5' starting at 19/11/02 09:42:20, pid = 1393]
Nov 2 09:42:20 x-pi4 zmdc[1393]: INF ['zmc -m 5' started at 19/11/02 09:42:20]
Nov 2 09:42:21 x-pi4 zmc_m5[1393]: INF [zmc_m5] [Starting Capture version 1.32.3]
Nov 2 09:42:21 x-pi4 zmc_m5[1393]: INF [zmc_m5] [Priming capture from rtsp://192.168.0.152:8554/unicast]
Nov 2 09:42:21 x-pi4 zmc_m5[1393]: INF [zmc_m5] [Stream open rtsp://192.168.0.152:8554/unicast, parsing streams...]
Nov 2 09:42:24 x-pi4 zmc_m1[1155]: INF [zmc_m1] [Zero1: images:10600 - Capturing at 10.00 fps, capturing bandwidth 256680bytes/sec]
Nov 2 09:42:24 x-pi4 zmc_m5[1393]: ERR [zmc_m5] [Unable to open codec for video stream from rtsp://192.168.0.152:8554/unicast]
Nov 2 09:42:24 x-pi4 zmc_m5[1393]: ERR [zmc_m5] [Failed to prime capture of initial monitor]
Nov 2 09:42:34 x-pi4 zmc_m1[1155]: INF [zmc_m1] [Zero1: images:10700 - Capturing at 10.00 fps, capturing bandwidth 247706bytes/sec]
Nov 2 09:42:34 x-pi4 zmc_m5[1393]: INF [zmc_m5] [Priming capture from rtsp://192.168.0.152:8554/unicast]
Nov 2 09:42:34 x-pi4 zmc_m5[1393]: INF [zmc_m5] [Stream open rtsp://192.168.0.152:8554/unicast, parsing streams...]
Nov 2 09:42:38 x-pi4 zmc_m5[1393]: ERR [zmc_m5] [Unable to open codec for video stream from rtsp://192.168.0.152:8554/unicast]
Nov 2 09:42:38 x-pi4 zmc_m5[1393]: ERR [zmc_m5] [Failed to prime capture of initial monitor]
Nov 2 09:42:44 x-pi4 zmc_m1[1155]: INF [zmc_m1] [Zero1: images:10800 - Capturing at 10.00 fps, capturing bandwidth 261076bytes/sec]
Nov 2 09:42:45 x-pi4 zmwatch[704]: INF [Restarting capture daemon for Monitor-5, no image since startup. Startup time was 1572705754 - now 1572705765 > 5]
Nov 2 09:42:45 x-pi4 zmdc[662]: INF ['zmc -m 5' sending stop to pid 1393 at 19/11/02 09:42:45]
Nov 2 09:42:45 x-pi4 zmc_m5[1393]: INF [zmc_m5] [Got signal 15 (Terminated), exiting]
Nov 2 09:42:46 x-pi4 zmdc[662]: INF ['zmc -m 5' exited normally]
Nov 2 09:42:54 x-pi4 zmc_m1[1155]: INF [zmc_m1] [Zero1: images:10900 - Capturing at 10.00 fps, capturing bandwidth 222971bytes/sec]
Nov 2 09:42:55 x-pi4 zmwatch[704]: ERR [Memory map file '/dev/shm/zm.mmap.5' does not exist. zmc might not be running.]
Nov 2 09:42:56 x-pi4 zmwatch[704]: INF [Restarting capture daemon for Monitor-5, shared data not valid]
Nov 2 09:42:56 x-pi4 zmdc[662]: INF [Starting pending process, zmc -m 5]
Nov 2 09:42:56 x-pi4 zmdc[662]: INF ['zmc -m 5' starting at 19/11/02 09:42:56, pid = 1403]
Nov 2 09:42:56 x-pi4 zmdc[1403]: INF ['zmc -m 5' started at 19/11/02 09:42:56]
Nov 2 09:42:56 x-pi4 zmdc[662]: INF ['zmc -m 5' sending stop to pid 1403 at 19/11/02 09:42:56]
Nov 2 09:42:56 x-pi4 zmdc[662]: INF ['zmc -m 5' exited, signal 14]
Nov 2 09:43:04 x-pi4 zmc_m1[1155]: INF [zmc_m1] [Zero1: images:11000 - Capturing at 10.00 fps, capturing bandwidth 241865bytes/sec]
Nov 2 09:43:06 x-pi4 zmwatch[704]: INF [Restarting capture daemon for Monitor-5, no image since startup. Startup time was 0 - now 1572705786 > 5]
Nov 2 09:43:06 x-pi4 zmdc[662]: INF [Command 'zmc -m 5' removed from pending list at 19/11/02 09:43:06]
Nov 2 09:43:14 x-pi4 zmc_m1[1155]: INF [zmc_m1] [Zero1: images:11100 - Capturing at 10.00 fps, capturing bandwidth 280178bytes/sec]

For grins I made a note in zmdc.pl:
per https://github.com/ZoneMinder/zoneminde ... 992a2998e1 - it is there by default on 1.32.2!
my $fd = 3; # leave stdin,stdout,stderr open. Closing them causes problems with libx264

Kinda thinking a hardware issue (bleeding edge pi).

Any thoughts/experience appreciated!
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: Pi 4 with 1.32.2 - only 1 camera works

Post by snake »

You moved from a Xen VM to an RPI, am I correct? That is moving from x86 to ARM. ARM can't keep up with the same number of cameras. You can probably get more than one though. Try lowering the FPS on the cameras, and see if you can get two running. You can also lower the Resolution. That is my first guess.
fatboy
Posts: 47
Joined: Wed Jul 02, 2008 11:42 am
Location: Country of Texas

Re: Pi 4 with 1.32.2 - only 1 camera works

Post by fatboy »

going from one rtsp feed to two?

Please!
fatboy
Posts: 47
Joined: Wed Jul 02, 2008 11:42 am
Location: Country of Texas

Re: Pi 4 with 1.32.2 - only 1 camera works

Post by fatboy »

Nobody?

CPU's are about idling, 3G ram free, no swapping.

From sysadmin point, everything looks good.

I upgraded the usb3 7200 rpm WD, using the known to work adapter - StarTech SATA to USB Cable - USB 3.0 to 2.5” SATA III Hard Drive Adapter (USB3S2SAT3CB) , no usb timeouts, kern.log is clear as a bell.

Only thing I'm seeing is in the apache error.log:

Unable to connect to zmc process. Please ensure that it is running.: /usr/lib/zoneminder/cgi-bin/nph-zms, referer: http://x-pi4/zm/index.php?view=watch&mid=1

Which makes perfect sense if I'm trying to view a stream that isn't working.

Thoughts appreciated!
fatboy
Posts: 47
Joined: Wed Jul 02, 2008 11:42 am
Location: Country of Texas

Re: Pi 4 with 1.32.2 - only 1 camera works - SOLVED

Post by fatboy »

Working *great* now!

Increase GPU memory:

/boot/config.txt

gpu_mem=512
hahasu
Posts: 1
Joined: Tue Aug 25, 2020 4:40 am

Re: Pi 4 with 1.32.2 - only 1 camera works

Post by hahasu »

changing to 512 didn't help it reduced to 80% from 99%

I am running ZM 1.34 on pi4, with just 1 Camera, am I missing something?
Post Reply