Recent ZM versions (I think ZM 1.32+) added a feature that allows you to stream as many monitors as possible and not be limited to the Chrome and Webkit limit of 6 simultaneous connections.
Today’s post is about Multi Port. If you have seen zmNinja’s montage feature, you’ll notice the frames update every 2 seconds and they don’t look as smooth as ZoneMinder’s console view . Well, that’s because Chrome & WebKit limit a max of 6 simultaneous connections to a domain and to avoid that, I take snapshots and reload them every 2 seconds. Explained here.
As it turns out, these browsers doesn’t mandate this limit if you change the port. That is,
https://youserver.com/zm:PORT-A/nph-zms https://youserver.com/zm:PORT-B/nph-zms &
https://youserver.com/zm:PORT-C/nph-zms will all be treated as different domains as far as the connection limit goes. In other words, if we somehow stream each monitor on its own port, you can view as many as you want.
This is what multi-port does.
If you are on StorageAreas, and enable multi-port, the next release of zmNinja will automatically support it and no more staccato streaming in Montage, and more more 5 monitor limit in event montage.
To enable Multi Port:
(And this is why I have the wha..whaa…whaaat? image caption)
STEP 1: Enable it in the Zoneminder UI
Here I am telling ZM that start my streaming at port 30000. What ZM will do then is it will stream every monitor at
MIN_STREAMING_PORT+monitorId. In other words, lets say you have 3 monitors with
monitorId=7 then they will be streamed on ports
STEP 2: That’s not complex, this is! Modify your Apache config
You now need to tell Apache to start “Listen”ing on those ports.
That involves modifying
ports.conf (usually in
Listen 9010 https # this is my custom port for the ZM portal
Listen 30001 https # this is for my first monitor with ID=1
Listen 30002 https # this is for my second monitor with ID=2
Listen 30004 https # this is for my third monitor with ID=4
And also modifying your
Virtualhost which in my case is in
<VirtualHost *:9010 *:30001 *:30002 *:30004>
# whatever else follows
To make sure you’ve set things correctly, do a
sudo apachectl -t if it says your changes are ok,
sudo service apache2 restart
And enjoy multi port streaming.
STEP 3: Oh not yet, not yet
If you need to access this instance from outside, you also need to configure your router to port forward all these ports to your internal server
STEP 4: Oh not yet, not yet redux
Kidding. Have fun.