Change default zoom rate in monitor view

Support and queries relating to all previous versions of ZoneMinder
Locked
dashnak
Posts: 15
Joined: Tue Aug 12, 2008 10:55 pm

Change default zoom rate in monitor view

Post by dashnak »

Hello:
I've been investigating in the forums and in the web, as well as hacking for a while on the source code, but I have been unable to get this to work.
As you know, when you open a monitor view of some camera, the default zoom rate is "Actual" i.e. "100". I want the monitor view, and only the monitor view, to open with a zoom of 2x i.e. "200" by default.
I've tried to hack zm_html_view_watchfeed.php by inputting the value directly there, and it still won't work.
Is there a way to do this that anyone knows of?
hushpuppy
Posts: 147
Joined: Wed Aug 08, 2007 10:28 am

Post by hushpuppy »

Ive not looked at the source yet, but did a quick couple of tests.

If you click on say cam 1, javascript like this is used

javascript: newWindow( '/zm/index.php?view=watch&mid=1', 'zmWatch1', 416, 624 )

You can get the same effect by pasting this into your browser

http://localhost/zm/index.php?view=watch&mid=1

If you add &scale=200 it does what you want.

http://localhost/zm/index.php?view=watc ... &scale=200




Does that help ?
hushpuppy
Posts: 147
Joined: Wed Aug 08, 2007 10:28 am

Post by hushpuppy »

Did a bit of searching in the source, you need to alter the file zm_html_view_console.php

On version 1.23 , you need line 414 , change it to look like this.

<td align="left" class="text"><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=watch&scale=200&mid=".$monitor['Id']."', 'zmWatch".$monitor['Id']."', ".(reScale( $monitor['Width'], $s


( Just add &scale=200 after ?view=watch )

It would of course be much better if this value was configurable from a setting
dashnak
Posts: 15
Joined: Tue Aug 12, 2008 10:55 pm

Post by dashnak »

Thank you very much, that worked like a charm.
I have another problem now. I installed the patch that lets you click on an image in the montage view to open the monitor view for that camera, and it is not working there, I would assume that the same method to call the stream would be used, but it appears it is not.
Any more valuable advice?
Thanks.
hushpuppy
Posts: 147
Joined: Wed Aug 08, 2007 10:28 am

Post by hushpuppy »

I dont know anything about the patch, first time I've heard of it.

Can you point me to the url for it ?, i'd like to take a look at it anyway.
dashnak
Posts: 15
Joined: Tue Aug 12, 2008 10:55 pm

Post by dashnak »

dashnak
Posts: 15
Joined: Tue Aug 12, 2008 10:55 pm

Post by dashnak »

Has anyone managed to get this to work?
hushpuppy
Posts: 147
Joined: Wed Aug 08, 2007 10:28 am

Post by hushpuppy »

found this today (by mistake)

on the source for your cam, Misc tab, change Default Scale (version 1.23.3)
dashnak
Posts: 15
Joined: Tue Aug 12, 2008 10:55 pm

Post by dashnak »

That changes the scale in which the montage is shown, i just want to change the scale in which the monitor is shown.
hushpuppy
Posts: 147
Joined: Wed Aug 08, 2007 10:28 am

Post by hushpuppy »

Not on my system it doesnt.

Are we talking about the same tab?

Under source (/dev/video) click that, then Misc tab, Default Rate.

On my system (the Live CD) that works.
Locked