Page 1 of 1

Change default zoom rate in monitor view

Posted: Tue Aug 12, 2008 11:05 pm
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?

Posted: Wed Aug 13, 2008 3:47 pm
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 ?

Posted: Wed Aug 13, 2008 4:13 pm
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

Posted: Wed Aug 13, 2008 9:01 pm
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.

Posted: Wed Aug 13, 2008 9:59 pm
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.

Posted: Thu Aug 14, 2008 5:38 pm
by dashnak

Posted: Tue Aug 19, 2008 3:04 pm
by dashnak
Has anyone managed to get this to work?

Posted: Tue Aug 19, 2008 11:39 pm
by hushpuppy
found this today (by mistake)

on the source for your cam, Misc tab, change Default Scale (version 1.23.3)

Posted: Wed Aug 20, 2008 2:58 pm
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.

Posted: Wed Aug 20, 2008 9:12 pm
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.