Montage optimization (is it possible?)

Forum for questions and support relating to the 1.28.x releases only.
Locked
User avatar
gnocera
Posts: 34
Joined: Thu Jun 04, 2015 6:31 pm

Montage optimization (is it possible?)

Post by gnocera »

Hello,

I do not know if this is already possible in the current ZM version 1.28. If someone knows how or ideas will be more than welcome.

We thought this because we have 2 ZM servers, each one running more than 80 cameras in HD resolution (1280x720)
Each server has 16cores + 16GB RAM + 8TB of hard disk.

It would be wonderful if we could montage cameras with a low resolution lets say 320x240, and then if I need to see some extra detail on one of the 80 cameras, then I should click on the little image in the montage, so firefox open another tab but this time it should show this camera in high resolution let's say 1280x720.

Currently the resolution that you define in each monitor is the same in montage or individual monitor, we believe this can be a waste of resources.

We believe if we can have 2 different resolution for monitors (one for montage and one for show single) this could be a tremendous way to save server resources. Moreover, doing this should allow quite the double of current cameras on each server.

Is this already possible or do we need to wait further developments?

Thank you,

Giuseppe
Attachments
Zoneminder huge installation
Zoneminder huge installation
TV.jpg (306.06 KiB) Viewed 5541 times
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Montage optimization (is it possible?)

Post by Nerre »

The point here is that ZM always reads the image from your camera and stores it on disk. This is done in the chosen resolution, the same resolution is used for motion detection.

Montage and monitor view then streams what is stored on disk to your web browser.

I'm not sure though how streaming handles scaling, if that is left to the browser or if the image is scaled on the fly.
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Montage optimization (is it possible?)

Post by SteveGilvarry »

Giuseppe,
Firstly great looking install.
Not sure you would double the number of cameras by only lowering the montage resolution, as the server will still be receiving and analysing the full resolution.
The better option will be a monitor that can take two streams from an IP camera as most can do these days. First one low res used for montage and motion analysis, while the second stream is buffered. Then in alarm state the high res stream is recorded. Can we do it now, no sorry, but certainly on my list to look at one day. First priority for me is to get h264 recording into master.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
User avatar
gnocera
Posts: 34
Joined: Thu Jun 04, 2015 6:31 pm

Re: Montage optimization (is it possible?)

Post by gnocera »

Nerre wrote:The point here is that ZM always reads the image from your camera and stores it on disk. This is done in the chosen resolution, the same resolution is used for motion detection.

Montage and monitor view then streams what is stored on disk to your web browser.

I'm not sure though how streaming handles scaling, if that is left to the browser or if the image is scaled on the fly.
Thank you Nerre for your quick reply.
Actually we double check in the ZM code and the scaling box in the montage view it is associated to the browser, it has no relation with the source stream of each camera.

Regards,

Giuseppe
User avatar
gnocera
Posts: 34
Joined: Thu Jun 04, 2015 6:31 pm

Re: Montage optimization (is it possible?)

Post by gnocera »

SteveGilvarry wrote:Giuseppe,
Firstly great looking install.
Not sure you would double the number of cameras by only lowering the montage resolution, as the server will still be receiving and analysing the full resolution.
The better option will be a monitor that can take two streams from an IP camera as most can do these days. First one low res used for montage and motion analysis, while the second stream is buffered. Then in alarm state the high res stream is recorded. Can we do it now, no sorry, but certainly on my list to look at one day. First priority for me is to get h264 recording into master.
Steve, first of all thank you. Second thank you again because It is you and the people of this forum that allow us to keep going with Zoneminder.

Look, I understand I am not in position to suggest you what is the priority in the ZM software roadmap, but as fan and devoted user of Zoneminder, please consider that additional 2 o 4 TB of hard drive is considerably cheaper than both 16GB DDR3 RAM + high level motherboard and processor like AMD OPTERON or INTEL XEON.
My point is for sure recording with H264 is important. But maybe optimize the resources of both processor and RAM memory by giving ZM just the data it is needed at certain moment, it can be a win strategy.

BTW I am not an expert about codecs, we were using VP8 on a video-conference application and we obtained better results than H264 by far.

I am attaching here another view angle of the installation.

Best Regards,

Giuseppe
Attachments
rack.jpg
rack.jpg (182.85 KiB) Viewed 5511 times
02 - ProyectoIMP01.JPG
02 - ProyectoIMP01.JPG (749.64 KiB) Viewed 5511 times
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Montage optimization (is it possible?)

Post by asker »

gnocera wrote: Thank you Nerre for your quick reply.
Actually we double check in the ZM code and the scaling box in the montage view it is associated to the browser, it has no relation with the source stream of each camera.
The master branch of ZM incorporates an enhancement to image.php that re-scales an image from the server to the required resolution before sending to the browser. If you choose to test out 1.28.109 for which there are development packages (don't use it for production), then you can also try the zmNinja desktop clients here, which use the image scaling
https://github.com/pliablepixels/zmNinj ... -platforms

I'd love to know how it behaves with 80 cameras.
BTW I am not an expert about codecs, we were using VP8 on a video-conference application and we obtained better results than H264 by far.
VP8 is a good choice for video conferencing. I use it too for WebRTC sessions and have also looked at VP9 a few months ago (don't know the status today but at that point it was in draft spec status). I am guessing the choice of 264 has to do with the fact that IP cameras mostly support 264 today. I don't know any that support VP8 - so it would make less sense not to use 264 as then you'd have to do expensive transcoding at the zms layer. Steve can obviously speak to this more as I am only making guesses.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
BiloxiGeek
Posts: 271
Joined: Tue Feb 11, 2014 2:04 pm

Re: Montage optimization (is it possible?)

Post by BiloxiGeek »

SteveGilvarry wrote:The better option will be a monitor that can take two streams from an IP camera as most can do these days. First one low res used for montage and motion analysis, while the second stream is buffered. Then in alarm state the high res stream is recorded. Can we do it now, no sorry, but certainly on my list to look at one day. First priority for me is to get h264 recording into master.
You say this isn't an option now, and maybe I'm misunderstanding things but I'm kinda doing exactly that right now 1.28.109. All ten of my cameras provide a lowdef stream at 320x176 and a hidef stream at 1920x1080, 5FPS on all. Define both streams as individual monitors, lowdef set to modect, hidef set to nodect and linked to the lowdef. Both are buffered, motion detection done on the lowdef and I get recordings for both streams. I guess this is dependent on the camera supporting two streams though.
Nerre
Posts: 100
Joined: Thu Sep 25, 2014 10:22 am

Re: Montage optimization (is it possible?)

Post by Nerre »

I can not understand why letting the browser do the scaling would be a disadvantage. The browser can be run on another machine than zoneminder, this means the zoneminder server will have a reduced load, compared to having the zoneminder server do the scaling.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Montage optimization (is it possible?)

Post by knight-of-ni »

Very nice and clean installation you've got there. I couldn't have wired it better.

Not directly related to the discussion, but have you considered putting Firefox into Kiosk mode (and set the Unity bar to autohide) to get a little more real estate for your camera streams?
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Montage optimization (is it possible?)

Post by asker »

knnniggett wrote: Not directly related to the discussion, but have you considered putting Firefox into Kiosk mode (and set the Unity bar to autohide) to get a little more real estate for your camera streams?
I saw [this] the other day and Mama! I want some of it!
The author is nuts. He is letting people download it free. Grab it before he changes his mind.

Knnnigget I need to figure out a way to get you to start using that cute owl and not kiosk modes/mega-servers/scary cameras while you try to get me into the world of ugly but powerful servers. Let the best man win!
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Montage optimization (is it possible?)

Post by SteveGilvarry »

BiloxiGeek wrote:You say this isn't an option now, and maybe I'm misunderstanding things but I'm kinda doing exactly that right now 1.28.109. All ten of my cameras provide a lowdef stream at 320x176 and a hidef stream at 1920x1080, 5FPS on all. Define both streams as individual monitors, lowdef set to modect, hidef set to nodect and linked to the lowdef. Both are buffered, motion detection done on the lowdef and I get recordings for both streams. I guess this is dependent on the camera supporting two streams though.
Yes I forgot you can do that, but I mean a single monitor that takes the low and hi-def streams as config and runs them like your setup natively.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Locked