Please return 1/x scaling in live and event veiw!
Please return 1/x scaling in live and event veiw!
Hello.
There's a breaking change in Web UI in v1.37.60 that doesn't allow scaling event and live view то fractional scales.
I really need 1/2, 1/4 and 1/8 because of the bandwidth issues (some of my ZMs are at remote locations with 0.4-1 Mbps connectivity).
I was able to quickly restore this functionality for event view by patching config.php and and event.js, but watch.js is a bit more complicated (I'm not a web dev at all).
There's a breaking change in Web UI in v1.37.60 that doesn't allow scaling event and live view то fractional scales.
I really need 1/2, 1/4 and 1/8 because of the bandwidth issues (some of my ZMs are at remote locations with 0.4-1 Mbps connectivity).
I was able to quickly restore this functionality for event view by patching config.php and and event.js, but watch.js is a bit more complicated (I'm not a web dev at all).
Re: Please return 1/x scaling in live and event veiw!
There is a Scale=Auto mode, but I understand that this image is still too big for you?
I'll think about solving this problem.
I see two options:
1. Make the image even smaller, for example enter a fixed width parameter of 480px and/or 640px
2. Leave the size as it is now, but reduce the image quality.
Scale = 1/2, 1/4 and 1/8 is generally an abstract parameter. 1/4 of what size?
From the camera resolution? From the monitor resolution? From the visible area in the browser?
I'll think about solving this problem.
I see two options:
1. Make the image even smaller, for example enter a fixed width parameter of 480px and/or 640px
2. Leave the size as it is now, but reduce the image quality.
Scale = 1/2, 1/4 and 1/8 is generally an abstract parameter. 1/4 of what size?

Re: Please return 1/x scaling in live and event veiw!
I had another thought:
- In the bandwidth settings, add the "Image quality" parameter (Best, Medium, Low)
- On the Event and Watch pages add to Scale: maxWidth = 480px and 640px
- In the bandwidth settings, add the "Image quality" parameter (Best, Medium, Low)
- On the Event and Watch pages add to Scale: maxWidth = 480px and 640px
Re: Please return 1/x scaling in live and event veiw!
This won't work, since sometimes I do need full-scale.
As I was able to solve it with event view with the old-way "Scale" dropdown, I don't think doing the same for live view should be really hard or impossible.
I'm not using WebRTC or Janus, just standart ZM one.
As I was able to solve it with event view with the old-way "Scale" dropdown, I don't think doing the same for live view should be really hard or impossible.
I'm not using WebRTC or Janus, just standart ZM one.
Re: Please return 1/x scaling in live and event veiw!
To be honest, now I don’t understand at all what you want.
Please explain in detail what you need, just without the wording 1/2, 1/4.....
I hope you don’t want to view the image in FHD with FPS=20 with a channel width of 1 Mbps???
Forget about the old "Scale" options, they won't exist anymore. But in order for me to help you, I need to clearly understand what you want.
Re: Please return 1/x scaling in live and event veiw!
I just need a live or recorded event view scaled to whatever factor I specify.Please explain in detail what you need, just without the wording 1/2, 1/4.....
I hope you don’t want to view the image in FHD with FPS=20 with a channel width of 1 Mbps???
They do exist.Forget about the old "Scale" options, they won't exist anymore. But in order for me to help you, I need to clearly understand what you want.
I'm able to view livestream with any scale and FPS I want just by using the right URL, like it was before.
For example, Monitor 2, scale=18% and maxFPS=5
Code: Select all
<img src="http://<IP>/zm/cgi-bin/nph-zms?mode=jpeg&maxfps=5&scale=18&state=1&monitor=2">
Last edited by MarsRover on Fri May 31, 2024 12:58 pm, edited 1 time in total.
Re: Please return 1/x scaling in live and event veiw!
New Pan & Zoom systems are used for scale images
Less than 1 there is no point in reducing the image.
scale=18% - is intended to change the quality of the transmitted frame, 100 is the maximum quality. Scale is calculated automatically depending on the size of the frame displayed in the browser. The larger the image size, the better quality the frame will be transmitted.
I completed a PR https://github.com/ZoneMinder/zoneminder/pull/4058 in which it will be possible to specify both the maximum image size and the quality of the transmitted frame. This allows you to flexibly adjust the quality/bandwidth
You still haven't answered my question:
But ask to return the optionScale = 1/2, 1/4 and 1/8 is generally an abstract parameter. 1/4 of what size?From the camera resolution? From the monitor resolution? From the visible area in the browser?
I’m trying to understand what exactly doesn’t suit you in my proposal, but you don’t answer me anything specific.I really need 1/2, 1/4 and 1/8
You probably want to apply "scale=18%" to some frame, but then at least tell what the resolution of your camera is and what the size of the image displayed in the browser is. I will need this to understand your logic.
Re: Please return 1/x scaling in live and event veiw!
They were not abstract before v1.37.60, in my case they meant (WxH)/x, and WxH was the camera resolution since I'm always specifying real camera resolution on Monitor Source page.Scale = 1/2, 1/4 and 1/8 is generally an abstract parameter. 1/4 of what size?
I'm not sure what happens if Camera WxH is not the same as Monitor Wxh, didn't check.
Not when I'm using the above code (<img src=...>) my own "Montage" page. It's just scale in this caseScale is calculated automatically depending on the size of the frame displayed in the browser.
Thanks' for the PR!
Re: Please return 1/x scaling in live and event veiw!
Ok, so 1/4 is the camera resolution. And if one camera is 1920x1080, and the second is 3840x2160, then when displaying the first camera, the visible size in the browser is 480x270, and in the second case - 960x540. Is this beautiful?
Will my PR suit you?
You responded to my proposal:
This won't work, since sometimes I do need full-scale.
Re: Please return 1/x scaling in live and event veiw!
@MarsRover,
Use css to make the viewable image any size you want, and use the scale= in the url to drop the resolution sent. You can have the best of both worlds. Low bandwidth and large image. Just not the clearest image, We should probably have a quality= to adjust the actual jpeg compression quality..
Use css to make the viewable image any size you want, and use the scale= in the url to drop the resolution sent. You can have the best of both worlds. Low bandwidth and large image. Just not the clearest image, We should probably have a quality= to adjust the actual jpeg compression quality..
Re: Please return 1/x scaling in live and event veiw!
Hello, nice to see you here!
then I'm already doing exactly what you say.
Because for example just won't work (should it?)
If you mean on my own page, likeuse the scale= in the url
Code: Select all
<img src=url>
Because for example
Code: Select all
/zm/?view=watch&mid=1&scale=20
Re: Please return 1/x scaling in live and event veiw!
No I mean <img src=urll&scale=20 style="width: 100%;" />
Re: Please return 1/x scaling in live and event veiw!
After https://github.com/ZoneMinder/zoneminder/pull/4058 I don’t know what else there is not to like. I no longer have any idea how to improve anything in the interface.
Maybe yes.
Re: Please return 1/x scaling in live and event veiw!
Updated to .61 and happy again, thanks!I don’t know what else there is not to like