ZM questions

Current Development version likely to have breaking changes
Post Reply
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

ZM questions

Post by jmcguckin »

I work for a real estate management company and we;d like to monitor our properties. I've just started looking at Zone Minder.

I'd like to scale a system to hundreds, even thousands of cameras

1) What process receives the video stream from the camera?
2) Does the camera initiate the connection or does ZM? I thinking about cheapo DSL connections here where DHCP will change the camera's IP address...
3) What format is video stored on disk?
4) How much disk is required to store a month's work of video at 5K color resolution for a single camera?
5) Postgres? What does MySQL do that is unique to MySQL?
6) What is stored in the DB, Config info, motion events?

Thanks,

Joe
User avatar
iconnor
Posts: 2925
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM questions

Post by iconnor »

I would recommend enlisting our professional services to help you implement this. Reach out to isaac@zoneminder.com for further discussions about that.
1) What process receives the video stream from the camera?
zmc. There is 1 per camera.
2) Does the camera initiate the connection or does ZM? I thinking about cheapo DSL connections here where DHCP will change the camera's IP address...
ZM does. You will likely need a small device at each site to act as a vpn bridge. IPs will need to be configured to not change.

3) What format is video stored on disk?
There are options. Generally we store whatever the camera sends h264/h265 into an mp4 container.

4) How much disk is required to store a month's work of video at 5K color resolution for a single camera?
Depends. On codec, framerate, quality settings, etc. Let's say 1TB/camera.

5) Postgres? What does MySQL do that is unique to MySQL?
There is work being done to make it work with Postgres. Nothing special about mysql, that's just what ZM was written to use.

6) What is stored in the DB, Config info, motion events?
Yes.Plus Logs, User accounts, etc.
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

Re: ZM questions

Post by jmcguckin »

Hey,

Thanks for answering my questions. Why not store everything on disk as H.265? Better compression and pretty much all browsers have support for it - right? If you're not transcoding - just writing what the camera sends, you should be able to support large numbers of cameras per server. I saw an earlier message from you that a large system you put together had about 8 cameras per server - why so little?

Joe
User avatar
iconnor
Posts: 2925
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM questions

Post by iconnor »

You can re-encode what the camera sends to h265 if you have the gpu/cpu to do it. Unfortunately no, only Safari on Macs with the right hardware support h265. There is talk in dev channels for chrome to start supporting it but I have no idea when that will come around. We are working on a javascript library that plays it in js... but that takes a ton of cpu. Also we can play it back by decoding to jpegs but there is no audio support. So it is often easier to just stick with h264. AV1 should be better.

Hardware requirements are a matter of what you are doing. If you aren't doing motion detection, then yeah no decoding needed and you can do tons of cameras. in general at 720p doing full motion detection it is 4 cameras per core. You said 5k... so now we are talking 1 core/cam. So that's not really an option.
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

Re: ZM questions

Post by jmcguckin »

I've got ZM installed. How do I ad a camera? I have a couple of LTS IP cameras someone gave me. I'm told there are OEM versions of HIK cameras...
I can login to the camera and get a control panel and Video. How do I add this camera to ZM, what URL do I use to stream video from the camera?

What are channels?

What are substreams?

Thanks,

Joe
dougmccrary
Posts: 1245
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: ZM questions

Post by dougmccrary »

From the console, click "ADD" and the try either of the two icons top right. May fill in enough to get started.
Try stuff - check the wiki, you can't break it, easily, anyway.
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

Re: ZM questions

Post by jmcguckin »

Well,

I filled in most of what I need - I think. I can rtsp to the camera and get video. But the ZM monitor says 'not capturing'
Once I get 1 camera working, I think I can get the others going...

Joe
dougmccrary
Posts: 1245
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: ZM questions

Post by dougmccrary »

UDP vs TCP can be a problem. If that's not it
post what you have on the General and Source pages.
And ideally, what you used in VLC or whatever to get the camera URL.

And yeah, the first one is the hardest until you get some wonky camera. :?
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

Re: ZM questions

Post by jmcguckin »

I used a stanDalone camera tester to get the Cameras's URL.
It said the URL was rtsp://admin:abcd1234@209.81.2.53/Streaming/Channels/101
Going through the camera config pages, I don't see a button for UDP/TCP, so I have set ZM to both with
the same result... No recorded video.

When I type it into the Browser (Safari) it startes VLC and displays live video.

So, the URL works...
Camera settings
Camera settings
Screen Shot 2023-12-07 at 4.17.25 PM.png (301.91 KiB) Viewed 58598 times
Attachments
monitor settings
monitor settings
Screen Shot 2023-12-07 at 4.29.40 PM.png (52.75 KiB) Viewed 58598 times
camera settingd
camera settingd
Screen Shot 2023-12-07 at 4.28.14 PM.png (186.92 KiB) Viewed 58598 times
User avatar
iconnor
Posts: 2925
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM questions

Post by iconnor »

Select a server for. You have selected none.
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

Re: ZM questions

Post by jmcguckin »

Ok, the server button only gives me the options of "none" or "Auto". choosing Auto, then saving doesn't change anything. Does the server have to be listed in a config file somewhere?

Here's the Log Output:


Date/Time
Component
Server
PID
Level
Message
File
Line
12/8/23, 8:09:18 PM UTC zmdc 62869 ERR 'zmc -m 1' exited abnormally, exit status 255 zmdc.pl -
12/8/23, 8:09:18 PM UTC zmc_m1 205616 FAT No host specified for remote camera zm_remote_camera.cpp 72
12/8/23, 8:09:17 PM UTC zmdc 63280 INF 'zmc -m 1' started at 23/12/08 12:09:17 zmdc.pl -
12/8/23, 8:09:17 PM UTC zmdc 62869 INF 'zmc -m 1' starting at 23/12/08 12:09:17, pid = 63280 zmdc.pl -
12/8/23, 8:09:17 PM UTC zmdc 62869 INF Starting pending process, zmc -m 1 zmdc.pl -
12/8/23, 8:09:17 PM UTC zmdc 66664 ERR 'zmc -m 1' exited abnormally, exit status 255 zmdc.pl -
12/8/23, 8:09:17 PM UTC zmc_m1 102110 FAT No host specified for remote camera zm_remote_camera.cpp 72
12/8/23, 8:09:16 PM UTC zmdc 62869 ERR 'zmc -m 1' exited abnormally, exit status 255 zmdc.pl -
12/8/23, 8:09:16 PM UTC zmc_m1 205616 FAT No host specified for remote camera zm_remote_camera.cpp 72
12/8/23, 8:09:16 PM UTC zmdc 63279 INF 'zmc -m 1' started at 23/12/08 12:09:16 zmdc.pl -
12/8/23, 8:09:16 PM UTC zmdc 66664 INF 'zmc -m 1' starting at 23/12/08 12:09:16, pid = 63279 zmdc.pl -
12/8/23, 8:09:16 PM UTC zmdc 66664 INF Starting pending process, zmc -m 1 zmdc.pl -
12/8/23, 8:09:15 PM UTC zmc_m2 205317 ERR Failed to prime capture of initial monitor zmc.cpp 259
12/8/23, 8:09:15 PM UTC zmc_m2 205317 ERR Unable to open input rtsp://209.81.2.53/Streaming/Channels/101 due to: Connection refused zm_ffmpeg_camera.cpp 326
12/8/23, 8:09:15 PM UTC zmdc 63278 INF 'zmc -m 1' started at 23/12/08 12:09:15 zmdc.pl -
12/8/23, 8:09:15 PM UTC zmdc 62869 INF 'zmc -m 1' starting at 23/12/08 12:09:15, pid = 63278 zmdc.pl -
12/8/23, 8:09:15 PM UTC zmdc 62869 INF Command 'zmc -m 1' removed from pending list at 23/12/08 12:09:15 zmdc.pl -
12/8/23, 8:09:15 PM UTC zmwatch 62919 INF Restarting capture daemon for 1 Monitor-1, shared data not valid zmwatch.pl -
12/8/23, 8:09:15 PM UTC zmwatch 62919 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/8/23, 8:09:15 PM UTC zmdc 62869 ERR 'zmc -m 1' exited abnormally, exit status 255 zmdc.pl -
12/8/23, 8:09:15 PM UTC zmc_m1 205616 FAT No host specified for remote camera zm_remote_camera.cpp 72
12/8/23, 8:09:14 PM UTC zmdc 63275 INF 'zmc -m 1' started at 23/12/08 12:09:14 zmdc.pl -
12/8/23, 8:09:14 PM UTC zmdc 62869 INF 'zmc -m 1' starting at 23/12/08 12:09:14, pid = 63275 zmdc.pl -
12/8/23, 8:09:14 PM UTC zmdc 62869 INF Starting pending process, zmc -m 1 zmdc.pl -
12/8/23, 8:09:13 PM UTC zmdc 62869 ERR 'zmc -m 1' exited abnormally, exit status 255 zmdc.pl -
Showing 1 to 25 of 1909802 rows 25 rows per page
User avatar
iconnor
Posts: 2925
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM questions

Post by iconnor »

Those logs show the monitor type as Remote and nothing entered for host... what is going on?

Select ffmpeg type, put the url to the camera into the Path on Source tab...
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

Re: ZM questions

Post by jmcguckin »

Monitor-1 logs are what you are seeing. I messed up the config for that monitor — thats why i created monitor-2. I can’t seem to delete/edit monitor-1
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

Re: ZM questions

Post by jmcguckin »

12/16/23, 12:11:17 AM UTC zmdc 62869 ERR 'zm_rtsp_server' exited abnormally, exit status 255 zmdc.pl -
12/16/23, 12:11:16 AM UTC zm_rtsp_server 104347 INF Starting RTSP Server version 1.36.33 zm_rtsp_server.cpp 147
12/16/23, 12:11:15 AM UTC zmdc 60450 INF 'zm_rtsp_server' started at 23/12/15 16:11:15 zmdc.pl -
12/16/23, 12:11:15 AM UTC zmdc 62869 INF 'zm_rtsp_server' starting at 23/12/15 16:11:15, pid = 60450 zmdc.pl -
12/16/23, 12:11:15 AM UTC zmdc 62869 INF Starting pending process, zm_rtsp_server zmdc.pl -
12/16/23, 12:11:15 AM UTC zmwatch 62919 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:11:15 AM UTC zmwatch 66582 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:11:15 AM UTC zmwatch 66732 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:11:11 AM UTC zmdc 66529 ERR 'zm_rtsp_server' exited abnormally, exit status 255 zmdc.pl -
12/16/23, 12:11:11 AM UTC zm_rtsp_server 172170 INF Starting RTSP Server version 1.36.33 zm_rtsp_server.cpp 147
12/16/23, 12:11:10 AM UTC zmc_m2 102226 ERR Failed to prime capture of initial monitor zmc.cpp 259
12/16/23, 12:11:10 AM UTC zmc_m2 102226 ERR Unable to open input rtsp://209.81.2.53/Streaming/Channels/101 due to: Connection refused zm_ffmpeg_camera.cpp 326
12/16/23, 12:11:10 AM UTC zmdc 60430 INF 'zm_rtsp_server' started at 23/12/15 16:11:10 zmdc.pl -
12/16/23, 12:11:10 AM UTC zmdc 66529 INF 'zm_rtsp_server' starting at 23/12/15 16:11:10, pid = 60430 zmdc.pl -
12/16/23, 12:11:10 AM UTC zmdc 66529 INF Starting pending process, zm_rtsp_server zmdc.pl -
12/16/23, 12:11:05 AM UTC zmwatch 66582 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:11:05 AM UTC zmwatch 66732 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:11:05 AM UTC zmwatch 62919 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:11:04 AM UTC zmc_m2 102226 ERR Failed to prime capture of initial monitor zmc.cpp 259
12/16/23, 12:11:04 AM UTC zmc_m2 102226 ERR Unable to open input rtsp://209.81.2.53/Streaming/Channels/101 due to: Connection refused zm_ffmpeg_camera.cpp 326
12/16/23, 12:11:02 AM UTC web_php 60332 ERR ZoneMinder is not configured properly: php's date.timezone is not set to a valid timezone. Please check Options->System->Timezone includes/functions.php 2167
12/16/23, 12:11:02 AM UTC web_php 60332 ERR ZoneMinder is not configured properly: php's date.timezone +0000 does not match the system timezone -0800! Please check Options->System->Timezone. includes/functions.php 2161
12/16/23, 12:11:01 AM UTC web_php 60332 ERR ZoneMinder is not configured properly: php's date.timezone is not set to a valid timezone. Please check Options->System->Timezone includes/functions.php 2167
12/16/23, 12:11:01 AM UTC web_php 60332 ERR ZoneMinder is not configured properly: php's date.timezone +0000 does not match the system timezone -0800! Please check Options->System->Timezone. includes/functions.php 2161
12/16/23, 12:10:56 AM UTC zmc_m2 102226 ERR Failed to prime capture of initial monitor zmc.cpp 259
12/16/23, 12:10:56 AM UTC zmc_m2 102226 ERR Unable to open input rtsp://209.81.2.53/Streaming/Channels/101 due to: Connection refused zm_ffmpeg_camera.cpp 326
12/16/23, 12:10:55 AM UTC zmwatch 66582 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:10:55 AM UTC zmwatch 66732 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:10:55 AM UTC zmwatch 62919 ERR Memory map file '/tmp/zm.mmap.1' does not exist in zmMemAttach. zmc might not be running. zmwatch.pl -
12/16/23, 12:10:52 AM UTC zmc_m2 102226 ERR Failed to prime capture of initial monitor zmc.cpp 259
12/16/23, 12:10:52 AM UTC zmc_m2 102226 ERR Unable to open input rtsp://209.81.2.53/Streaming/Channels/101 due to: Connection refused zm_ffmpeg_camera.cpp 326
jmcguckin
Posts: 9
Joined: Tue Oct 31, 2023 7:55 pm

Re: ZM questions

Post by jmcguckin »

What's strange, the line that says:
rtsp://209.81.2.53/Streaming/Channels/101 due to: Connection refused

I can type thst into my browser (Safari) and it runs vlc and shows video from a camera...
Post Reply