Error

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
RippieUK
Posts: 7
Joined: Tue Oct 29, 2019 10:12 pm

Error

Post by RippieUK »

Hi all,

I am brand new to Linux really and ZoneMinder for that matter. I have purchased a raspberry pi 4 to test linux with and zoneminder.

I am seeing errors in the console log.

I followed https://wiki.zoneminder.com/Raspberry_Pi_4_-_Raspbian

Under ZM install i went straight in to remove 'non-free' under etc/apt/sources.list but not sure about the line above it.

otherwise i followed the guide all the way down to "Optional Tweaks" and stopped before doing these.

I have installed Rasbian buster with desktop.

Not sure where the log files are but i do see this in the console log menu
2019-10-29 22:18:14 zmdc 707 ERR 'zmfilter.pl --filter_id=1 --daemon' exited abnormally, exit status 9 zmdc.pl
2019-10-29 22:18:14 zmdc 707 ERR 'zmfilter.pl --filter_id=2 --daemon' exited abnormally, exit status 9 zmdc.pl
2019-10-29 22:18:14 zmdc 707 ERR 'zmaudit.pl -c' exited abnormally, exit status 255 zmdc.pl
2019-10-29 22:18:14 zmaudit 1885 FAT zmaudit.pl appears to already be running at pid 942. If not, please delete /var/run/zm/zmaudit.pid or use the --force command line option. zmaudit.pl

came across this post that indicated it could be something to do with the php.ini file and the date?
viewtopic.php?f=21&t=19025&start=15

I put in date.timezone ="Europe/London" and restarted the whole system. still no joy.

Hopefully someone can help :)
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: Error

Post by snake »

You haven't indicated what the problem actually is, asides from the console log. What is not working?

The logs for Zoneminder are in syslog, and in /var/log/zm/ (also in db).

Copy some output from your syslog here that includes Zoneminder startup. Also what happens when you type as root

Code: Select all

systemctl status zoneminder.service
or

Code: Select all

service zoneminder status
Finally, you can check the output of top, or htop (may need to install htop) to see what Zoneminder processes are and aren't running. To get a better idea of how ZM works, refer to
https://zoneminder.readthedocs.io/en/st ... nents.html
RippieUK
Posts: 7
Joined: Tue Oct 29, 2019 10:12 pm

Re: Error

Post by RippieUK »

Hi Snake, to be honest at the time of writing i did not have a problem other than the error in the log. But i did ask because i am unable to get a RTSP camera to work here but i know it works because in Shinobi it worked/works.

there are no files in /var/log/zm (please see screenshot)
Also included a screenshot of htop

I am new to this linux and zoneminder, so please bear with my Linux skills :)

systemctl status zoneminder.service Output
zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-10-29 22:28:03 GMT; 1 day 22h ago
Docs: http://zoneminder.readthedocs.org/en/latest/
Process: 625 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=0/SUCCESS)
Main PID: 714 (zmdc.pl)
Tasks: 10 (limit: 4915)
Memory: 230.5M
CGroup: /system.slice/zoneminder.service
├─ 714 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
├─ 967 /usr/bin/perl -wT /usr/bin/zmwatch.pl
├─1033 /usr/bin/perl -w /usr/bin/zmtelemetry.pl
├─1037 /usr/bin/perl -wT /usr/bin/zmstats.pl
└─1739 /usr/bin/zmc -m 1

Oct 31 20:49:56 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:56 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:56 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:56 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:56 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:56 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:57 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:57 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:57 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:49:57 raspberrypi zmc_m1[1739]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
lines 3-25/25 (END)

2nd command :
service zoneminder status
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-10-29 22:28:03 GMT; 1 day 22h ago
Docs: http://zoneminder.readthedocs.org/en/latest/
Process: 625 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=0/SUCCESS)
Main PID: 714 (zmdc.pl)
Tasks: 4 (limit: 4915)
Memory: 64.5M
CGroup: /system.slice/zoneminder.service
├─ 714 /usr/bin/perl -wT /usr/bin/zmdc.pl startup
├─ 967 /usr/bin/perl -wT /usr/bin/zmwatch.pl
├─1033 /usr/bin/perl -w /usr/bin/zmtelemetry.pl
└─1037 /usr/bin/perl -wT /usr/bin/zmstats.pl

Oct 31 20:52:32 raspberrypi zmc_m1[1833]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:52:32 raspberrypi zmwatch[967]: INF [Restarting capture daemon for Side of house, no image since startup. Startup time was 1572555145 - now 1572555152 > 5]
Oct 31 20:52:32 raspberrypi zmc_m1[1833]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:52:33 raspberrypi zmc_m1[1833]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:52:33 raspberrypi zmc_m1[1833]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:52:33 raspberrypi zmc_m1[1833]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:52:33 raspberrypi zmdc[714]: INF ['zmc -m 1' sending stop to pid 1833 at 19/10/31 20:52:33]
Oct 31 20:52:33 raspberrypi zmc_m1[1833]: INF [zmc_m1] [Got signal 15 (Terminated), exiting]
Oct 31 20:52:33 raspberrypi zmc_m1[1833]: ERR [zmc_m1] [Unable to send packet at frame 0: Unknown error occurred, continuing]
Oct 31 20:52:33 raspberrypi zmdc[714]: INF ['zmc -m 1' exited normally]
lines 2-24/24 (END)
Attachments
Screenshot from 2019-10-31 21-02-14.png
Screenshot from 2019-10-31 21-02-14.png (216.08 KiB) Viewed 5127 times
Screenshot from 2019-10-31 20-56-50.png
Screenshot from 2019-10-31 20-56-50.png (355.09 KiB) Viewed 5127 times
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: Error

Post by snake »

the status commands show that ZM is running and installed correctly.

What is the make/model of camera? What settings did you use for the camera setup?

Cameras can be tested in VLC gui or terminal ffmpeg (ffmpeg -i rtsp://<user>:<pass>@<ip>:<port>/<path> > output.mp4). Cameras don't run in yahoo, that is a web site. You are probably referring to the web browser. You can right click - view image in browsers for MJPEG streams and get the path from there. RTSP you should try Onvif.
RippieUK
Posts: 7
Joined: Tue Oct 29, 2019 10:12 pm

Re: Error

Post by RippieUK »

Hi Snake,

So i used the onvif scanner and it preset most of these settings. but here are some settings:

Source Type = FFMPEG
Function = Monitor
Analysis FPS = blank
Max FPS = 30
Alarm Max FPS = 30

Source path: rtsp://admin:admin@192.168.1.128:554/snl/live/1/1
Method = TCP
Target Color space = 32
Capture width = 1920
Capture height = 1080

Save JPEGS = Disabled
Video writer = x264 Encode - Not compatible on arm

Added an attachment with the stream settings form the camera's own config.


Make / Model:Concept Pro / AIR2024-IP4M-Z (link)

VLC open network stream works with URL: rtsp://admin:admin@192.168.1.128:554/snl/live/1/1

Running FFMPEG in terminal gives this:
rippie@DESKTOP:~$ ffmpeg -i rtsp://admin:admin@192.168.1.128:554/snl/live/1/1 > output.mp4
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, rtsp, from 'rtsp://admin:admin@192.168.1.128:554/snl/live/1/1':
Metadata:
title : NVT
comment : From NVT
Duration: N/A, start: 0.666611, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080, 30 fps, 25 tbr, 90k tbn, 60 tbc
Stream #0:1: Data: none
At least one output file must be specified
rippie@DESKTOP:~$
Attachments
Screenshot from 2019-11-01 07-55-02.png
Screenshot from 2019-11-01 07-55-02.png (29.34 KiB) Viewed 5105 times
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: Error

Post by snake »

ZM 1.32 on ARM has a bug where by default it's set to use the H264 encoding. Change that to H264 passthrough. Passthrough has less CPU usage than H264 encoding or the JPEG saving. Alternatively, you can try the JPEG saving, but it will be less efficient.

Set Max FPS in ZM to 0 (that is used for local / usb cameras only). Your camera is running at 1920x1080. That is a lot for an RPI, depending on the framerate. Lower the resolution to start (on the camera, and then on ZM). Try 640x480 or 720p first. Get it running, then you can increase the resolution after. At some point, it might just not work. This is when the RPI can't keep up. The frame rate you set on the camera should also be low. 10 will be fine at 640x480, but I would set it at 5 or so for starters. You can increase it later.

I made a mistake with the ffmpeg command, it should be just

Code: Select all

ffmpeg -i  rtsp://admin:admin@192.168.1.128:554/snl/live/1/1  output.mp4
But regardless, you can see from the verbose output that the video stream you entered is correct and has the following specifications:

Code: Select all

Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080, 30 fps, 25 tbr, 90k tbn, 60 tbc
What matters here for ZM is the h264, the 1920x1080, and the 30 fps. The resolution you enter into ZM must match the camera stream.
RippieUK
Posts: 7
Joined: Tue Oct 29, 2019 10:12 pm

Re: Error

Post by RippieUK »

I am just testing settings now but i wonder if you have any recommendations for the other camera settings like:
  • I Frame Interval
  • Max Bitrate(kbps)(200-8000)
  • Image Quality
My camera will only set resolution to 1280x720 as the lowest :) Should ZM be set to the same or can that be lower?
RippieUK
Posts: 7
Joined: Tue Oct 29, 2019 10:12 pm

Re: Error

Post by RippieUK »

And a good day was had by all :)
Screenshot from 2019-11-01 21-27-59.png
Screenshot from 2019-11-01 21-27-59.png (13.85 KiB) Viewed 5084 times
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: Error

Post by snake »

For the other settings, you can leave them at the defaults if your camera is working. Read the ZM docs if you are interested in more information. Perhaps purchase a book on H264 encoding...

ZM should be set to the same resolution that VLC or FFMPEG reports. Sometimes cameras have non-standard resolutions, so don't expect it to be 1280x720 or 1920x1080 with every camera.
RippieUK
Posts: 7
Joined: Tue Oct 29, 2019 10:12 pm

Re: Error

Post by RippieUK »

Thank you very much for your help. i will go and study H264 in more detail.
Post Reply