Hi,
I want to stream multiple monitors per page. I'm constructing URLs as described
http: //SERVER/zm/cgi-bin/nph-zms?scale=100&mode=jpeg&maxfps=25&monitor=1&connkey=XXX&rand=XXX
For example, if I put two <img> tags, with different monitors on a page, and then refresh, one (not always the same one) will always work and the other will not render anything.
I would like to take advantage of zm data processing, but use our own view to render monitor streams.
Please direct me what to do next.
zm version {"version":"1.33.14","apiversion":"2.0"}
Thank you
Cannot stream multiple monitors per page
Re: Cannot stream multiple monitors per page
Here is the code I use to make a camera wall web page using Zoneminder streams:
Note: I create a user that has view stream only. Log into Zoneminder as that user, view a monitor then right click on the video stream and choose View Image which will open in another window. Use that URL between <img src=" and ">
If you want to view the page outside of your firewall use the URL that accesses your router from the internet instead of the IP address. Oh, you will have to port forward to your Zoneminder server.
<html>
<meta http-equiv="refresh" content="300">
<body>
<p>Backyard</p>
<img src="http://192.168.50.3/zm/cgi-bin/nph-zms? ... 1574625840">
<img src="http://192.168.50.3/zm/cgi-bin/nph-zms? ... 1574625811">
</body>
</html>
Note: I create a user that has view stream only. Log into Zoneminder as that user, view a monitor then right click on the video stream and choose View Image which will open in another window. Use that URL between <img src=" and ">
If you want to view the page outside of your firewall use the URL that accesses your router from the internet instead of the IP address. Oh, you will have to port forward to your Zoneminder server.
<html>
<meta http-equiv="refresh" content="300">
<body>
<p>Backyard</p>
<img src="http://192.168.50.3/zm/cgi-bin/nph-zms? ... 1574625840">
<img src="http://192.168.50.3/zm/cgi-bin/nph-zms? ... 1574625811">
</body>
</html>
Re: Cannot stream multiple monitors per page
browsers will only stream 4-6 streams per server. Our fix for this is to configure apache to listen on multiple ports, 30000 to 30100 for example. Then when constucting your urls, add the port to the url using the monitor ID as well, so Monitor 2 will use 30002 and so on.
http: //SERVER:PORT/zm/cgi-bin/nph-zms?scale=100&mode=jpeg&maxfps=25&monitor=1&connkey=XXX&rand=XXX
Please note that connkey has to be unique per stream. (or leave it out if you are just streaming and don't intend to talk back to zms.
http: //SERVER:PORT/zm/cgi-bin/nph-zms?scale=100&mode=jpeg&maxfps=25&monitor=1&connkey=XXX&rand=XXX
Please note that connkey has to be unique per stream. (or leave it out if you are just streaming and don't intend to talk back to zms.