Merge branch 'master' of github.com:ZoneMinder/zoneminder
|
@ -157,3 +157,4 @@ web/undef.log
|
|||
zm.conf
|
||||
zmconfgen.pl
|
||||
zmlinkcontent.sh
|
||||
**/.DS_Store
|
||||
|
|
After Width: | Height: | Size: 144 B |
|
@ -0,0 +1,2 @@
|
|||
The external link icon is GPL licensed. Original license link:
|
||||
https://commons.wikimedia.org/wiki/Category:External_link_icons#/media/File:Icon_External_Link.png
|
|
@ -1,3 +1,18 @@
|
|||
img {
|
||||
border: 1px solid black !important;
|
||||
}
|
||||
|
||||
.admonition-todo {
|
||||
border-top: 2px solid red;
|
||||
border-bottom: 2px solid red;
|
||||
border-left: 2px solid red;
|
||||
border-right: 2px solid red;
|
||||
background-color: #ff6347;
|
||||
}
|
||||
|
||||
a.reference.external:link,
|
||||
a.reference.external:visited{
|
||||
background: url('./Icon_External_Link.png') center right no-repeat;
|
||||
padding-right: 13px;
|
||||
|
||||
}
|
31
docs/api.rst
|
@ -21,12 +21,14 @@ The ZoneMinder API has evolved over time. Broadly speaking the iterations were a
|
|||
|
||||
* Prior to version 1.29, there really was no API layer. Users had to use the same URLs that the web console used to 'mimic' operations, or use an XML skin
|
||||
* Starting version 1.29, a v1.0 CakePHP based API was released which continues to evolve over time. From a security perspective, it still tied into ZM auth and required client cookies for many operations. Primarily, two authentication modes were offered:
|
||||
* You use cookies to maintain session state (`ZM_SESS_ID`)
|
||||
* You use an authentication hash to validate yourself, which included encoding personal information and time stamps which at times caused timing validation issues, especially for mobile consumers
|
||||
* Starting version 1.34, ZoneMinder has introduced a new "token" based system which is based JWT. We have given it a '2.0' version ID. These tokens don't encode any personal data and can be statelessly passed around per request. It introduces concepts like access tokens, refresh tokens and per user level API revocation to manage security better. The internal components of ZoneMinder all support this new scheme now and if you are using the APIs we strongly recommend you migrate to 1.34 and use this new token system (as a side note, 1.34 also moves from MYSQL PASSWORD to Bcrypt for passwords, which is also a good reason why you should migate).
|
||||
* Note that as of 1.34, both versions of API access will work (tokens and the older auth hash mechanism), however we no longer use sessions by default. You will have to add a stateful=1 query parameter during login to tell ZM to set a COOKIE and store the required info in the session. This option is only available if OPT_USE_LEGACY_API_AUTH is set to ON.
|
||||
|
||||
.. NOTE::
|
||||
* You use cookies to maintain session state (``ZM_SESS_ID``)
|
||||
* You use an authentication hash to validate yourself, which included encoding personal information and time stamps which at times caused timing validation issues, especially for mobile consumers
|
||||
|
||||
* Starting version 1.34, ZoneMinder has introduced a new "token" based system which is based JWT. We have given it a '2.0' version ID. These tokens don't encode any personal data and can be statelessly passed around per request. It introduces concepts like access tokens, refresh tokens and per user level API revocation to manage security better. The internal components of ZoneMinder all support this new scheme now and if you are using the APIs we strongly recommend you migrate to 1.34 and use this new token system (as a side note, 1.34 also moves from MYSQL PASSWORD to Bcrypt for passwords, which is also a good reason why you should migate).
|
||||
* Note that as of 1.34, both versions of API access will work (tokens and the older auth hash mechanism), however we no longer use sessions by default. You will have to add a ``stateful=1`` query parameter during login to tell ZM to set a COOKIE and store the required info in the session. This option is only available if ``OPT_USE_LEGACY_API_AUTH`` is set to ON.
|
||||
|
||||
.. note::
|
||||
For the rest of the document, we will specifically highlight v2.0 only features. If you don't see a special mention, assume it applies for both API versions.
|
||||
|
||||
|
||||
|
@ -35,7 +37,9 @@ Enabling API
|
|||
^^^^^^^^^^^^^
|
||||
|
||||
ZoneMinder comes with APIs enabled. To check if APIs are enabled, visit ``Options->System``. If ``OPT_USE_API`` is enabled, your APIs are active.
|
||||
For v2.0 APIs, you have an additional option right below it - ``OPT_USE_LEGACY_API_AUTH`` which is enabled by default. When enabled, the `login.json` API (discussed later) will return both the old style (``auth=``) and new style (``token=``) credentials. The reason this is enabled by default is because any existing apps that use the API would break if they were not updated to use v2.0. (Note that zmNinja 1.3.057 and beyond will support tokens)
|
||||
For v2.0 APIs, you have an additional option right below it:
|
||||
|
||||
* ``OPT_USE_LEGACY_API_AUTH`` which is enabled by default. When enabled, the `login.json` API (discussed later) will return both the old style (``auth=``) and new style (``token=``) credentials. The reason this is enabled by default is because any existing apps that use the API would break if they were not updated to use v2.0. (Note that zmNinja 1.3.057 and beyond will support tokens)
|
||||
|
||||
Enabling secret key
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -93,17 +97,14 @@ Once you have the keys (a.k.a credentials (v1.0, v2.0) or token (v2.0)) you shou
|
|||
|
||||
::
|
||||
|
||||
# v1.0 or 2.0 based API access (will only work if AUTH_HASH_LOGINS is enabled
|
||||
|
||||
# RECOMMENDED: v2.0 token based
|
||||
curl -XPOST https://yourserver/zm/api/monitors.json&token=<access_token>
|
||||
curl -XGET https://yourserver/zm/api/monitors.json&token=<access_token>
|
||||
|
||||
# or
|
||||
# or, for legacy mode:
|
||||
|
||||
# v1.0 or 2.0 based API access (will only work if AUTH_HASH_LOGINS is enabled)
|
||||
curl -XPOST -d "auth=<hex digits from 'credentials'>" https://yourserver/zm/api/monitors.json
|
||||
|
||||
# or
|
||||
|
||||
curl -XGET https://yourserver/zm/api/monitors.json&auth=<hex digits from 'credentials'>
|
||||
curl -XGET https://yourserver/zm/api/monitors.json?auth=<hex digits from 'credentials'>
|
||||
|
||||
# or, if you specified -c cookies.txt in the original login request
|
||||
|
||||
|
@ -111,8 +112,8 @@ Once you have the keys (a.k.a credentials (v1.0, v2.0) or token (v2.0)) you shou
|
|||
|
||||
|
||||
.. NOTE::
|
||||
ZoneMinder's API layer allows API keys to be encoded either as a query parameter or as a data payload. If you don't pass keys, you could use cookies (not recommended as a general approach)
|
||||
|
||||
If you are using an ``HTTP GET`` request, the token/auth needs to be passed as a query parameter in the URL. If you are using an ``HTTP POST`` (like when you use the API to modify a monitor, for example), you can choose to pass the token as a data payload instead. The API layer discards data payloads for ``HTTP GET``. Finally, If you don't pass keys, you could also use cookies (not recommended as a general approach).
|
||||
|
||||
Key lifetime (v1.0)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -31,7 +31,7 @@ def setup(app):
|
|||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = []
|
||||
extensions = ['sphinx.ext.todo']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
@ -265,3 +265,6 @@ texinfo_documents = [
|
|||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
# Display todos by setting to True
|
||||
todo_include_todos = True
|
||||
|
|
348
docs/faq.rst
|
@ -1,8 +1,11 @@
|
|||
FAQ
|
||||
=====
|
||||
|
||||
.. todo:: needs to be reviewed - some entries may be old/invalid. I've done one round, but icOn needs to review.
|
||||
|
||||
This is the FAQ page. Feel free to contribute any FAQs that you think are missing.
|
||||
|
||||
.. note:: It is always a good idea to refer to the `ZoneMinder forums <https://forums.zoneminder.com/viewforum.php?f=26&sid=fc93f65726d3a29fbf6f610b21f52b16>`__ for tips and tricks. While we try and make sure this FAQ is pruned/adjusted to align with the latest stable release, some of the entries may no longer be accurate (or there may be better suggestions in the forums).
|
||||
|
||||
How can I stop ZoneMinder filling up my disk?
|
||||
---------------------------------------------
|
||||
|
@ -29,23 +32,22 @@ To delete events that are older than 7 days, create a new filter with "Date" set
|
|||
Save with 'Run Filter In Background' enabled to have it run automatically.
|
||||
Optional skip archived events: click on the plus sign next to -7 days to add another condition. "and" "archive status" equal to "unarchived only".
|
||||
|
||||
Optional slow delete: limit the number of results to 3. If you have a large backlog of events that would be deleted, this can hard spike the CPU usage for a long time. Limiting the number of results to only the first three each time the filter is run spreads out the delete processes over time, dramatically lessening the CPU load.
|
||||
Optional slow delete: limit the number of results to a number, say ``10`` in the filter. If you have a large backlog of events that would be deleted, this can hard spike the CPU usage for a long time. Limiting the number of results to only the first three each time the filter is run spreads out the delete processes over time, dramatically lessening the CPU load.
|
||||
|
||||
|
||||
.. warning:: We no longer recommend use enable ``OPT_FAST_DELETE`` or ``RUN_AUDIT`` anymore, unless you are using an old or low powered system to run Zoneminder. Please consider the remaining tips in this answer to be 'generally deprecated, use only if you must'.
|
||||
|
||||
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.
|
||||
|
||||
|
||||
ZM_OPT_FAST_DELETE:
|
||||
|
||||
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if you are trying to do a lot of events at once. If you are running on an older or under-powered system, you may want to set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later. If you do so, disk space will not be freed immediately so you will need to run zmaudit more frequently. On modern systems, we recommend that you leave this off.
|
||||
|
||||
|
||||
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if you are trying to do a lot of events at once. If you are running on an older or under-powered system, you may want to set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later. If you do so, disk space will not be freed immediately so you will need to run zmaudit more frequently. On modern systems, we recommend that you leave this **off**.
|
||||
|
||||
ZM_RUN_AUDIT:
|
||||
|
||||
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.
|
||||
|
||||
|
||||
|
||||
ZM_AUDIT_CHECK_INTERVAL:
|
||||
|
||||
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.
|
||||
|
@ -64,12 +66,15 @@ In *general* a good estimate of memory required would be:
|
|||
Min Bits of Memory = 20% overhead * (image-width*image-height*image buffer size*target color space*number of cameras)
|
||||
|
||||
Where:
|
||||
|
||||
* image-width and image-height are the width and height of images that your camera is configured for (in my case, 1280x960). This value is in the Source tab for each monitor
|
||||
* image buffer size is the # of images ZM will keep in memory (this is used by ZM to make sure it has pre and post images before detecting an alarm - very useful because by the time an alarm is detected, the reason for the alarm may move out of view and a buffer is really useful for this, including for analyzing stats/scores). This value is in the buffers tab for each monitor
|
||||
* target color space is the color depth - 8bit, 24bit or 32bit. It's again in the source tab of each monitor
|
||||
The 1.2 at the start is basically adding 20% on top of the calculation to account for image/stream overheads (this is an estimate)
|
||||
|
||||
The 20% overhead on top of the calculation to account for image/stream overheads (this is an estimate)
|
||||
|
||||
The math breakdown for 4 cameras running at 1280x960 capture, 50 frame buffer, 24 bit color space:
|
||||
|
||||
::
|
||||
|
||||
1280*960 = 1,228,800 (bytes)
|
||||
|
@ -96,8 +101,6 @@ So a good rule of thumb is to make sure you have twice the memory as the calcula
|
|||
As it turns out, ZM uses mapped memory and by default, 50% of your physical memory is what this will grow to. When you reach that limit , ZM breaks down with various errors.
|
||||
|
||||
|
||||
(**Note**: Mapped memory is applicable when you install ZoneMinder with mapped memory support, which is the default mode. If you have specifically disabled mapped memory then please see the next FAQ enty on how to increase shared memory)
|
||||
|
||||
A good way to know how much memory is allocated to ZM for its operation is to do a ``df -h``
|
||||
|
||||
A sample output on Ubuntu:
|
||||
|
@ -116,138 +119,43 @@ For example, if you want to increase this limit to 70% of your memory, add the f
|
|||
where SHMPATH is the ``Mounted on`` path. Here, that would be ``/run/shm``. Other systems may be ``/dev/shm``.
|
||||
|
||||
|
||||
What does a 'Can't shmget: Invalid argument' error in my logs mean? (and my camera does not display at higher resolutions)
|
||||
--------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
(*Note*: This is applicable for systems that have mapped memory disabled in ZoneMinder. By default, Mapped memory is enabled and unless you have disabled it manually, please refer to the "Math for Memory" question above and how to increase mapped memory limits)
|
||||
|
||||
This error is discussed in the README in the following excerpt:-
|
||||
''...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ``ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead``.
|
||||
|
||||
So, for example:
|
||||
|
||||
::
|
||||
|
||||
384x288 capture resolution, that makes: 110 592 pixels
|
||||
in 24 bit color that's x 3 = 331,776 bytes per frame
|
||||
by 80 frames ring buffer x80 = 26,542,080 bytes per camera
|
||||
by 4 cameras x4 = 106,168,320 bytes.
|
||||
Plus 10% overhead = 116,785,152 bytes
|
||||
Thats 114,048 kB, respectively 111.38 MB.
|
||||
If my shared memory is set to 134,217,728, which is exactly 128MB,
|
||||
that means I shouldn't have any problem.
|
||||
(Note that 1kbyte = 1024bytes, 1MB = 1024 kB)
|
||||
|
||||
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings `here <https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/chap-oracle_9i_and_10g_tuning_guide-setting_shared_memory>`__
|
||||
|
||||
You should be able to use a similar procedure with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.'"
|
||||
|
||||
You can often find out how many 4KB shared memory pages are available by typing the following :-
|
||||
|
||||
::
|
||||
|
||||
# cat /proc/sys/kernel/shmall
|
||||
2097152
|
||||
|
||||
In recent kernels the shmall is set to 2097152 memory pages multiplied by 4096 bytes per page for a total of 8 GB of shared memory available. You only need to increase the shmall value if you have a computer with more than 8GB of memory and wish to use more of it for shared memory usage, such as large databases.
|
||||
|
||||
The most shared memory bytes you can allocate in one go :-
|
||||
|
||||
::
|
||||
|
||||
# cat /proc/sys/kernel/shmmax
|
||||
33554432
|
||||
|
||||
In recent kernels the shmmax is set to 33554432 bytes for only 32 MB of maximum shared memory allocatable at a time, hardly enough for ZoneMinder to go above 320 x 240 x 24-bit resolution at 40 frames in the buffer if it is using the /dev/shm shared memory device, so this value needs to be increased. If you are using ZoneMinder with the memory mapped (mmap) compile time option then this doesn't affect you.
|
||||
|
||||
To change the value to 128 MB temporarily during this kernel execution type (for example) :-
|
||||
``echo 536870912 >/proc/sys/kernel/shmmax``
|
||||
|
||||
*Be sure to restart ZoneMinder after this.*
|
||||
|
||||
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted.
|
||||
|
||||
To change them permanently you will need to edit ``/etc/sysctl.conf`` and add the following lines (for example) :-
|
||||
``kernel.shmmax = 536870912``
|
||||
|
||||
Or if your distribution has the ``/etc/sysctl.d/`` folder you can create a file in this folder without modifying the ``/etc/sysctl.d`` so you won't lose the changes during distro upgrades :-
|
||||
```echo kernel.shmmax = 536870912 >/etc/sysctl.d/60-kernel-shm.conf```
|
||||
|
||||
To load these settings in the sysctl.conf file type:
|
||||
``sysctl -p``
|
||||
|
||||
To check your shared memory settings type:
|
||||
``ipcs -l``
|
||||
|
||||
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full color, increase ``134217728`` (128 MB) to, for example, ``268435456`` (256 MB) and multiple this value by each camera.
|
||||
|
||||
These changes will now also be set the next time your machine is restarted.
|
||||
|
||||
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, `Mmap mapped memory <https://en.wikipedia.org/wiki/Mmap>`__ . This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is 'mapped' into memory space for easy and fast access.
|
||||
|
||||
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options->paths->PATH_MAP. It uses a filesystem type called `tmpfs <https://en.wikipedia.org/wiki/Tmpfs>`__. If you type ``df -h`` you should see this area and the size of memory it currently allows. To increase size for tmpfs you need to edit /etc/default/tmpfs. Search for:
|
||||
``SHM_SIZE=128M``
|
||||
and change to something like
|
||||
``SHM_SIZE=1G``
|
||||
then reboot the system. You could possibly need to change RUN_SIZE, too.
|
||||
|
||||
It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.<monitor id> in the mapped memory filesystem.
|
||||
|
||||
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.
|
||||
|
||||
The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory
|
||||
|
||||
*For example:* If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).
|
||||
with a page size of 4096.
|
||||
kernel.shmall = 8000x1024x1024/4096
|
||||
``kernel.shmall = 2097152``
|
||||
NOT 8388608000 as would be suggested in the RedHat article linked above.
|
||||
|
||||
shmmax is the max amount to allocate in one request -
|
||||
this is is an actual memory size (as opposed to pages) set to 4GB
|
||||
``kernel.shmmax = 4294967296``
|
||||
|
||||
The ``/etc/sysctl.conf`` would have these lines
|
||||
|
||||
::
|
||||
|
||||
kernel.shmall = 2097152
|
||||
kernel.shmmax = 4294967296</pre>
|
||||
|
||||
As above, reload your sysctl.conf with ``sysctl -p`` and check that the settings are correct with ``ipcs -l``.
|
||||
|
||||
I have enabled motion detection but it is not always being triggered when things happen in the camera view
|
||||
---------------------------------------------------------------------------------------------------------------
|
||||
|
||||
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (`here <https://zoneminder.readthedocs.io/en/latest/userguide/definezone.html>`__) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.
|
||||
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (`here <https://zoneminder.readthedocs.io/en/latest/userguide/definezone.html>`__). Another user contributed illustrated Zone definition guide can be found here: `An illustrated guide to Zones <https://wiki.zoneminder.com/index.php/Understanding_ZoneMinder%27s_Zoning_system_for_Dummies>`__
|
||||
|
||||
However if you believe you have sensible settings configured then there are diagnostic approaches you can use.
|
||||
|
||||
Another user contributed illustrated Zone definition guide can be found here: `An illustrated guide to Zones <https://wiki.zoneminder.com/index.php/Understanding_ZoneMinder%27s_Zoning_system_for_Dummies>`__
|
||||
|
||||
Event Statistics
|
||||
^^^^^^^^^^^^^^^^^
|
||||
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options->Logging->RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the 'Stats' link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what 'real world' values are being generated.
|
||||
The first technique is to use event statistics. Firstly you should ensure they are switched on in ``Options->Logging->RECORD_EVENT_STATS``. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the 'Stats' link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what 'real world' values are being generated.
|
||||
|
||||
Note that if you are investigating why events 'do not' happen then these will not be saved and so won't be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don't want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn't.
|
||||
|
||||
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.
|
||||
|
||||
Diagnostic Images
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options->Logging->RECORD_DIAG_IMAGES.
|
||||
Diagnostic Images along with FIFO
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using ``Options->Logging->RECORD_DIAG_IMAGES``.
|
||||
|
||||
.. note:: In addition to the detailed explanation below, a recently added ``RECORD_DIAG_IMAGES_FIFO`` option, also available in ``Options->Logging`` can be an invaluable tool to see how your current motion settings are affecting motion detection. The ``delta`` stream along with the ``raw`` (json output) stream can be invaluable to see the effect in real time. Please refer to the explanation of this feature in :doc:`/userguide/options/options_logging`
|
||||
|
||||
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.
|
||||
|
||||
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identical pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).
|
||||
The first set are produced by the monitor on the image as a whole. The ``diag-r.jpg`` image is the current reference image against which all individual frames are compared and the ``diag-d.jpg`` image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identical pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).
|
||||
|
||||
The second set of diag images are labelled as diag-<zoneid>-<stage>.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,
|
||||
The second set of diag images are labelled as ``diag-<zoneid>-<stage>.jpg`` where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,
|
||||
|
||||
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.
|
||||
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.
|
||||
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.
|
||||
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.
|
||||
* Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.
|
||||
* Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.
|
||||
* Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.
|
||||
* Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.
|
||||
|
||||
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.
|
||||
|
||||
|
||||
Why can't ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -257,14 +165,14 @@ On average a card that can capture at 25fps per chip PAL for one input will do m
|
|||
|
||||
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card's video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.
|
||||
|
||||
Why can't I see streamed images when I can see stills in the Zone window etc?
|
||||
Why can't I see streamed images when I can see stills in the zone window etc?
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
This issue is normally down to one of two causes
|
||||
|
||||
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware plugin to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directory as the ZoneMinder php files. Then find the ZoneMinder Options->Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided (Options / B/W tabs) WEB_H_CAN_STREAM is set to auto and WEB_H_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.
|
||||
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware plugin to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directory as the ZoneMinder php files. Then find the ZoneMinder Options->Images page and enable ``OPT_CAMBOZOLA`` and enter the web path to the .jar file in ``PATH_CAMBOZOLA``. This will ordinarily just be cambozola.jar. Provided (Options / B/W tabs) ``WEB_H_CAN_STREAM`` is set to auto and ``WEB_H_STREAM_METHOD`` is set to jpeg then Cambozola should be loaded next time you try and view a stream.
|
||||
|
||||
'''NOTE''': If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author's name (as opposed to seeing the streaming images), you may need to chmod (''-rwxrwxr-x'') your (''usr/share/zoneminder/'') cambozola.jar:
|
||||
**NOTE**: If you find that the Cambozola applet loads in IE but the applet just displays the version of Cambozola and the author's name (as opposed to seeing the streaming images), you may need to chmod (``-rwxrwxr-x``) your (``usr/share/zoneminder/``) cambozola.jar:
|
||||
|
||||
::
|
||||
|
||||
|
@ -272,9 +180,7 @@ This issue is normally down to one of two causes
|
|||
|
||||
Once I did this, images started to stream for me.
|
||||
|
||||
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like ``ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"`` where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options->Paths->ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.
|
||||
|
||||
Also, please check the value of the ZM_PATH_ZMS setting under the Paths Options tab. It is where you configure the URL to the zms or nph-zms CGI executable. Under most Debian-based distros this value should be /zm/cgi-bin/nph-zms but in the past may have been /cgi-bin/nph-zms or you may have configured it to be something else.
|
||||
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like ``ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"`` where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing ``ZM_PATH_ZMS`` in your ``/etc/zm/config`` directory to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.
|
||||
|
||||
Lastly, please look for errors created by the zmc processes. If zmc isn't running, then zms will not be able to get an image from it and will exit.
|
||||
|
||||
|
@ -300,6 +206,11 @@ change the 3 to a 1
|
|||
network.http.max-persistent-connections-per-proxy -> 100 again
|
||||
network.http.max-persistent-connections-per-server -> 100 again
|
||||
|
||||
|
||||
I can't see more than 6 monitors in montage on my browser
|
||||
---------------------------------------------------------
|
||||
Browsers such a Chrome and Safari only support upto 6 streams from the same domain. To work around that, take a look at the multi-port configuration discussed in the ``MIN_STREAMING_PORT`` configuration in :doc:`/userguide/options/options_network`
|
||||
|
||||
Why is ZoneMinder using so much CPU?
|
||||
---------------------------------------
|
||||
|
||||
|
@ -313,8 +224,8 @@ The main causes are.
|
|||
* Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.
|
||||
* Capture frame rates. Unless there's a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.
|
||||
* Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.
|
||||
* Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don't want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.
|
||||
* Optimise your settings. After you've got some settings you're happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS and the JPEG_xxx_QUALITY ones.
|
||||
* Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don't want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching ``RECORD_EVENT_STATS`` on and seeing what the actual values of alarmed pixels etc are during sample events.
|
||||
* Optimise your settings. After you've got some settings you're happy with then switching off ``RECORD_EVENT_STATS`` will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ``ZM_FAST_RGB_DIFFS`` and the ``JPEG_xxx_QUALITY`` ones.
|
||||
|
||||
I'm sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there's no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.
|
||||
|
||||
|
@ -328,9 +239,11 @@ Using the timeline view is only recommended when using FireFox, however even the
|
|||
|
||||
This function has from time to time been corrupted in the SVN release or in the stable releases, try and reinstall from a fresh download.
|
||||
|
||||
.. _disk_bw_faq:
|
||||
|
||||
How much Hard Disk Space / Bandwidth do I need for ZM?
|
||||
---------------------------------------------------------------
|
||||
Please see `this excel sheet <https://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls>`__ or `this online excel sheet <https://docs.google.com/spreadsheets/d/1G2Er8fZ_lWQv9QV8qf9yGCMkiUG03a-UwgLLxzCL0OY/edit#gid=49279749>`__ (both are user contributed excel sheets)
|
||||
Please see `this online excel sheet <https://docs.google.com/spreadsheets/d/1iPMCGwlXiW8WnQuewgFhUqBs7ZaPKqXDkBtCQVHR6H0/edit?usp=sharing>`__. Note that this is just an estimate
|
||||
|
||||
Or go to `this link <http://www.axis.com/products/video/design_tool/v2/>`__ for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.
|
||||
|
||||
|
@ -351,38 +264,13 @@ Note that SELinux may cause errors other than those listed above. If you are in
|
|||
|
||||
How do I enable ZoneMinder's security?
|
||||
-------------------------------------------
|
||||
In the console, click on Options. Check the box next to "ZM_OPT_USE_AUTH". You will immediately be asked to login. The default username is 'admin' and the password is 'admin'.
|
||||
In the console, click on ``Options->System``. Check the box next to ``ZM_OPT_USE_AUTH``. You will immediately be asked to login. The default username is 'admin' and the password is 'admin'.
|
||||
|
||||
To Manage Users:
|
||||
In main console, go to Options->Users.
|
||||
In main console, go to ``Options->Users``.
|
||||
|
||||
You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;
|
||||
You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features. Note that if you choose to enable webserver auth, zmNinja may have issues. Please read the `zmNinja FAQ on basic authentication <https://zmninja.readthedocs.io/en/latest/guides/FAQ.html#i-can-t-see-streams-i-use-basic-auth>`__ for more information. Also please note that zmNinja does not support digest authentication.
|
||||
|
||||
Why does ZM stop recording once I have 32000 events for my monitor?
|
||||
------------------------------------------------------------------------
|
||||
Storing more than 32k files in a single folder is a limitation of some filesystems. To avoid this, enable USE_DEEP_STORAGE under Options.
|
||||
|
||||
USE_DEEP_STORAGE is now the default for new ZoneMinder systems so this limitation should only apply to users upgrading from a previous version of ZoneMinder.
|
||||
|
||||
Versions of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit, this is also somewhat faster.
|
||||
|
||||
If you have upgraded from a previous version of ZoneMinder and this option is not already enabled, it is very important to follow the steps below to enable it on an existing system. Failure to properly follow these steps **WILL RESULT IN LOSS OF YOUR DATA!**
|
||||
|
||||
::
|
||||
|
||||
# Stop ZoneMinder
|
||||
# Backup your event data and the dB if you have the available storage
|
||||
# Enable USE_DEEP_STORAGE under Options.
|
||||
# From the command line, run "sudo zmupdate.pl --migrate-events"
|
||||
# Monitor the output for any events that fail to convert.
|
||||
# After the conversion completes, you can restart ZoneMinder
|
||||
|
||||
Note that you can re-run the migrate-events command if any error messages scroll off the screen.
|
||||
|
||||
You can read about the lack of a limit in the number of sub-directories in the ext4 filesystem at: `this link <https://kernelnewbies.org/Ext4>`__
|
||||
and see what tools may assist in your use of this filesystem `here <https://ext4.wiki.kernel.org/index.php/Ext4_Howto>`__
|
||||
If you search for ext3 or reiserfs on the forums you will find various threads on this issue with guidance on
|
||||
how to convert.
|
||||
|
||||
Managing system load (with IP Cameras in mind)
|
||||
----------------------------------------------------
|
||||
|
@ -440,49 +328,14 @@ More expensive options:
|
|||
|
||||
* Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help. This topic is beyond the scope of this document.
|
||||
|
||||
Processor specific commands can be found in the GCC manual along with some more options that may increase performance.
|
||||
`<https://gcc.gnu.org/onlinedocs/gcc/>`__
|
||||
Processor specific commands can be found in the `GCC manual <https://gcc.gnu.org/onlinedocs/gcc/>`__ along with some more options that may increase performance.
|
||||
|
||||
|
||||
What about disks and bandwidth?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
A typical 100mbit LAN will cope with most setups easily. If you're feeding from cameras over smaller or internet links, obviously fps will be much lower.
|
||||
|
||||
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: https://zoneminder.readthedocs.io/en/latest/faq.html#how-much-hard-disk-space-bandwidth-do-i-need-for-zm
|
||||
|
||||
|
||||
Building ZoneMinder
|
||||
--------------------
|
||||
|
||||
When running configure I am getting a lot of messages about not being able to compile the ffmpeg libraries
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you see output from configure that looks like this
|
||||
|
||||
::
|
||||
|
||||
checking libavcodec/avcodec.h usability... no
|
||||
checking libavcodec/avcodec.h presence... yes
|
||||
configure: WARNING: libavcodec/avcodec.h: present but cannot be compiled
|
||||
configure: WARNING: libavcodec/avcodec.h: check for missing
|
||||
prerequisite headers?
|
||||
configure: WARNING: libavcodec/avcodec.h: see the Autoconf documentation
|
||||
configure: WARNING: libavcodec/avcodec.h: section "Present But
|
||||
Cannot Be Compiled"
|
||||
configure: WARNING: libavcodec/avcodec.h: proceeding with the compiler's
|
||||
result
|
||||
configure: WARNING: ## ------------------------------------- ##
|
||||
configure: WARNING: ## Report this to support@zoneminder.com ##
|
||||
configure: WARNING: ## ------------------------------------- ##</pre>
|
||||
|
||||
then it is caused not by the ZoneMinder build system but ffmpeg itself. However there is a workaround you can use which is to add ``CPPFLAGS=-D__STDC_CONSTANT_MACROS``
|
||||
|
||||
to the ZoneMinder ``./configure`` command which should solve the issue. However this is not a proper 'fix' as such, which can only come from the ffmpeg project itself.
|
||||
|
||||
I cannot build ZoneMinder and am getting lots of undefined C++ template errors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
This is almost certainly due to the 'ccache' package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.
|
||||
Disk and Bandwidth calculators are referenced in :ref:`disk_bw_faq`.
|
||||
|
||||
How do I build for X10 support?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -520,50 +373,10 @@ Although the example above describes changing states at different times of day,
|
|||
|
||||
How can I use ZoneMinder to trigger something else when there is an alarm?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing ``perldoc ZoneMinder``, ``perldoc ZoneMinder::SharedMem`` etc.
|
||||
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.
|
||||
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing ``perldoc ZoneMinder`` etc.
|
||||
|
||||
::
|
||||
ZoneMinder provides a sample alarm script called `zmalarm.pl <https://github.com/ZoneMinder/zoneminder/blob/master/utils/zm-alarm.pl>`__ that you can refer to as a starting point.
|
||||
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
use ZoneMinder;
|
||||
|
||||
$| = 1;
|
||||
|
||||
zmDbgInit( "myscript", level=>0, to_log=>0, to_syslog=>0, to_term=>1 );
|
||||
|
||||
my $dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );
|
||||
|
||||
my $sql = "select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != 'None' group by (M.Id)";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
|
||||
my $res = $sth->execute() or die( "Can't execute '$sql': ".$sth->errstr() );
|
||||
my @monitors;
|
||||
while ( my $monitor = $sth->fetchrow_hashref() )
|
||||
{
|
||||
push( @monitors, $monitor );
|
||||
}
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
foreach my $monitor ( @monitors )
|
||||
{
|
||||
next if ( !zmMemVerify( $monitor ) );
|
||||
|
||||
if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor->{LastEventId} ) )
|
||||
{
|
||||
$monitor->{LastEventId} = $last_event_id;
|
||||
print( "Monitor ".$monitor->{Name}." has alarmed\n" );
|
||||
#
|
||||
# Do your stuff here
|
||||
#
|
||||
}
|
||||
}
|
||||
sleep( 1 );
|
||||
}
|
||||
|
||||
Trouble Shooting
|
||||
-------------------
|
||||
|
@ -572,13 +385,9 @@ This is also how to obtain the info that we need to help you on the forums.
|
|||
|
||||
What logs should I check for errors?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
ZoneMinder creates its own logs and are usually located in the ``/tmp`` directory.
|
||||
ZoneMinder creates its own logs and are usually located in the ``/var/log/`` directory. Refer to the logging discussion in :doc:`/userguide/options/options_logging` for more details on where logs are stored and how to enable various log levels.
|
||||
|
||||
The ZoneMinder logs for the RPM packages are located in ``/var/log/zm``.
|
||||
|
||||
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are ``zmdc.log`` and ``zmpkg.log`` if ZM is not able to start.
|
||||
|
||||
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.
|
||||
Since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.
|
||||
|
||||
::
|
||||
|
||||
|
@ -594,8 +403,6 @@ If ZM is not functioning, you should always be able to find an error in at least
|
|||
This will append any data entered to any of these logs to your console screen (``-f``). To exit, hit [ctrl -c].
|
||||
|
||||
|
||||
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the "?" marks.
|
||||
|
||||
How can I trouble shoot the hardware and/or software?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -619,24 +426,28 @@ The apache web server needs to have the right permissions and configuration to b
|
|||
Why am I getting broken images when trying to view events?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:
|
||||
https://forums.zoneminder.com/viewtopic.php?p=48754
|
||||
Zoneminder and the Apache web server need to have the right permissions. Check `this forum topic <https://forums.zoneminder.com/viewtopic.php?p=48754>`__ and similar ones:
|
||||
|
||||
|
||||
|
||||
I can review events for the current day, but ones from yesterday and beyond error out
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you've checked that the `www-data` user has permissions to the storage folders, perhaps your php.ini's timezone setting is incorrect. They _must_ match for certain playback functions.
|
||||
If you've checked that the ``www-data`` user has permissions to the storage folders, perhaps your php.ini's timezone setting is incorrect. They _must_ match for certain playback functions.
|
||||
|
||||
If you're using Linux, this can be found using the following command: ::
|
||||
If you're using Linux, this can be found using the following command:
|
||||
|
||||
::
|
||||
|
||||
timedatectl | grep "Time zone"
|
||||
|
||||
If using FreeBSD, you can use this one-liner: ::
|
||||
If using FreeBSD, you can use this one-liner:
|
||||
|
||||
::
|
||||
|
||||
cd /usr/share/zoneinfo/ && find * -type f -exec cmp -s {} /etc/localtime \; -print;
|
||||
|
||||
Once you know what timezone your system is set to, open `/etc/php.ini` and adjust ``date.timezone`` to the appropriate value. the PHP daemon may need to be restarted for changes to take effect.
|
||||
Once you know what timezone your system is set to make sure you set the right time zone in ZM (Available in ``Options->System->TimeZone``)
|
||||
|
||||
|
||||
Why is the image from my color camera appearing in black and white?
|
||||
|
@ -651,39 +462,17 @@ If this camera is attached to a capture card, then you may have selected the wro
|
|||
|
||||
Why do I only see black screens with a timestamp when monitoring my camera?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by '''zmu -d <device_path> -q -v'''. 32768 may be appropriate values to try for these settings. After saving the settings, select Settings again to confirm they saved successfully.
|
||||
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by ``zmu -d <device_path> -q -v``. 32768 may be appropriate values to try for these settings. After saving the settings, select Settings again to confirm they saved successfully.
|
||||
|
||||
I am getting messages about a backtrace in my logs, what do I do?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
If you are seeing entries in your log like the following
|
||||
|
||||
::
|
||||
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]
|
||||
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]</pre>
|
||||
|
||||
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type 'man addr2line' for more information.
|
||||
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the 'Backtrace:' tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the '[]' pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.
|
||||
So in the example above, the command would be ``addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9``
|
||||
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.
|
||||
|
||||
|
||||
This error some times happens when a linked camera looses its link or it is corrupted by the user or some other system event, try deleting the affected cameras and recreating them in the Zoneminder console.
|
||||
|
||||
How do I repair the MySQL Database?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
There is two ways to go about this. In most cases you can run from the command prompt ->
|
||||
* mysqlcheck --all-databases --auto-repair -p'''your_database_password''' -u '''your_databse_user'''
|
||||
``mysqlcheck --all-databases --auto-repair -p your_database_password -u your_databse_user``
|
||||
|
||||
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). ->
|
||||
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI
|
||||
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different):
|
||||
|
||||
``myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI``
|
||||
|
||||
|
||||
How do I repair the MySQL Database when the cli fails?
|
||||
|
@ -743,3 +532,6 @@ Can I use ZoneMinder as part of my commercial product?
|
|||
|
||||
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms. The GPL does not permit you to include ZoneMinder in proprietary systems (see https://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circumstances.
|
||||
|
||||
I am having issues with zmNinja and/or Event Notification Server
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
zmNinja and the Event Notification Server are 3rd party solutions. The developer maintains exhaustive `documentation and FAQs <https://zmninja.readthedocs.io/en/latest/>`__. Please direct your questions there.
|
|
@ -10,7 +10,9 @@ ZoneMinder Documentation
|
|||
faq
|
||||
contributing
|
||||
|
||||
Welcome to ZoneMinder's documentation, the following resources are available
|
||||
Welcome to ZoneMinder's documentation. Please navigate to one of the links below.
|
||||
|
||||
If you are facing issues that are not covered in the documentation, please feel free to check the `ZoneMinder Forums <https://forums.zoneminder.com/viewforum.php?f=26>`__ or join the `ZoneMinder-Chat Slack channel <https://join.slack.com/t/zoneminder-chat/shared_invite/enQtNTU0NDkxMDM5NDQwLTdhZmQ5Y2M2NWQyN2JkYTBiN2ZkMzIzZGQ0MDliMTRmM2FjZWRlYzUwYTQ2MjMwMTVjMzQ1NjYxOTdmMjE2MTE>`__ if you prefer real time interaction.
|
||||
|
||||
:doc:`installationguide/index`
|
||||
Many distribution repos only hold older versions of ZoneMinder, current versions contain many bug fixes and updated functionality. Instructions here for installing updated packages or compiling from source.
|
||||
|
@ -27,6 +29,9 @@ Welcome to ZoneMinder's documentation, the following resources are available
|
|||
:doc:`contributing`
|
||||
How to contribute to ZoneMinder. As a community project we always need help, you don't need to be a coder to test or update documentation.
|
||||
|
||||
`Event Notification Server and Machine Learning hooks <https://zmeventnotification.readthedocs.io/en/latest/index.html>`__
|
||||
Documentation for the 3rd party Event Notification Server and Machine Learning for Object/People/Face detection.
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
An Easy To Use Docker Image
|
||||
===========================
|
||||
If you are interested in trying out ZoneMinder quickly, user Dan Landon maintains an easy to use docker image for ZoneMinder. With a few simple configuration changes, it also provides complete Event Notification Server and Machine Learning hook support. Please follow instructions in his repostory. He maintains two repositories:
|
||||
|
||||
* If you want to run the latest stable release, please use his `zoneminder repository <https://github.com/dlandon/zoneminder>`__.
|
||||
* If you want to run the latest zoneminder master, please use his `zoneminder master repository <https://github.com/dlandon/zoneminder.master-docker>`__.
|
||||
|
||||
In both cases, instructions are provided in the repo README files.
|
||||
|
||||
If you are looking at building your own native (non docker) binary packages of ZoneMinder for your distro, please refer to the distro specific install guides or :doc:`packpack`.
|
||||
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 56 KiB |
|
@ -1,14 +1,18 @@
|
|||
Installation Guide
|
||||
======================================
|
||||
|
||||
.. todo:: This entire guide needs to be checked/updated as needed
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
easydocker
|
||||
packpack
|
||||
ubuntu
|
||||
debian
|
||||
redhat
|
||||
windows_wsl
|
||||
multiserver
|
||||
dedicateddrive
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
All Distros - A Docker Way to Build ZoneMinder
|
||||
===============================================
|
||||
|
||||
.. note:: If you are looking for an easy way to run ZoneMinder and not interested in building your own docker image, please refer to :doc:`easydocker`.
|
||||
|
||||
.. contents::
|
||||
|
||||
These instructions represent an alternative way to build ZoneMinder for any supported distro.
|
||||
|
@ -124,4 +126,4 @@ More testing needs to be done for Redhat distros but it appears Fedora users can
|
|||
|
||||
sudo systemctl start systemd-binfmt
|
||||
|
||||
TO-DO: Verify the details behind enabling qemu emulation on redhat distros. Pull requests are welcome.
|
||||
.. todo:: Verify the details behind enabling qemu emulation on redhat distros. Pull requests are welcome.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
Windows 10+ using WSL
|
||||
=======================
|
||||
|
||||
With Windows 10, Microsoft released the `Window Subsystem for Linux (WSL) <https://docs.microsoft.com/en-us/windows/wsl/faq>`__ that enables you to run native Linux tools directly on Windows, alongside your traditional Windows desktop and modern store apps. To install WSL, please refer to the
|
||||
`installation guide from Microsoft <https://docs.microsoft.com/en-us/windows/wsl/install-win10>`__.
|
||||
|
||||
ZoneMinder now runs on Windows 10+ systems which have WSL enabled. This guide will explain how to go about installing an Ubuntu ZM image on Windows 10+.
|
||||
|
||||
.. todo:: Isaac to add instructions.
|
||||
|
|
@ -72,6 +72,9 @@ Finally some perl scripts in the scripts directory. These scripts all have some
|
|||
**zm**
|
||||
This is the (optional) ZoneMinder init script, see below for details.
|
||||
|
||||
**zmeventnotification.pl**
|
||||
This is an optional 3rd party real time event notification server that also provides push notifications for zmNinja as well as machine learning powered object/face-detection. Please see `Event Notification Server Documentation <https://zmeventnotification.readthedocs.io/en/latest/index.html>`__ for more details (Note that the machine learning components are optional, and are developed in Python3)
|
||||
|
||||
Finally, there are also a number of ZoneMinder perl modules included. These are used by the scripts above, but can also be used by your own or 3rd party scripts. Full documentation for most modules is available in ‘pod’ form via ‘perldoc’ but the general purpose of each module is as follows.
|
||||
|
||||
**ZoneMinder.pm**
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
Configuration Files
|
||||
--------------------
|
||||
This section describes configuration files that ZoneMinder uses beyond the various Web UI options.
|
||||
|
||||
.. _replacement_for_options_path:
|
||||
|
||||
System Path Configurations
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
At one point of time, ZoneMinder stored various system path configurations under the Web UI (``Options->Paths``). This was removed a few versions ago and now resides in a configuration file. The motivation for this change can be read in `this discussion <https://github.com/ZoneMinder/zoneminder/pull/1908>`__.
|
||||
|
||||
Typically, path configurations now reside in ``/etc/zm``.
|
||||
|
||||
Here is an example of the file hierarchy:
|
||||
|
||||
::
|
||||
|
||||
/etc/zm
|
||||
├── conf.d
|
||||
│ ├── 01-system-paths.conf
|
||||
│ ├── 02-multiserver.conf
|
||||
| ├── 03-custom.conf #optional
|
||||
│ └── README
|
||||
├── objectconfig.ini # optional
|
||||
├── zm.conf
|
||||
└── zmeventnotification.ini #optional
|
||||
|
||||
The roles of the files are as follows:
|
||||
|
||||
* ``zm.conf`` contains various base configuration entries. You should not edit this file as it may be overwritten on an upgrade.
|
||||
* ``zmeventnotification.ini`` is only present if you have installed the ZoneMinder Event Notification Server.
|
||||
* ``objectconfig.ini`` is only present if you have installed the machine learning hooks for the Event Notification Server.
|
||||
* ``conf.d`` contains additional configuration items as follows:
|
||||
|
||||
* ``01-system-paths.conf`` contains all the paths that were once part of ``Options->Paths`` in the Web UI. You should not edit this file as it may be overwritten on an upgrade
|
||||
* ``02-multiserver.conf`` file consists of custom variables if you are deploying ZoneMinder in a multi-server configuration (see :doc:`/installationguide/multiserver`)
|
||||
* ``03-custom.conf`` is an custom config file that I created to override specific variables in the path files. **This is the recommended way to customize entries**. Anything that you want to change should be in a new file inside ``conf.d``. Note that ZoneMinder will sort all the files alphabetically and run their contents in ascending order. So it doesn't really matter what you name them, as long as you make sure your changes are not overwritten by another file in the sorting sequence. It is therefore good practice to prefix your file names by ``nn-`` where ``nn`` is a monotonically increasing numerical sequence ``01-`` ``02-`` ``03-`` and so forth, so you know the order they will be processed.
|
||||
|
||||
Timezone Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Earlier versions of ZoneMinder relied on ``php.ini`` to set Date/Time Zone. This is no longer the case. You can (and must) set the Timezone via the Web UI, starting ZoneMinder version 1.34. See :ref:`here <timezone_config>`.
|
||||
|
||||
Database Specific Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. todo:: do we really need to have this section? Not sure if its generic and not specific to ZM
|
||||
|
||||
While the ZoneMinder specific database config entries reside in ``/etc/zm/zm.conf`` and related customizations discussed above, general database configuration items can be tweaked in ``/etc/mysql`` (or whichever path your DB server is installed)
|
|
@ -46,6 +46,10 @@ Linked Monitors
|
|||
This field allows you to select other monitors on your system that act as triggers for this monitor. So if you have a camera covering one aspect of your property you can force all cameras to record while that camera detects motion or other events. You can either directly enter a comma separated list of monitor ids or click on ‘Select’ to choose a selection. Be very careful not to create circular dependencies with this feature however you will have infinitely persisting alarms which is almost certainly not what you want! To unlink monitors you can ctrl-click.
|
||||
|
||||
Maximum FPS
|
||||
|
||||
.. warning::
|
||||
Unless you know what you are doing, please leave this field empty, especially if you are configuring a network camera. More often than not, putting a value here adversely affects recording.
|
||||
|
||||
On some occasions you may have one or more cameras capable of high capture rates but find that you generally do not require this performance at all times and would prefer to lighten the load on your server. This option permits you to limit the maximum capture rate to a specified value. This may allow you to have more cameras supported on your system by reducing the CPU load or to allocate video bandwidth unevenly between cameras sharing the same video device. This value is only a rough guide and the lower the value you set the less close the actual FPS may approach it especially on shared devices where it can be difficult to synchronise two or more different capture rates precisely. This option controls the maximum FPS in the circumstance where no alarm is occurring only.
|
||||
|
||||
This feature is limited and will only work under the following conditions:
|
||||
|
@ -56,6 +60,11 @@ Maximum FPS
|
|||
Using this field for video streams from IP cameras will cause undesirable results when the value is equal to or less than the frame rate from the camera. Note that placing a value higher than the camera's frame rate is allowed and can help prevent cpu spikes when communication from the camera is lost.
|
||||
|
||||
Alarm Maximum FPS
|
||||
|
||||
.. warning::
|
||||
Unless you know what you are doing, please leave this field empty, especially if you are configuring a network camera. More often than not, putting a value here adversely affects recording.
|
||||
|
||||
|
||||
If you have specified a Maximum FPS it may be that you don’t want this limitation to apply when your monitor is recording motion or other event. This setting allows you to override the Maximum FPS value if this circumstance occurs. As with the Maximum FPS setting leaving this blank implies no limit so if you have set a maximum fps in the previous option then when an alarm occurs this limit would be ignored and ZoneMinder would capture as fast as possible for the duration of the alarm, returning to the limited value after the alarm has concluded. Equally you could set this to the same, or higher (or even lower) value than Maximum FPS for more precise control over the capture rate in the event of an alarm.
|
||||
|
||||
**IMPORTANT:** This field is subject to the same limitations as the Maximum FPS field. Ignoring these limitations will produce undesriable results.
|
||||
|
@ -71,15 +80,15 @@ Source Tab
|
|||
|
||||
FFmpeg
|
||||
^^^^^^
|
||||
This is the recommended source type for most modern ip cameras.
|
||||
This is the **recommended** source type for most modern ip cameras.
|
||||
|
||||
Source Path
|
||||
Use this field to enter the full URL of the stream or file your camera supports. This is usually an RTSP url. There are several methods to learn this:
|
||||
|
||||
* Check the documentation that came with your camera
|
||||
* Look for your camera in the hardware compatibilty list in the wiki https://wiki.zoneminder.com/Hardware_Compatibility_List
|
||||
* Look for your camera in the hardware compatibilty list in the `hardware compatibility wiki <https://wiki.zoneminder.com/Hardware_Compatibility_List>`__
|
||||
* Try ZoneMinder's new ONVIF probe feature
|
||||
* Download and install the ONVIF Device Manager onto a Windows machine https://sourceforge.net/projects/onvifdm/
|
||||
* Download and install the `ONVIF Device Manager <https://sourceforge.net/projects/onvifdm/>`__ onto a Windows machine
|
||||
* Use Google to find third party sites, such as ispy, which document this information
|
||||
Source Colours
|
||||
Specify the amount of colours in the captured image. 32 bit is the preferred choice here. Unlike with local cameras changing this has no controlling effect on the remote camera itself so ensure that your camera is actually capturing to this palette beforehand.
|
||||
|
@ -271,3 +280,7 @@ Default Scale
|
|||
If your monitor has been defined with a particularly large or small image size then you can choose a default scale here with which to view the monitor so it is easier or more visible from the web interface.
|
||||
Web Colour
|
||||
Some elements of ZoneMinder now use colours to identify monitors on certain views. You can select which colour is used for each monitor here. Any specification that is valid for HTML colours is valid here, e.g. ‘red’ or ‘#ff0000’. A small swatch next to the input box displays the colour you have chosen.
|
||||
Embed EXIF data into image:
|
||||
Embeds EXIF data into each jpeg frame
|
||||
|
||||
.. todo:: what about mp4s?
|
||||
|
|
|
@ -8,10 +8,7 @@ Filters allow you to define complex conditions with associated actions in ZoneMi
|
|||
|
||||
And many more.
|
||||
|
||||
The filter window can be accessed from various views, one of which is to simply tap on the filter button in the main web view:
|
||||
|
||||
.. image:: images/filter-button.png
|
||||
:width: 600px
|
||||
The filter window can be accessed by tapping on the top level filter menu
|
||||
|
||||
You can use the filter window to create your own filters or to modify existing ones. You can even save your favourite filters to re-use at a future date. Filtering itself is fairly simple; you first choose how many expressions you'd like your filter to contain. Changing this value will cause the window to redraw with a corresponding row for each expression. You then select what you want to filter on and how the expressions relate by choosing whether they are 'and' or 'or' relationships. For filters comprised of many expressions you will also get the option to bracket parts of the filter to ensure you can express it as desired. Then if you like choose how you want your results sorted and whether you want to limit the amount of events displayed.
|
||||
|
||||
|
@ -22,18 +19,30 @@ Here is what the filter window looks like
|
|||
:width: 800px
|
||||
|
||||
* *A*: This is a dropdown list where you can select pre-defined filters. You will notice that ZoneMinder comes with a PurgeWhenFull filter that is configured to delete events if you reach 95% of disk space.
|
||||
* *B* and *C*: This is where you specify conditions that need to match before the filter is executed. You use the "+" and "-" buttons to add/delete conditions
|
||||
* *D*: This is where you specify what needs to happen when the conditions match:
|
||||
* *B*: If you are creating a new filter, you can type in a name for your filter here
|
||||
* *C*: This is where you specify conditions that need to match before the filter is executed. You use the "+" and "-" buttons to add/delete conditions
|
||||
* *D*: This allows you to perform sorting and limiting operations on the output before you take an action
|
||||
* *E*: This is where you specify what needs to happen when the conditions match:
|
||||
|
||||
* Archive all matches: sets the archive field to 1 in the Database for the matched events.
|
||||
Think of 'archiving' as grouping them under a special category - you can view archived
|
||||
events later and also make sure archived events don't get deleted, for example
|
||||
* Email details of all matches: Sends an email to the configured address with details about the event.
|
||||
The email can be customized as per TBD
|
||||
* Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguents to the command, the last argument will be the absolute path to the event, preceeded by replacement arguents. eg: /usr/bin/script.sh %MN% will excecute as /usr/bin/script.sh MonitorName /path/to/event.
|
||||
* Delete all matches: Deletes all the matched events
|
||||
* *E*: Use 'Submit' to 'test' your matching conditions. This will just match and show you what filters match. Use 'Execute' to actually execute the action after matching your conditions. Use 'Save' to save the filter for future use and 'Reset' to clear your settings
|
||||
|
||||
.. todo ::
|
||||
fill in what update used disk space, copy all matches, move all matches do. For the "create video" filter, put in more details on how it works, any dependencies etc.
|
||||
|
||||
.. NOTE:: More details on filter conditions:
|
||||
* Update used disk space:
|
||||
* Create video for all matches: creates a video file of all the events that match
|
||||
* Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguents to the command, the last argument will be the absolute path to the event, preceeded by replacement arguents. eg: /usr/bin/script.sh %MN% will excecute as /usr/bin/script.sh MonitorName /path/to/event.
|
||||
* Delete all matches: Deletes all the matched events.
|
||||
* Copy all matches:
|
||||
* Move all matches:
|
||||
* Run filter in background: When checked, ZoneMinder will make sure the filter is checked regularly. For example, if you want to be notified of new events by email, you should make sure this is checked. Filters that are configured to run in the background have a “*” next to it.
|
||||
* Run filter concurrently: Allows this filter to run in its own thread thereby letting other filters run in parallel.
|
||||
|
||||
* *F*: Use 'List Matches' to 'test' your matching conditions. This will just match and show you what filters match. Use 'Execute' to actually execute the action after matching your conditions. Use 'Save' to save the filter for future use and 'Reset' to clear your settings
|
||||
|
||||
.. note:: More details on filter conditions:
|
||||
|
||||
There are several different elements to an event that you can filter on, some of which require further explanation. These are as follows,
|
||||
* 'Date/Time' which must evaluate to a date and a time together,
|
||||
|
@ -46,38 +55,39 @@ Here is what the filter window looks like
|
|||
|
||||
If you do this then the subsequent dialog will also allow you specify whether you want this filter automatically applied in order to delete events or upload events via ftp to another server and mail notifications of events to one or more email accounts. Emails and messages (essentially small emails intended for mobile phones or pagers) have a format defined in the Options screen, and may include a variety of tokens that can be substituted for various details of the event that caused them. This includes links to the event view or the filter as well as the option of attaching images or videos to the email itself. Be aware that tokens that represent links may require you to log in to access the actual page, and sometimes may function differently when viewed outside of the general ZoneMinder context. The tokens you can use are as follows.
|
||||
|
||||
* %EI% Id of the event
|
||||
* %EN% Name of the event
|
||||
* %EC% Cause of the event
|
||||
* %ED% Event description
|
||||
* %ET% Time of the event
|
||||
* %EL% Length of the event
|
||||
* %EF% Number of frames in the event
|
||||
* %EFA% Number of alarm frames in the event
|
||||
* %EST% Total score of the event
|
||||
* %ESA% Average score of the event
|
||||
* %ESM% Maximum score of the event
|
||||
* %EP% Path to the event
|
||||
* %EPS% Path to the event stream
|
||||
* %EPI% Path to the event images
|
||||
* %EPI1% Path to the first alarmed event image
|
||||
* %EPIM% Path to the (first) event image with the highest score
|
||||
* %EI1% Attach first alarmed event image
|
||||
* %EIM% Attach (first) event image with the highest score
|
||||
* %EV% Attach event mpeg video
|
||||
* %MN% Name of the monitor
|
||||
* %MET% Total number of events for the monitor
|
||||
* %MEH% Number of events for the monitor in the last hour
|
||||
* %MED% Number of events for the monitor in the last day
|
||||
* %MEW% Number of events for the monitor in the last week
|
||||
* %MEM% Number of events for the monitor in the last month
|
||||
* %MEA% Number of archived events for the monitor
|
||||
* %MP% Path to the monitor window
|
||||
* %MPS% Path to the monitor stream
|
||||
* %MPI% Path to the monitor recent image
|
||||
* %FN% Name of the current filter that matched
|
||||
* %FP% Path to the current filter that matched
|
||||
* %ZP% Path to your ZoneMinder console
|
||||
* %EI% Id of the event
|
||||
* %EN% Name of the event
|
||||
* %EC% Cause of the event
|
||||
* %ED% Event description
|
||||
* %ET% Time of the event
|
||||
* %EL% Length of the event
|
||||
* %EF% Number of frames in the event
|
||||
* %EFA% Number of alarm frames in the event
|
||||
* %EST% Total score of the event
|
||||
* %ESA% Average score of the event
|
||||
* %ESM% Maximum score of the event
|
||||
* %EP% Path to the event
|
||||
* %EPS% Path to the event stream
|
||||
* %EPI% Path to the event images
|
||||
* %EPI1% Path to the first alarmed event image
|
||||
* %EPIM% Path to the (first) event image with the highest score
|
||||
* %EI1% Attach first alarmed event image
|
||||
* %EIM% Attach (first) event image with the highest score
|
||||
* %EV% Attach event mpeg video
|
||||
* %MN% Name of the monitor
|
||||
* %MET% Total number of events for the monitor
|
||||
* %MEH% Number of events for the monitor in the last hour
|
||||
* %MED% Number of events for the monitor in the last day
|
||||
* %MEW% Number of events for the monitor in the last week
|
||||
* %MEM% Number of events for the monitor in the last month
|
||||
* %MEA% Number of archived events for the monitor
|
||||
* %MOD% Path to image containing object detection
|
||||
* %MP% Path to the monitor window
|
||||
* %MPS% Path to the monitor stream
|
||||
* %MPI% Path to the monitor recent image
|
||||
* %FN% Name of the current filter that matched
|
||||
* %FP% Path to the current filter that matched
|
||||
* %ZP% Path to your ZoneMinder console
|
||||
|
||||
Finally you can also specify a script which is run on each matched event. This script should be readable and executable by your web server user. It will get run once per event and the relative path to the directory containing the event in question. Normally this will be of the form <MonitorName>/<EventId> so from this path you can derive both the monitor name and event id and perform any action you wish. Note that arbitrary commands are not allowed to be specified in the filter, for security the only thing it may contain is the full path to an executable. What that contains is entirely up to you however.
|
||||
|
||||
|
@ -87,15 +97,8 @@ Here is what the filter window looks like
|
|||
Saving filters
|
||||
-----------------
|
||||
|
||||
.. image:: images/filter-save.png
|
||||
:width: 400px
|
||||
|
||||
When saving filters, if you want the filter to run in the background make sure you select the "Run filter in background" option. When checked, ZoneMinder will make sure the filter is checked regularly. For example, if you want to be notified of new events by email, you should make sure this is checked. Filters that are configured to run in the background have a "*" next to it.
|
||||
|
||||
For example:
|
||||
|
||||
.. image:: images/filter-choosefilter.png
|
||||
:width: 400px
|
||||
|
||||
How filters actually work
|
||||
--------------------------
|
||||
|
|
|
@ -5,32 +5,144 @@ Having followed the :doc:`/installationguide/index` for your distribution you sh
|
|||
|
||||
.. image:: ../installationguide/images/zm_first_screen_post_install.png
|
||||
|
||||
.. _timezone_config:
|
||||
|
||||
Setting Timezone
|
||||
^^^^^^^^^^^^^^^^^
|
||||
Previous versions of ZoneMinder required the user to set up Timezone correctly in ``php.ini``. This is no longer the case. Starting 1.34, ZoneMinder allows you to specify the TimeZone in the UI. Please make sure it is set up correctly. The Timezone can be changed by selecting ``Options->System->Timezone``
|
||||
|
||||
.. image:: images/getting-started-timezone.png
|
||||
|
||||
Enabling Authentication
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
We strongly recommend enabling authentication right away. There are some situations where certain users don't enable authentication, such as instances where the server is in a LAN not directly exposed to the Internet, and is only accessible via VPN etc., but in most cases, authentication should be enabled. So let's do that right away.
|
||||
|
||||
* Click on the Options link on the top right corner of the web interface
|
||||
* You will now be presented with a screen full of options. Click on the "System" tab
|
||||
* Click on the Options link on the top bar of the web interface
|
||||
* You will now be presented with a sidebar full of options. Click on the "System" link
|
||||
|
||||
.. image:: images/getting-started-enable-auth.png
|
||||
|
||||
* The relevant portions to change are marked in red above
|
||||
* Enable OPT_USE_AUTH - this automatically switches to authentication mode with a default user (more on that later)
|
||||
* Select a random string for AUTH_HASH_SECRET - this is used to make the authentication logic more secure, so
|
||||
please generate your own string and please don't use the same value in the example.
|
||||
please generate your own string and make sure it is sufficiently randomized and long. Note that if you plan to use APIs with ZoneMinder (needed by zmNinja/other apps), it is mandatory that you have this field populated
|
||||
* The other options highlighed above should already be set, but if not, please make sure they are
|
||||
* Note that if you are planning to use zmNinja and plan to use ZM authentication, you must also:
|
||||
|
||||
* set ``AUTH_RELAY`` to hashed
|
||||
* Enable ``AUTH_HASH_LOGINS``
|
||||
|
||||
|
||||
* Click on Save at the bottom and that's it! The next time you refresh that page, you will now be presented with a login screen. Job well done!
|
||||
|
||||
.. image:: images/getting-started-login.png
|
||||
|
||||
.. NOTE:: The default login/password is "admin/admin"
|
||||
.. note:: The default login/password is "admin/admin"
|
||||
|
||||
|
||||
Switching to flat theme
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
What you see is what is called a "classic" skin. Zoneminder has a host of configuration options that you can customize over time. This guide is meant to get you started the easiest possible way, so we will not go into all the details. However, it is worthwhile to note that Zoneminder also has a 'flat' theme that depending on your preferences may look more modern. So let's use that as an example of introducing you to the Options menu
|
||||
Understanding the Web Console
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Before we proceed, lets spend a few minutes understanding the key functions of the web console.
|
||||
For the sake of illustration, we are going to use a populated zoneminder configuration with several monitors and events.
|
||||
|
||||
.. image:: images/getting-started-understand-console.png
|
||||
|
||||
This screen is called the "console" screen in ZoneMinder and shows a summary of your monitors, associated events and more information.
|
||||
|
||||
* **A**: The options menu lets you configure many aspects of ZoneMinder. Refer to :doc:`options`.
|
||||
* **B**: This brings up a color coded log window that shows various system and component level logs. This window is useful if you are trying to diagnose issues. Refer to :doc:`logging`.
|
||||
* **C**: ZoneMinder allows you to group monitors gor logical separation. This option lets you create new groups, associate monitors to them and edit/delete existing groups.
|
||||
* **D**: Filters are a powerful mechanism to perform actions when certain conditions are met. ZoneMinder comes with some preset filters that keep a tab of disk space and others. Many users create their own filters for more advanced actions like sending emails when certain events occur and more. Refer to :doc:`filterevents`.
|
||||
* **E**: The Cycle option allows you to rotate between live views of each cofigured monitor.
|
||||
* **F**: The Montage option shows a collage of your monitors. You can customize them including moving them around.
|
||||
* **G**: Montage Review allows you to simultaneously view past events for different monitors. Note that this is a very resource intensive page and its performance will vary based on your system capabilities.
|
||||
* **H**: Audit Events Report is more of a power user feature. This option looks for recording gaps in events and recording issues in mp4 files.
|
||||
* **I**: This is the user you are currently logged in as.
|
||||
* **J**: ZoneMinder allows you to maintain "run states". If you click on the "Running" text, ZoneMinder brings up a popup that allows you to define additional "states" (referred to as runstates). A runstate is essentially a snapshot that records the state of each monitor and you can switch between states easily. For example, you might have a run state defined that switches all monitors to "monitor" mode in which they are not recording anything while another state that sets some of the monitors to "modect". Why would you want this? A great example is to disable recording when you are at home and enable when you are away, based on time of day or other triggers. You can switch states by selecting an appropriate state manually, or do it automatically via cron jobs, for example. An example of using cron to automatically switch is provided in the :ref:`FAQ <runstate_cron_example>`. More esoteric examples of switching run states based on phone location can be found `here <https://forums.zoneminder.com/viewtopic.php?f=9&t=23026>`__.
|
||||
|
||||
|
||||
Here is an example of multiple run states that I've defined. Each one of these runstates changes the mode of specific monitors depending on time of day and other conditions. Use your imagination to decide which conditions require state changes.
|
||||
|
||||
.. image:: images/runstates.png
|
||||
|
||||
* **K**: This line shows you system health information
|
||||
* **L**: This defines how Zoneminder will record events. There are various modes. In brief Modect == record if a motion is detected,Record = always record 24x7, Mocord = always record PLUS detect motion, Monitor = just provide a live view but don't record anytime, Nodect = Don't record till an external entity via zmtrigger tells Zoneminder to (this is advanced usage).
|
||||
* **M**: This is the "source" column that tells you the type of the camera - if its an IP camera, a USB camera or more. In this example, they are all IP cameras. Green means the monitor is running. Red means there is something wrong with that camera.
|
||||
* **N**: This is the core of ZoneMinder - recording events. It gives you a count of how many events were recorded over the hour, day, week, month.
|
||||
* **O**: These are the "Zones". Zones are areas within the camera that you mark as 'hotspots' for motion detection. Simply put, when you first configure your monitors (cameras), by default Zoneminder uses the entire field of view of the camera to detect motion. You may not want this. You may want to create "zones" specifically for detecting motion and ignore others. For example, lets consider a room with a fan that spins. You surely don't want to consider the fan moving continuously a reason for triggering a record? Probably not - in that case, you'd leave the fan out while making your zones.
|
||||
* **P**: This is a "visual filter" which lets you 'filter' the console display based on text you enter. While this may not be particularly useful for small systems, ZoneMinder is also used in mega-installations will well over 200+ cameras and this visual filter helps reduce the monitors you are seeing at one time.
|
||||
|
||||
Adding Monitors
|
||||
^^^^^^^^^^^^^^^
|
||||
Now that we have a basic understanding of the web console, lets go about adding a new camera (monitor). For this example, lets assume we have an IP camera that streams RTSP at LAN IP address 192.168.1.33.
|
||||
|
||||
.. sidebar:: Note
|
||||
|
||||
This is meant to be a simple example. For a more detailed explanation of other options available when creating a monitor, please see :doc:`/userguide/definemonitor`
|
||||
|
||||
The first thing we will need to know is how to access that camera's video feed. You will need to consult your camera's manual or check their forum. Zoneminder community users also have a frequently updated list right `here <https://wiki.zoneminder.com/index.php/Hardware_Compatibility_List>`__ that lists information about many cameras. If you don't find your list there and can't seem to find it elsewhere, feel free to register and ask in the `user forums <https://forums.zoneminder.com/>`__.
|
||||
|
||||
The camera we are using as an example here is a Foscam 9831W which is a 1280x960 RTSP camera, and the URL to access it's feed is *username:password@IPADDRESS:PORT/videoMain*
|
||||
|
||||
Let's get started:
|
||||
|
||||
Click on the "Add" button below:
|
||||
|
||||
.. image:: images/getting-started-modern-look.png
|
||||
:width: 600px
|
||||
|
||||
This brings up the new monitor window:
|
||||
|
||||
.. image:: images/getting-started-add-monitor-general.png
|
||||
:width: 600px
|
||||
|
||||
* We've given it a name of 'Garage', because, well, its better than Monitor-1 and this is my Garage camera.
|
||||
|
||||
* There are various source types. As a brief introduction you'd want to use 'Local' if your camera is physically attached to your ZM server (like a USB camera, for example), and one of 'Remote', 'FFMpeg', 'Libvlc' or 'cURL' for a remote camera (not necessarily, but usually). For this example, let's go with 'FFMpeg'.
|
||||
|
||||
.. note::
|
||||
As a thumb rule, if you have a camera accessible via IP and it does HTTP or RTSP,
|
||||
start with FFMpeg first and libvlc if it doesn't work (:doc:`/userguide/definemonitor`
|
||||
covers other modes in more details). If you are wondering what 'File' does, well, ZoneMinder was
|
||||
built with compatibility in mind. Take a look at `this post
|
||||
<https://wiki.zoneminder.com/index.php/How_to_use_ZoneMinder_with_cameras_it_may_not_directly_support>`__ to see how file can be used for leisure reading.
|
||||
|
||||
* In this example, the Function is 'Modect', which means it will start recording if motion is detected on that camera feed. The parameters for what constitutes motion detected is specific in :doc:`definezone`
|
||||
|
||||
* In Analytis FPS, we've put in 5FPS here. Note that you should not put an FPS that is greater than the camera FPS. In my case, 5FPS is sufficient for my needs
|
||||
|
||||
.. note::
|
||||
Leave Maximum FPS and Alarm Maximum FPS **empty** if you are configuring an IP camera. In older versions of ZoneMinder, you were encouraged to put a value here, but that is no longer recommended. Infact, if you see your feed going much slower than the feed is supposed to go, or you get a lot of buffering/display issues, make sure this is empty. If you need to control camera FPS, please do it directly on the camera (via its own web interface, for example)
|
||||
|
||||
|
||||
* We are done for the General tab. Let's move to the next tab
|
||||
|
||||
.. image:: images/getting-started-add-monitor-source.png
|
||||
:width: 800px
|
||||
|
||||
* Let's select a protocol of RTSP and a remote method of RTP/RTSP (this is an RTSP camera)
|
||||
* Note that starting ZM 1.34, GPUs are supported. In my case, I have an NVIDIA GeForce GTX1050i. These ``cuda`` and ``cuvid`` parameters are what my system supports to use the NVIDIA hardware decoder and GPU resources. If you don't have a GPU, or don't know how to configure your ffmpeg to support it, leave it empty for now. In future, we will add a section on how to set up a GPU
|
||||
|
||||
.. todo::
|
||||
add GPU docs
|
||||
|
||||
That's pretty much it. Click on Save. We are not going to explore the other tabs in this simple guide.
|
||||
|
||||
You now have a configured monitor:
|
||||
|
||||
.. image:: images/getting-started-add-monitor-modect-ready.png
|
||||
|
||||
|
||||
And then, finally, to see if everything works, if you click on the garage monitor you just added, you should be able to see its live feed. If you don't, inspect your webserver logs and your ZoneMinder logs to see what is going on.
|
||||
|
||||
|
||||
Switching to another theme
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. todo::
|
||||
Fix theme text after I clearly understand that System->CSS is doing
|
||||
|
||||
When you first install ZoneMinder, you see is what is called a "classic" skin. Zoneminder has a host of configuration options that you can customize over time. This guide is meant to get you started the easiest possible way, so we will not go into all the details. However, it is worthwhile to note that Zoneminder also has a 'flat' theme that depending on your preferences may look more modern. So let's use that as an example of introducing you to the Options menu
|
||||
|
||||
* Click on the Options link on the top right of the web interface in the image above
|
||||
* This will bring you to the options window as shown below. Click on the "System" tab and then select the
|
||||
|
@ -51,98 +163,6 @@ Congratulations! You now have a modern looking interface.
|
|||
|
||||
.. image:: images/getting-started-modern-look.png
|
||||
|
||||
Understanding the Web Console
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Before we proceed, lets spend a few minutes understanding the key functions of the web console.
|
||||
For the sake of illustration, we are going to use a populated zoneminder configuration with several monitors and events.
|
||||
Obviously, this does not reflect your current web console - which is essentially void of any useful information till now,
|
||||
as we are yet to add things. Let's take a small break and understand what the various functions are before we configure our
|
||||
own empty screen.
|
||||
|
||||
.. image:: images/getting-started-understand-console.png
|
||||
|
||||
* **A**: This is the username that is logged in. You are logged in as 'admin' here
|
||||
* **B**: Click here to explore the various options of ZoneMinder and how to configure them. You already used this to enable authentication and change style above. Over time, you will find this to have many other things you will want to customize.
|
||||
* **C**: This link, when clicked, opens up a color coded log window of what is going on in Zoneminder and often gives you good insight into what is going wrong or right. Note that the color here is red - that is an indication that some error occurred in ZoneMinder. You should click it and investigate.
|
||||
* **D**: This is the core of ZoneMinder - recording events. It gives you a count of how many events were recorded over the hour, day, week, month.
|
||||
* **E**: These are the "Zones". Zones are areas within the camera that you mark as 'hotspots' for motion detection. Simply put, when you first configure your monitors (cameras), by default Zoneminder uses the entire field of view of the camera to detect motion. You may not want this. You may want to create "zones" specifically for detecting motion and ignore others. For example, lets consider a room with a fan that spins. You surely don't want to consider the fan moving continuously a reason for triggering a record? Probably not - in that case, you'd leave the fan out while making your zones.
|
||||
* **F**: This is the "source" column that tells you the type of the camera - if its an IP camera, a USB camera or more. In this example, they are all IP cameras. Note the color red on item F ? Well that means there is something wrong with that camera. No wonder the log also shows red. Good indication for you to tap on logs and investigate
|
||||
* **G**: This defines how Zoneminder will record events. There are various modes. In brief Modect == record if a motion is detected,Record = always record 24x7, Mocord = always record PLUS detect motion, Monitor = just provide a live view but don't record anytime, Nodect = Don't record till an external entity via zmtrigger tells Zoneminder to (this is advanced usage).
|
||||
* **H**: If you click on these links you can view a "Montage" of all your configured monitors or cycle through each one
|
||||
* **I**: One of the most often missed features is the ability of ZoneMinder to maintain "run states". If you click on the "Running" text, ZoneMinder brings up a popup that allows you to define additional "states" (referred to as runstates). A runstate is essentially a snapshot that records the state of each monitor and you can switch between states easily. For example, you might have a run state defined that switches all monitors to "monitor" mode in which they are not recording anything while another state that sets some of the monitors to "modect". Why would you want this? A great example is to disable recording when you are at home and enable when you are away, based on time of day or other triggers. You can switch states by selecting an appropriate state manually, or do it automatically via cron jobs, for example. An example of using cron to automatically switch is provided in the :ref:`FAQ <runstate_cron_example>`. More esoteric examples of switching run states based on phone location can be found `here <https://forums.zoneminder.com/viewtopic.php?f=9&t=23026>`__.
|
||||
|
||||
Here is an example of multiple run states that I've defined. Each one of these runstates changes the mode of specific monitors depending on time of day and other conditions. Use your imagination to decide which conditions require state changes.
|
||||
|
||||
.. image:: images/runstates.png
|
||||
|
||||
|
||||
|
||||
Adding Monitors
|
||||
^^^^^^^^^^^^^^^
|
||||
Now that we have a basic understanding of the web console, lets go about adding a new camera (monitor). For this example, lets assume we have an IP camera that streams RTSP at LAN IP address 192.168.1.33.
|
||||
|
||||
The first thing we will need to know is how to access that camera's video feed. You will need to consult your camera's manual or check their forum. Zoneminder community users also have a frequently updated list right `here <https://wiki.zoneminder.com/index.php/Hardware_Compatibility_List>`__ that lists information about many cameras. If you don't find your list there and can't seem to find it elsewhere, feel free to register and ask in the `user forums <https://forums.zoneminder.com/>`__.
|
||||
|
||||
The camera we are using as an example here is a Foscam 9831W which is a 1280x960 RTSP camera, and the URL to access it's feed is *username:password@IPADDRESS:PORT/videoMain*
|
||||
|
||||
Let's get started:
|
||||
|
||||
Click on the "Add new monitor" button below:
|
||||
|
||||
.. image:: images/getting-started-modern-look.png
|
||||
|
||||
This brings up the new monitor window:
|
||||
|
||||
.. image:: images/getting-started-add-monitor-general.png
|
||||
:width: 800px
|
||||
|
||||
* We've given it a name of 'Garage', because, well, its better than Monitor-1 and this is my Garage camera.
|
||||
|
||||
* There are various source types. As a brief introduction you'd want to use 'Local' if your camera is physically attached to your ZM server (like a USB camera, for example), and one of 'Remote', 'FFMpeg', 'Libvlc' or 'cURL' for a remote camera (not necessarily, but usually). For this example, let's go with 'Remote'.
|
||||
|
||||
.. NOTE::
|
||||
As a thumb rule, if you have a camera accessible via IP and it does HTTP or RTSP,
|
||||
start with Remote, then try FFMpeg and libvlc if it doesn't work (:doc:`/userguide/definemonitor`
|
||||
covers other modes in more details). If you are wondering what 'File' does, well, ZoneMinder was
|
||||
built with compatibility in mind. Take a look at `this post
|
||||
<https://wiki.zoneminder.com/index.php/How_to_use_ZoneMinder_with_cameras_it_may_not_directly_support>`__ to see how file can be used for leisure reading.
|
||||
|
||||
* Let's leave the Function as 'Monitor' just so we can use this as an example to change it later another way. Practically, feel free to select your mode right now - Modect, Record etc depending on what you want ZoneMinder to do with this camera
|
||||
|
||||
* We've put in MaxFPS and AlarmFPS as 20 here. **You can leave this empty too**. Whatever you do here, *it's important to make sure these values are higher than the FPS of the camera*. The reason we've added a value here is that as of Aug 2015, if a camera goes offline, ZoneMinder eats up a lot of CPU trying to reach it and putting a larger value here than the actual FPS helps in that specific situation.
|
||||
|
||||
.. NOTE::
|
||||
We strongly recommend not putting in a lower FPS here that the one configured inside your camera.
|
||||
Zoneminder should not be used to manage camera frame rate. That always causes many problems. It's
|
||||
much better you set the value directly in-camera and either leave this blank or specify a higher FPS
|
||||
here. In this case, our actual camera FPS is 3 and we've set this value here to 10.
|
||||
|
||||
* We are done for the General tab. Let's move to the next tab
|
||||
|
||||
.. image:: images/getting-started-add-monitor-source.png
|
||||
:width: 800px
|
||||
|
||||
* Let's select a protocol of RTSP and a remote method of RTP/RTSP (this is an RTSP camera)
|
||||
* The other boxes are mostly self-explanatory
|
||||
|
||||
That's pretty much it. Click on Save. We are not going to explore the other tabs in this simple guide.
|
||||
|
||||
You now have a configured monitor:
|
||||
|
||||
.. image:: images/getting-started-add-monitor-orange.png
|
||||
|
||||
If you want to change its mode from Monitor to say, Modect (Motion Detect), later all you need to do is click on the Function column that says 'Monitor' and change it to 'Modect' like so:
|
||||
|
||||
|
||||
.. image:: images/getting-started-add-monitor-modect.png
|
||||
|
||||
and we now have:
|
||||
|
||||
.. image:: images/getting-started-add-monitor-modect-ready.png
|
||||
|
||||
And then, finally, to see if everything works, lets click on the monitor name ('Garage' in this example) and that should bring up a live feed just like this:
|
||||
|
||||
.. image:: images/getting-started-add-monitor-live.png
|
||||
|
||||
|
||||
Conclusion
|
||||
|
|
Before Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 306 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 517 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 665 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 83 KiB |
|
@ -15,4 +15,5 @@ User Guide
|
|||
cameracontrol
|
||||
mobile
|
||||
logging
|
||||
configfiles
|
||||
|
||||
|
|
|
@ -1,18 +1,33 @@
|
|||
Logging
|
||||
=======
|
||||
|
||||
Most components of ZoneMinder can emit informational, warning, error and debug messages in a standard format. These messages can be logged in one or more locations. By default all messages produced by scripts are logged in <script name>.log files which are placed in the directory defined by the ZM_PATH_LOGS configuration variable. This is initially defined as ‘/tmp’ though it can be overridden (see the Options and Users section above). So for example, the zmpkg.pl script will output messages to /tmp/zmpkg.pl, an example of these messages is::
|
||||
.. note::
|
||||
Understanding how logging works in ZoneMinder is key to being able to isolate/pinpoint issues well. Please refer to :doc:`/userguide/options/options_logging` to read about how to customize logging.
|
||||
|
||||
03/01/06 13:46:00.166046 zmpkg[11148].INF [Command: start]
|
||||
Most components of ZoneMinder can emit informational, warning, error and debug messages in a standard format. These messages can be logged in one or more locations. By default all messages produced by scripts are logged in <script name>.log files which are placed in the directory defined by the ``ZM_PATH_LOGS`` configuration variable. This is initially defined as ``/var/log/zm`` (on debian based systems) though it can be overridden to a custom path (the path is usually defined in ``/etc/zm/conf.d/01-system-paths.conf``, but to override it, you should create your own config file, not overwrite this file). So for example, the ``zmdc.pl`` script will output messages to ``/var/log/zmdc.log``, an example of these messages is::
|
||||
|
||||
10/24/2019 08:01:19.291513 zmdc[6414].INF [ZMServer:408] [Starting pending process, zma -m 2]
|
||||
10/24/2019 08:01:19.296575 zmdc[6414].INF [ZMServer:408] ['zma -m 2' starting at 19/10/24 08:01:19, pid = 15740]
|
||||
10/24/2019 08:01:19.296927 zmdc[15740].INF [ZMServer:408] ['zma -m 2' started at 19/10/24 08:01:19]
|
||||
|
||||
where the first part refers to the date and time of the entry, the next section is the name (or an abbreviated version) of the script, followed by the process id in square brackets, a severity code (INF, WAR, ERR or DBG) and the debug text. If you change the location of the log directory, ensure it refers to an existing directory which the web user has permissions to write to. Also ensure that no logs are present in that directory the web user does not have permission to open. This can happen if you run commands or scripts as the root user for testing at some point. If this occurs then subsequent non-privileged runs will fails due to being unable to open the log files.
|
||||
|
||||
As well as specific script logging above, information, warning and error messages are logged via the system syslog service. This is a standard component on Linux systems and allows logging of all sorts of messages in a standard way and using a standard format. On most systems, unless otherwise configured, messages produced by ZoneMinder will go to the /var/log/messages file. On some distributions they may end up in another file, but usually still in /var/log. Messages in this file are similar to those in the script log files but differ slightly. For example the above event in the system log file looks like::
|
||||
As well as specific script logging above, information, warning and error messages are logged via the system syslog service. This is a standard component on Linux systems and allows logging of all sorts of messages in a standard way and using a standard format. On most systems, unless otherwise configured, messages produced by ZoneMinder will go to the ``/var/log/messages`` or ``/var/log/syslog`` file. On some distributions they may end up in another file, but usually still in /var/log. Messages in this file are similar to those in the script log files but differ slightly. For example the above event in the system log file looks like::
|
||||
|
||||
Jan 3 13:46:00 shuttle52 zmpkg[11148]: INF [Command: start]
|
||||
|
||||
where you can see that the date is formatted differently (and only to 1 second precision) and there is an additional field for the hostname (as syslog can operate over a network). As well as ZoneMinder entries in this file you may also see entries from various other system components. You should ensure that your syslogd daemon is running for syslog messages to be correctly handled.
|
||||
|
||||
|
||||
Customizing logging properly in ZoneMinder
|
||||
-------------------------------------------
|
||||
|
||||
.. todo:
|
||||
Is this all valid anymore ?
|
||||
|
||||
|
||||
Other Notes
|
||||
-------------
|
||||
A number of users have asked how to suppress or redirect ZoneMinder messages that are written to this file. This most often occurs due to not wanting other system messages to be overwhelmed and obscured by the ZoneMinder produced ones (which can be quite frequent by default). In order to control syslog messages you need to locate and edit the syslog.conf file on your system. This will often be in the /etc directory. This file allows configuration of syslog so that certain classes and categories of messages are routed to different files or highlighted to a console, or just ignored. Full details of the format of this file is outside the scope of this document (typing ‘man syslog.conf’ will give you more information) but the most often requested changes are easy to implement.
|
||||
|
||||
The syslog service uses the concept of priorities and facilities where the former refers to the importance of the message and the latter refers to that part of the system from which it originated. Standard priorities include ‘info’, ‘warning’, ‘err’ and ‘debug’ and ZoneMinder uses these priorities when generating the corresponding class of message. Standard facilities include ‘mail’, ‘cron’ and ‘security’ etc but as well this, there are eight ‘local’ facilities that can be used by machine specific message generators. ZoneMinder produces it’s messages via the ‘local1’ facility.
|
||||
|
|
|
@ -6,7 +6,7 @@ Here are some options for using ZoneMinder on Mobile devices:
|
|||
Third party mobile clients
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* zmNinja (`source code <https://github.com/pliablepixels/zmNinja>`__, needs APIs to be installed to work)
|
||||
* Available in App Store and Play Store - `website <http://pliablepixels.github.io/zmNinja/>`__
|
||||
* Available in App Store, Play Store and for Desktops - `website <http://pliablepixels.github.io/zmNinja/>`__
|
||||
|
||||
Using the existing web console
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -17,5 +17,4 @@ Discontinued clients
|
|||
The following are a list of clients that do not work and have not been updated:
|
||||
|
||||
* eyeZM
|
||||
* zmView (limited, free) and zmView Pro (more features, paid)
|
||||
* Available in App Store and Play Store, relies on ZM skins
|
||||
* zmView
|
|
@ -5,13 +5,16 @@ The various options you can specify are displayed in a tabbed dialog with each g
|
|||
|
||||
If you have changed the value of an option you should then ‘save’ it. A number of the option groups will then prompt you to let you know that the option(s) you have changed will require a system restart. This is not done automatically in case you will be changing many values in the same session, however once you have made all of your changes you should restart ZoneMinder as soon as possible. The reason for this is that web and some scripts will pick up the new changes immediately but some of the daemons will still be using the old values and this can lead to data inconsistency or loss.
|
||||
|
||||
.. note:: If you are looking for ``Options->Paths`` documentation, it was moved to a configuration file starting ZoneMinder 1.32. See :ref:`here <replacement_for_options_path>`.
|
||||
|
||||
.. toctree::
|
||||
|
||||
options/options_display
|
||||
options/options_system
|
||||
options/options_config
|
||||
options/options_api
|
||||
options/options_servers
|
||||
options/options_paths
|
||||
options/options_storage
|
||||
options/options_web
|
||||
options/options_images
|
||||
options/options_logging
|
||||
|
|
After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 55 KiB |
|
@ -0,0 +1,13 @@
|
|||
Options - API
|
||||
---------------
|
||||
|
||||
.. note::
|
||||
The ZoneMinder web interface does not use APIs and therefore, the tokens discussed here don't apply to the ZoneMinder UI. These only appy to apps that use the ZoneMinder API, like zmNinja.
|
||||
|
||||
The API option screen allows you enable/disable APIs on a per user basis. Furthermore, it also allows you to "revoke" tokens allotted to users. Starting ZoneMinder 1.34, the API ecosystem was overhauled and we now support JWT tokens with a concept of refresh tokens and access tokens. This allows for authentication without the need for sending passwords with each authentication request. For a more detailed understanding of how this works, please refer to :doc:`/api`. Over time, more control will be added to this screen.
|
||||
|
||||
|
||||
.. image:: images/Options_API.png
|
||||
|
||||
The "Revoke All Tokens" button can be used to globally invalidate access tokens for all users. If tokens are revoked, the user(s) will need to re-authenticate with login and password.
|
||||
As of today, refresh tokens last for 24 hours and access tokens for 1 hour.
|
|
@ -1,9 +1,13 @@
|
|||
Options - High, Medium and Low B/W
|
||||
----------------------------------
|
||||
|
||||
There are a number of options that are grouped into bandwidth categories, this allows you to configure the ZoneMinder client to work optimally over the various access methods you might to access the client. You may want to use different modes depending on your network to preserve bandwidth.
|
||||
|
||||
A partial screenshot is shown below:
|
||||
|
||||
.. image:: images/Options_BW.png
|
||||
|
||||
There are now a number of options that are grouped into bandwidth categories, this allows you to configure the ZoneMinder client to work optimally over the various access methods you might to access the client. The following options are available in H, M and L options. These 3 groups control what happens when the client is running in 'high', 'medium' and 'low' bandwidth mode respectively. In most cases the default values will be suitable as a starting point.
|
||||
The following options are available in H, M and L options. These 3 groups control what happens when the client is running in 'high', 'medium' and 'low' bandwidth mode respectively. In most cases the default values will be suitable as a starting point.
|
||||
|
||||
High - You should set these options for when accessing the ZoneMinder client over a local network or high speed link.
|
||||
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
Options - Config
|
||||
----------------
|
||||
The config screen allows the admin to change various configuration parameters related to image capturing and storage.
|
||||
|
||||
A partial screenshot is shown below:
|
||||
|
||||
.. image:: images/Options_Config.png
|
||||
|
||||
TIMESTAMP_ON_CAPTURE - ZoneMinder can add a timestamp to images in two ways. The default method, when this option is set, is that each image is timestamped immediately when captured and so the image held in memory is marked right away. The second method does not timestamp the images until they are either saved as part of an event or accessed over the web. The timestamp used in both methods will contain the same time as this is preserved along with the image. The first method ensures that an image is timestamped regardless of any other circumstances but will result in all images being timestamped even those never saved or viewed. The second method necessitates that saved images are copied before being saved otherwise two timestamps perhaps at different scales may be applied. This has the (perhaps) desirable side effect that the timestamp is always applied at the same resolution so an image that has scaling applied will still have a legible and correctly scaled timestamp.
|
||||
|
||||
TIMESTAMP_CODE_CHAR - There are a few codes one can use to tell ZoneMinder to insert data into the timestamp of each image. Traditionally, the percent (%) character has been used to identify these codes since the current character codes do not conflict with the strftime codes, which can also be used in the timestamp. While this works well for Linux, this does not work well for BSD operating systems. Changing the default character to something else, such as an exclamation point (!), resolves the issue. Note this only affects the timestamp codes built into ZoneMinder. It has no effect on the family of strftime codes one can use.
|
||||
|
||||
CPU_EXTENSIONS - When advanced processor extensions such as SSE2 or SSSE3 are available, ZoneMinder can use them, which should increase performance and reduce system load. Enabling this option on processors that do not support the advanced processors extensions used by ZoneMinder is harmless and will have no effect.
|
||||
|
||||
FAST_IMAGE_BLENDS - To detect alarms ZoneMinder needs to blend the captured image with the stored reference image to update it for comparison with the next image. The reference blend percentage specified for the monitor controls how much the new image affects the reference image. There are two methods that are available for this. If this option is set then fast calculation which does not use any multiplication or division is used. This calculation is extremely fast, however it limits the possible blend percentages to 50%, 25%, 12.5%, 6.25%, 3.25% and 1.5%. Any other blend percentage will be rounded to the nearest possible one. The alternative is to switch this option off and use standard blending instead, which is slower.
|
||||
|
@ -15,7 +20,7 @@ MAX_SUSPEND_TIME - ZoneMinder allows monitors to have motion detection to be sus
|
|||
|
||||
STRICT_VIDEO_CONFIG - With some video devices errors can be reported in setting the various video attributes when in fact the operation was successful. Switching this option off will still allow these errors to be reported but will not cause them to kill the video capture daemon. Note however that doing this will cause all errors to be ignored including those which are genuine and which may cause the video capture to not function correctly. Use this option with caution.
|
||||
|
||||
SIGNAL_CHECK_POINTS - For locally attached video cameras ZoneMinder can check for signal loss by looking at a number of random points on each captured image. If all of these points are set to the same fixed colour then the camera is assumed to have lost signal. When this happens any open events are closed and a short one frame signal loss event is generated, as is another when the signal returns. This option defines how many points on each image to check. Note that this is a maximum, any points found to not have the check colour will abort any further checks so in most cases on a couple of points will actually be checked. Network and file based cameras are never checked.
|
||||
LD_PRELOAD - Some older cameras require the use of the v4l1 compat library. This setting allows the setting of the path to the library, so that it can be loaded by zmdc.pl before launching zmc.
|
||||
|
||||
V4L_MULTI_BUFFER - Performance when using Video 4 Linux devices is usually best if multiple buffers are used allowing the next image to be captured while the previous one is being processed. If you have multiple devices on a card sharing one input that requires switching then this approach can sometimes cause frames from one source to be mixed up with frames from another. Switching this option off prevents multi buffering resulting in slower but more stable image capture. This option is ignored for non-local cameras or if only one input is present on a capture chip. This option addresses a similar problem to the ZM_CAPTURES_PER_FRAME option and you should normally change the value of only one of the options at a time. If you have different capture cards that need different values you can ovveride them in each individual monitor on the source page.
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
Options - Display
|
||||
-----------------
|
||||
|
||||
This option screen allows user to select the skin for ZoneMinder. Currently available styles are:
|
||||
|
||||
.. image:: images/Options_Display.png
|
||||
|
||||
This option screen allows user to select the skin for ZoneMinder. Currently available skins are:
|
||||
|
||||
* Classic
|
||||
* Flat
|
||||
* XML (Deprecated in favour of web/API)
|
||||
* Mobile (Deprecated)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@ EMAIL_SUBJECT - This option is used to define the subject of the email that is s
|
|||
|
||||
EMAIL_BODY - This option is used to define the content of the email that is sent for any events that match the appropriate filters.
|
||||
|
||||
.. todo::
|
||||
check if any other tags have been added
|
||||
|
||||
+--------+--------------------------------------------------------+
|
||||
| Token | Description |
|
||||
+========+========================================================+
|
||||
|
@ -50,6 +53,9 @@ EMAIL_BODY - This option is used to define the content of the email that is sent
|
|||
+--------+--------------------------------------------------------+
|
||||
| %EIM% | Attach (first) event image with the highest score |
|
||||
+--------+--------------------------------------------------------+
|
||||
| %EIMOD%| Attach image of object detected. Requires event notfn. |
|
||||
| | server setup and machine learning hooks |
|
||||
+--------+--------------------------------------------------------+
|
||||
| %EV% | Attach event mpeg video |
|
||||
+--------+--------------------------------------------------------+
|
||||
| %MN% | Name of the monitor |
|
||||
|
@ -94,3 +100,7 @@ EMAIL_HOST - If you have chosen SMTP as the method by which to send notification
|
|||
FROM_EMAIL - The emails or messages that will be sent to you informing you of events can appear to come from a designated email address to help you with mail filtering etc. An address of something like ZoneMinder\@your.domain is recommended.
|
||||
|
||||
URL - The emails or messages that will be sent to you informing you of events can include a link to the events themselves for easy viewing. If you intend to use this feature then set this option to the url of your installation as it would appear from where you read your email, e.g. ``http://host.your.domain/zm/index.php``.
|
||||
|
||||
SSMTP_MAIL - SSMTP is a lightweight and efficient method to send email. The SSMTP application is not installed by default. NEW_MAIL_MODULES must also be enabled. Please visit the ZoneMinder `SSMTP Wiki page <http://www.zoneminder.com/wiki/index.php/How_to_get_ssmtp_working_with_Zoneminder>`__ for setup and configuration help.
|
||||
|
||||
SSMTP_PATH - The path to the SSMTP application. If path is not defined. Zoneminder will try to determine the path via shell command. Example path: /usr/sbin/ssmtp.
|
|
@ -1,33 +1,32 @@
|
|||
Options - Images
|
||||
----------------
|
||||
|
||||
This screen lets you control various image quality settings for live and recorded events. A partial screenshot is shown below:
|
||||
|
||||
.. image:: images/Options_images.png
|
||||
|
||||
OPT_FFMPEG - ZoneMinder can optionally encode a series of video images into an MPEG encoded movie file for viewing, downloading or storage. This option allows you to specify whether you have the ffmpeg tools installed. Note that creating MPEG files can be fairly CPU and disk intensive and is not a required option as events can still be reviewed as video streams without it.
|
||||
|
||||
PATH_FFMPEG - This path should point to where ffmpeg has been installed.
|
||||
COLOUR_JPEG_FILES - Cameras that capture in greyscale can write their captured images to jpeg files with a corresponding greyscale colour space. This saves a small amount of disk space over colour ones. However some tools such as ffmpeg either fail to work with this colour space or have to convert it beforehand. Setting this option to yes uses up a little more space but makes creation of MPEG files much faster.
|
||||
|
||||
FFMPEG_INPUT_OPTIONS - Ffmpeg can take many options on the command line to control the quality of video produced. This option allows you to specify your own set that apply to the input to ffmpeg (options that are given before the -i option). Check the ffmpeg documentation for a full list of options which may be used here.
|
||||
ADD_JPEG_COMMENTS - JPEG files may have a number of extra fields added to the file header. The comment field may have any kind of text added. This options allows you to have the same text that is used to annotate the image additionally included as a file header comment. If you archive event images to other locations this may help you locate images for particular events or times if you use software that can read comment headers.
|
||||
|
||||
FFMPEG_OUTPUT_OPTIONS - Ffmpeg can take many options on the command line to control the quality of video produced. This option allows you to specify your own set that apply to the output from ffmpeg (options that are given after the -i option). Check the ffmpeg documentation for a full list of options which may be used here. The most common one will often be to force an output frame rate supported by the video encoder.
|
||||
JPEG_FILE_QUALITY - When ZoneMinder detects an event it will save the images associated with that event to files. These files are in the JPEG format and can be viewed or streamed later. This option specifies what image quality should be used to save these files. A higher number means better quality but less compression so will take up more disk space and take longer to view over a slow connection. By contrast a low number means smaller, quicker to view, files but at the price of lower quality images. This setting applies to all images written except if the capture image has caused an alarm and the alarm file quality option is set at a higher value when that is used instead.
|
||||
|
||||
FFMPEG_FORMATS - Ffmpeg can generate video in many different formats. This option allows you to list the ones you want to be able to select. As new formats are supported by ffmpeg you can add them here and be able to use them immediately. Adding a '*' after a format indicates that this will be the default format used for web video, adding '**' defines the default format for phone video.
|
||||
|
||||
FFMPEG_OPEN_TIMEOUT - When Ffmpeg is opening a stream, it can take a long time before failing; certain circumstances even seem to be able to lock indefinitely. This option allows you to set a maximum time in seconds to pass before closing the stream and trying to reopen it again.
|
||||
JPEG_ALARM_FILE_QUALITY - This value is equivalent to the regular jpeg file quality setting above except that it only applies to images saved while in an alarm state and then only if this value is set to a higher quality setting than the ordinary file setting. If set to a lower value then it is ignored. Thus leaving it at the default of 0 effectively means to use the regular file quality setting for all saved images. This is to prevent accidentally saving important images at a worse quality setting.
|
||||
|
||||
JPEG_STREAM_QUALITY - When viewing a 'live' stream for a monitor ZoneMinder will grab an image from the buffer and encode it into JPEG format before sending it. This option specifies what image quality should be used to encode these images. A higher number means better quality but less compression so will take longer to view over a slow connection. By contrast a low number means quicker to view images but at the price of lower quality images. This option does not apply when viewing events or still images as these are usually just read from disk and so will be encoded at the quality specified by the previous options.
|
||||
|
||||
MPEG_TIMED_FRAMES - When using streamed MPEG based video, either for live monitor streams or events, ZoneMinder can send the streams in two ways. If this option is selected then the timestamp for each frame, taken from it's capture time, is included in the stream. This means that where the frame rate varies, for instance around an alarm, the stream will still maintain it's 'real' timing. If this option is not selected then an approximate frame rate is calculated and that is used to schedule frames instead. This option should be selected unless you encounter problems with your preferred streaming method.
|
||||
|
||||
MPEG_LIVE_FORMAT - When using MPEG mode ZoneMinder can output live video. However what formats are handled by the browser varies greatly between machines. This option allows you to specify a video format using a file extension format, so you would just enter the extension of the file type you would like and the rest is determined from that. The default of 'asf' works well under Windows with Windows Media Player but I'm currently not sure what, if anything, works on a Linux platform. If you find out please let me know! If this option is left blank then live streams will revert to being in motion jpeg format
|
||||
MPEG_LIVE_FORMAT - When using MPEG mode ZoneMinder can output live video. However what formats are handled by the browser varies greatly between machines. This option allows you to specify a video format using a file extension format, so you would just enter the extension of the file type you would like and the rest is determined from that. The default of 'asf' works well under Windows with Windows Media Player but I'm currently not sure what, if anything, works on a Linux platform. If you find out please let me know! If this option is left blank then live streams will revert to being in motion jpeg format.
|
||||
|
||||
MPEG_REPLAY_FORMAT - When using MPEG mode ZoneMinder can replay events in encoded video format. However what formats are handled by the browser varies greatly between machines. This option allows you to specify a video format using a file extension format, so you would just enter the extension of the file type you would like and the rest is determined from that. The default of 'asf' works well under Windows with Windows Media Player and 'mpg', or 'avi' etc should work under Linux. If you know any more then please let me know! If this option is left blank then live streams will revert to being in motion jpeg format
|
||||
MPEG_REPLAY_FORMAT - When using MPEG mode ZoneMinder can replay events in encoded video format. However what formats are handled by the browser varies greatly between machines. This option allows you to specify a video format using a file extension format, so you would just enter the extension of the file type you would like and the rest is determined from that. The default of 'asf' works well under Windows with Windows Media Player and 'mpg', or 'avi' etc should work under Linux. If you know any more then please let me know! If this option is left blank then live streams will revert to being in motion jpeg format.
|
||||
|
||||
RAND_STREAM - Some browsers can cache the streams used by ZoneMinder. In order to prevent this a harmless random string can be appended to the url to make each invocation of the stream appear unique.
|
||||
|
||||
OPT_CAMBOZOLA - Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.
|
||||
OPT_CAMBOZOLA - Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from `this link <http://www.charliemouse.com/code/cambozola/>`__ however if it is not installed still images at a lower refresh rate can still be viewed. Note that practically, if you are not using an old version of IE, you will likely not need this.
|
||||
|
||||
PATH_CAMBOZOLA - Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed. Leave this as 'cambozola.jar' if cambozola is installed in the same directory as the ZoneMinder web client files.
|
||||
PATH_CAMBOZOLA - Leave this as 'cambozola.jar' if cambozola is installed in the same directory as the ZoneMinder web client files.
|
||||
|
||||
RELOAD_CAMBOZOLA - Cambozola allows for the viewing of streaming MJPEG however it caches the entire stream into cache space on the computer, setting this to a number > 0 will cause it to automatically reload after that many seconds to avoid filling up a hard drive.
|
||||
|
||||
|
@ -42,3 +41,13 @@ FFMPEG_OUTPUT_OPTIONS - Ffmpeg can take many options on the command line to cont
|
|||
FFMPEG_FORMATS - Ffmpeg can generate video in many different formats. This option allows you to list the ones you want to be able to select. As new formats are supported by ffmpeg you can add them here and be able to use them immediately. Adding a '*' after a format indicates that this will be the default format used for web video, adding '**' defines the default format for phone video.
|
||||
|
||||
FFMPEG_OPEN_TIMEOUT - When Ffmpeg is opening a stream, it can take a long time before failing; certain circumstances even seem to be able to lock indefinitely. This option allows you to set a maximum time in seconds to pass before closing the stream and trying to reopen it again.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,38 @@
|
|||
Options - Logging
|
||||
-----------------
|
||||
|
||||
.. image:: images/Options_Logging.png
|
||||
ZoneMinder has a powerful logging system. Understanding how to configure logging will help you track issues better. The logging options are accessed via ``Options->Logging``. Let's follow along with an example. But before that, here is a basic construct of how logging works:
|
||||
|
||||
* Every component of ZoneMinder can generate different types of logs. Typically, ``ERR`` refers to an error condition that you should look at (in some cases, they are transient during startup/shutdown in which case they are usually benign). ``INF`` logs are informational, ``WAR`` are warning logs that might have a potential to cause issues, whilst ``DBG`` are debug logs that are useful when you need to debug a problems
|
||||
* You can decide where these logs are written. Typically ZoneMinder writes logs to multiple sources:
|
||||
* Syslog
|
||||
* Database
|
||||
* individual files belonging to each component inside the logging folder configured
|
||||
|
||||
Consider for example, that you are trying to figure out why your "zmc 11" (i.e. Monitor 11) is not working. Obviously, you need to enable debug logs if you are not able to figure out what is going on with standard info logs. But you wouldn't want to write debug logs to the Database. Maybe, you also don't want it polluting your syslog and only want to write debug logs to the debug file of _that_ component (``/var/log/zm/zmc_m11.log`` for example). That is where customizing your logging is useful.
|
||||
|
||||
Logging example
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. image:: images/Options_Logging_A.png
|
||||
|
||||
In the example above, I've configured my logging as follows:
|
||||
|
||||
* I only want to log INFO level logs to Syslog
|
||||
* I want DEBUG logs to only go to the conmponent file
|
||||
* When it comes to my WEBLOG (what I see in the ZM Log window) and Database log, I only want FATAL logs (you may want to set this to WAR or INF)
|
||||
* I don't want to save FFMPEG logs (this was a new feature added). FFMPEG generates a log of logs on its own that you should only enable if you are trying to figure out video playback related issues
|
||||
* I have enabled LOG_DEBUG (unless you enable this, DEBUG logs won't be logged)
|
||||
* The ``LOG_DEBUG_TARGET`` is useful if you don't want to enable DEBUG logs for every component. In this case, I'm only interested in debugging the ZM Event Server and Monitor 11. Nothing else will have debug logs enabled.
|
||||
* I prefer to keep the ``LOG_DEBUG_FILE`` to empty. This creates nicely separate files in my log folder with component names
|
||||
|
||||
The other logging parameters are left to their defaults, like so:
|
||||
|
||||
.. image:: images/Options_Logging_B.png
|
||||
|
||||
|
||||
A more comprehensive explanation of the various log options
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
LOG_LEVEL_SYSLOG - ZoneMinder logging is now more integrated between components and allows you to specify the destination for logging output and the individual levels for each. This option lets you control the level of logging output that goes to the system log. ZoneMinder binaries have always logged to the system log but now scripts and web logging is also included. To preserve the previous behaviour you should ensure this value is set to Info or Warning. This option controls the maximum level of logging that will be written, so Info includes Warnings and Errors etc. To disable entirely, set this option to None. You should use caution when setting this option to Debug as it can severely affect system performance. If you want debug you will also need to set a level and component below
|
||||
|
||||
LOG_LEVEL_FILE - ZoneMinder logging is now more integrated between components and allows you to specify the destination for logging output and the individual levels for each. This option lets you control the level of logging output that goes to individual log files written by specific components. This is how logging worked previously and although useful for tracking down issues in specific components it also resulted in many disparate log files. To preserve this behaviour you should ensure this value is set to Info or Warning. This option controls the maximum level of logging that will be written, so Info includes Warnings and Errors etc. To disable entirely, set this option to None. You should use caution when setting this option to Debug as it can severely affect system performance though file output has less impact than the other options. If you want debug you will also need to set a level and component below
|
||||
|
@ -39,4 +69,38 @@ RECORD_EVENT_STATS - This version of ZoneMinder records detailed information abo
|
|||
|
||||
RECORD_DIAG_IMAGES - In addition to recording event statistics you can also record the intermediate diagnostic images that display the results of the various checks and processing that occur when trying to determine if an alarm event has taken place. There are several of these images generated for each frame and zone for each alarm or alert frame so this can have a massive impact on performance. Only switch this setting on for debug or analysis purposes and remember to switch it off again once no longer required.
|
||||
|
||||
DUMP_CORES - When an unrecoverable error occurs in a ZoneMinder binary process is has traditionally been trapped and the details written to logs to aid in remote analysis. However in some cases it is easier to diagnose the error if a core file, which is a memory dump of the process at the time of the error, is created. This can be interactively analysed in the debugger and may reveal more or better information than that available from the logs. This option is recommended for advanced users only otherwise leave at the default. Note using this option to trigger core files will mean that there will be no indication in the binary logs that a process has died, they will just stop, however the zmdc log will still contain an entry. Also note that you may have to explicitly enable core file creation on your system via the 'ulimit -c' command or other means otherwise no file will be created regardless of the value of this option.
|
||||
RECORD_DIAG_IMAGES_FIFO - Adds fifo options for diagnostic images for much lower impact diagnostics mode. Diagnostic images are only written when there is a client (like a web browser) listening for them. If there is no active client connected, FIFO images are skipped. Note that this feature also needs RECORD_DIAG_IMAGES to be on. **Note:** Your monitor needs to be in some recording mode (modect/mocord/etc.)
|
||||
|
||||
In addition to creating diagnostic images, this feature also adds a json stream for the detection data so you can see in real time the pixels or blobs detected for the motion. This allows for easy real time stream of both delta and reference images (as video streams) along with the detection numbers.
|
||||
|
||||
Once you turn on ``RECORD_DIAG_IMAGES`` and the new ``RECORD_DIAG_IMAGES_FIFO`` in the logging options you can then use 3 new remote stream urls:
|
||||
|
||||
* The delta images as an MJPEG stream (great to see where it is seeing the motion!): ``https://portal/zm/cgi-bin/nph-zms?mode=jpeg&bitrate=2&buffer=0&source=fifo&format=delta&monitor=1&maxfps=5&<auth>`` (change monitor, portal to your values. ``<auth>`` could be ``&user=user&pass=pass`` or ``&auth=authval`` or ``&token=access_token``)
|
||||
|
||||
* The reference images as an MJPEG stream: ``https://portal/zm/cgi-bin/nph-zms?mode=jpeg&bitrate=2&buffer=0&source=fifo&format=reference&monitor=1&maxfps=5&<auth>`` (change monitor, portal to your values. ``<auth>`` could be ``&user=user&pass=pass`` or ``&auth=authval`` or ``&token=access_token``)
|
||||
|
||||
* text json raw stream: ``https://portal/zm/cgi-bin/nph-zms?&buffer=0&source=fifo&format=raw&monitor=1&<auth>`` (change monitor, portal to your values, ``<auth>`` could be ``&user=user&pass=pass`` or ``&auth=authval`` or ``&token=access_token``)
|
||||
|
||||
This will output a text stream on the browser like:
|
||||
|
||||
::
|
||||
|
||||
{"zone":5,"type":"ALRM","pixels":778661,"avg_diff":50}
|
||||
{"zone":5,"type":"FILT","pixels":762704}
|
||||
{"zone":5,"type":"RBLB","pixels":728102,"blobs":5}
|
||||
{"zone":5,"type":"FBLB","pixels":728021,"blobs":2}
|
||||
{"zone":6,"type":"ALRM","pixels":130844,"avg_diff":44}
|
||||
{"zone":6,"type":"FILT","pixels":128608}
|
||||
|
||||
|
||||
There are four types of events right now: Alarm (ALRM), Filter (FILT), Raw Blob (RBLB) and Filtered Blobs (FBLB) that correspond to those stages of analysis. It will show the number of pixels detected (along with average pixel difference against the threshold) and number of blobs at each stage.
|
||||
|
||||
For example, here is a delta image stream from one of my monitors showing in live mode:
|
||||
|
||||
``https://myserver/cgi-bin/nph-zms?mode=jpeg&bitrate=2&buffer=0&source=fifo&format=delta&monitor=8&maxfps=5&user=admin&pass=mypass``
|
||||
|
||||
.. image:: images/Options_FIFO.gif
|
||||
|
||||
|
||||
|
||||
DUMP_CORES - When an unrecoverable error occurs in a ZoneMinder binary process is has traditionally been trapped and the details written to logs to aid in remote analysis. However in some cases it is easier to diagnose the error if a core file, which is a memory dump of the process at the time of the error, is created. This can be interactively analysed in the debugger and may reveal more or better information than that available from the logs. This option is recommended for advanced users only otherwise leave at the default. Note using this option to trigger core files will mean that there will be no indication in the binary logs that a process has died, they will just stop, however the zmdc log will still contain an entry. Also note that you may have to explicitly enable core file creation on your system via the 'ulimit -c' command or other means otherwise no file will be created regardless of the value of this option.
|
|
@ -9,6 +9,8 @@ HTTP_UA - When ZoneMinder communicates with remote cameras it will identify itse
|
|||
|
||||
HTTP_TIMEOUT - When retrieving remote images ZoneMinder will wait for this length of time before deciding that an image is not going to arrive and taking steps to retry. This timeout is in milliseconds (1000 per second) and will apply to each part of an image if it is not sent in one whole chunk.
|
||||
|
||||
MIN_STREAMING_PORT - ZoneMinder supports a concept called multi-port streaming. The core concept is that modern browsers like Chrome limit the number of simultaneous connections allowed from a specific domain (host name+port). In the case of Chrome this value is 6, which means you can't see more than 6 simultaneous streams from your server at one time. However, if the streams originated from different ports (or sub domains), this limitation would not apply. When you enable this option with a value (in this case, ``30000``), the streams from the monitors will originate from ``30000`` plus the monitor ID, effectively overcoming this limitation. **Note that this also needs additional setup your webserver configuration before this can start to work**. Please refer to `this article <https://medium.com/zmninja/multi-port-storage-areas-and-more-d5836a336c93>`__ on how to setup multi port streaming on Apache.
|
||||
|
||||
MIN_RTP_PORT - When ZoneMinder communicates with MPEG4 capable cameras using RTP with the unicast method it must open ports for the camera to connect back to for control and streaming purposes. This setting specifies the minimum port number that ZoneMinder will use. Ordinarily two adjacent ports are used for each camera, one for control packets and one for data packets. This port should be set to an even number, you may also need to open up a hole in your firewall to allow cameras to connect back if you wish to use unicasting.
|
||||
|
||||
MAX_RTP_PORT - When ZoneMinder communicates with MPEG4 capable cameras using RTP with the unicast method it must open ports for the camera to connect back to for control and streaming purposes. This setting specifies the maximum port number that ZoneMinder will use. Ordinarily two adjacent ports are used for each camera, one for control packets and one for data packets. This port should be set to an even number, you may also need to open up a hole in your firewall to allow cameras to connect back if you wish to use unicasting. You should also ensure that you have opened up at least two ports for each monitor that will be connecting to unicasting network cameras.
|
|
@ -1,20 +0,0 @@
|
|||
Options - Paths
|
||||
---------------
|
||||
|
||||
.. image:: images/Options_Paths.png
|
||||
|
||||
ZM_DIR_EVENTS - This is the path to the events directory where all the event images and other miscellaneous files are stored. CAUTION: The directory you specify here cannot be outside the web root. This is a common mistake. Most users should never change this value. If you intend to record events to a second disk or network share, then you should mount the drive or share directly to the ZoneMinder events folder or follow the instructions in the ZoneMinder Wiki titled Using a dedicated Hard Drive.
|
||||
|
||||
USE_DEEP_STORAGE - Traditionally ZoneMinder stores all events for a monitor in one directory for that monitor. This is simple and efficient except when you have very large amounts of events. Some filesystems are unable to store more than 32k files in one directory and even without this limitation, large numbers of files in a directory can slow creation and deletion of files. This option allows you to select an alternate method of storing events by year/month/day/hour/min/second which has the effect of separating events out into more directories, resulting in less per directory, and also making it easier to manually navigate to any events that may have happened at a particular time or date.
|
||||
|
||||
DIR_SOUNDS - ZoneMinder can optionally play a sound file when an alarm is detected. This indicates where to look for this file. CAUTION: The directory you specify here cannot be outside the web root. Most users should never change this value.
|
||||
|
||||
PATH_ZMS - The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.
|
||||
|
||||
PATH_MAP - ZoneMinder has historically used IPC shared memory for shared data between processes. This has it's advantages and limitations. This version of ZoneMinder can use an alternate method, mapped memory, instead with can be enabled with the --enable--mmap directive to configure. This requires less system configuration and is generally more flexible. However it requires each shared data segment to map onto a filesystem file. This option indicates where those mapped files go. You should ensure that this location has sufficient space for these files and for the best performance it should be a tmpfs file system or ramdisk otherwise disk access may render this method slower than the regular shared memory one.
|
||||
|
||||
PATH_SOCKS - ZoneMinder generally uses Unix domain sockets where possible. This reduces the need for port assignments and prevents external applications from possibly compromising the daemons. However each Unix socket requires a .sock file to be created. This option indicates where those socket files go.
|
||||
|
||||
PATH_LOGS - There are various daemons that are used by ZoneMinder to perform various tasks. Most generate helpful log files and this is where they go. They can be deleted if not required for debugging.
|
||||
|
||||
PATH_SWAP - Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.
|
|
@ -1,6 +1,8 @@
|
|||
Options - Servers
|
||||
-----------------
|
||||
|
||||
.. todo:: needs to be refreshed
|
||||
|
||||
.. image:: images/Options_Servers.png
|
||||
|
||||
Servers tab is used for setting up multiple ZoneMinder servers sharing the same database and using a shared file share for all event data. To add a new server use the Add Server button. All that is required is a Name for the Server and Hostname.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
Options - Storage
|
||||
--------------------
|
||||
|
||||
|
||||
.. todo::
|
||||
populate
|
|
@ -1,8 +1,15 @@
|
|||
Options - System
|
||||
----------------
|
||||
This screen allows the admin to configure various core operations of the system.
|
||||
|
||||
A partial screenshot is shown below:
|
||||
|
||||
.. image:: images/Options_System.png
|
||||
|
||||
SKIN_DEFAULT - ZoneMinder allows the use of many different web interfaces. This option allows you to set the default skin used by the website. Users can change their skin later, this merely sets the default.
|
||||
|
||||
CSS_DEFAULT - ZoneMinder allows the use of many different web interfaces, and some skins allow the use of different set of CSS files to control the appearance. This option allows you to set the default set of css files used by the website. Users can change their css later, this merely sets the default.
|
||||
|
||||
LANG_DEFAULT - ZoneMinder allows the web interface to use languages other than English if the appropriate language file has been created and is present. This option allows you to change the default language that is used from the shipped language, British English, to another language.
|
||||
|
||||
OPT_USE_AUTH - ZoneMinder can run in two modes. The simplest is an entirely unauthenticated mode where anyone can access ZoneMinder and perform all tasks. This is most suitable for installations where the web server access is limited in other ways. The other mode enables user accounts with varying sets of permissions. Users must login or authenticate to access ZoneMinder and are limited by their defined permissions. Authenticated mode alone should not be relied up for securing Internet connected ZoneMinder.
|
||||
|
@ -11,13 +18,35 @@ AUTH_TYPE - ZoneMinder can use two methods to authenticate users when running in
|
|||
|
||||
AUTH_RELAY - When ZoneMinder is running in authenticated mode it can pass user details between the web pages and the back end processes. There are two methods for doing this. This first is to use a time limited hashed string which contains no direct username or password details, the second method is to pass the username and passwords around in plaintext. This method is not recommend except where you do not have the md5 libraries available on your system or you have a completely isolated system with no external access. You can also switch off authentication relaying if your system is isolated in other ways.
|
||||
|
||||
AUTH_HASH_SECRET - When ZoneMinder is running in hashed authenticated mode it is necessary to generate hashed strings containing encrypted sensitive information such as usernames and password. Although these string are reasonably secure the addition of a random secret increases security substantially.
|
||||
AUTH_HASH_SECRET - When ZoneMinder is running in hashed authenticated mode it is necessary to generate hashed strings containing encrypted sensitive information such as usernames and password. Although these string are reasonably secure the addition of a random secret increases security substantially. Note that if you are using the new token based APIs, then this field is mandatory with ZM 1.34 and above
|
||||
|
||||
AUTH_HASH_IPS - When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermitent problems with authentication, switching this option off may help.
|
||||
AUTH_HASH_IPS - When ZoneMinder is running in hashed authenticated mode it can optionally include the requesting IP address in the resultant hash. This adds an extra level of security as only requests from that address may use that authentication key. However in some circumstances, such as access over mobile networks, the requesting address can change for each request which will cause most requests to fail. This option allows you to control whether IP addresses are included in the authentication hash on your system. If you experience intermitent problems with authentication, switching this option off may help. It is recommended you keep this off if you use mobile apps like zmNinja over mobile carrier networks - several APNs change the IP very frequently which may result in authentication failure.
|
||||
|
||||
AUTH_HASH_TTL - Time before ZM auth will expire (does not apply to API tokens). The default has traditionally been 2 hours. A new hash will automatically be regenerated at half this value.
|
||||
|
||||
AUTH_HASH_LOGINS - The normal process for logging into ZoneMinder is via the login screen with username and password. In some circumstances it may be desirable to allow access directly to one or more pages, for instance from a third party application. If this option is enabled then adding an 'auth' parameter to any request will include a shortcut login bypassing the login screen, if not already logged in. As authentication hashes are time and, optionally, IP limited, this can allow short-term access to ZoneMinder screens from other web pages etc. In order to use this, the calling application will have to generate the authentication hash itself and ensure it is valid. If you use this option you should ensure that you have modified the ZM_AUTH_HASH_SECRET to something unique to your system.
|
||||
|
||||
OPT_FAST_DELETE - Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.
|
||||
ENABLE_CSRF_MAGIC - CSRF stands for Cross-Site Request Forgery which, under specific circumstances, can allow an attacker to perform any task your ZoneMinder user account has permission to perform. To accomplish this, the attacker must write a very specific web page and get you to navigate to it, while you are logged into the ZoneMinder web console at the same time. Enabling ZM_ENABLE_CSRF_MAGIC will help mitigate these kinds of attacks. If you are using zmNinja and face access issues, you might try turning this off.
|
||||
|
||||
OPT_USE_API - A global setting to enable/disable ZoneMinder APIs. If you are using mobile apps like zmNinja, this needs to be enabled
|
||||
|
||||
.. note:: If you are using zmNinja along with authentication, please make sure ``AUTH_HASH_LOGINS`` is enabled, ``OPT_USE_API`` is elabled, ``AUTH_RELAY`` is set to hashed, ``AUTH_HASH_IPS`` is off and a valid ``AUTH_HASHED_SECRET`` is specified.
|
||||
|
||||
OPT_USE_LEGACY_AUTH - Starting version 1.34.0, ZoneMinder uses a more secure Authentication mechanism using JWT tokens. Older versions used a less secure MD5 based auth hash. It is recommended you turn this off after you are sure you don't need it. If you are using a 3rd party app that relies on the older API auth mechanisms, you will have to update that app if you turn this off. Note that zmNinja 1.3.057 onwards supports the new token system.
|
||||
|
||||
OPT_USE_EVENT_NOTIFICATION - zmeventnotification is a 3rd party event notification server that is used to get notifications for alarms detected by ZoneMinder in real time. zmNinja requires this server for push notifications to mobile phones. This option only enables the server if its already installed. Please visit the `Event Notification Server project site <https://github.com/pliablepixels/zmeventserver>`__ for installation instructions.
|
||||
|
||||
OPT_USE_GOOG_RECAPTCHA - This option allows you to include a google reCaptcha validation at login. This means in addition to providing a valid usernane and password, you will also have to pass the reCaptcha test. Please note that enabling this option results in the zoneminder login page reach out to google servers for captcha validation. Also please note that enabling this option may break 3rd party clients if they rely on web based logins (Note that zmNinja now uses the API based token method and will not be affected if reCAPTCHA is enabled). If you enable this, you also need to specify your site and secret key (please refer to context help in the ZoneMinder system screen)
|
||||
|
||||
SYSTEM_SHUTDOWN - this option decides if it is allowed to shutdown the full system via the ZM UI. The system will need to have sudo installed and the following added to /etc/sudoers:
|
||||
|
||||
::
|
||||
|
||||
www-data ALL=NOPASSWD: /sbin/shutdown
|
||||
|
||||
to perform the shutdown or reboot
|
||||
|
||||
OPT_FAST_DELETE - Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. **NOTE**: It is recommended that you keep this option OFF, unless you are running on an old or low-powered system.
|
||||
|
||||
FILTER_RELOAD_DELAY - ZoneMinder allows you to save filters to the database which allow events that match certain criteria to be emailed, deleted or uploaded to a remote machine etc. The zmfilter daemon loads these and does the actual operation. This option determines how often in seconds the filters are reloaded from the database to get the latest versions or new filters. If you don't change filters very often this value can be set to a large value.
|
||||
|
||||
|
@ -25,21 +54,29 @@ FILTER_EXECUTE_INTERVAL - ZoneMinder allows you to save filters to the database
|
|||
|
||||
MAX_RESTART_DELAY - The zmdc (zm daemon control) process controls when processeses are started or stopped and will attempt to restart any that fail. If a daemon fails frequently then a delay is introduced between each restart attempt. If the daemon stills fails then this delay is increased to prevent extra load being placed on the system by continual restarts. This option controls what this maximum delay is.
|
||||
|
||||
STATUS_UPDATE_INTERVAL - The zmstats daemon performs various db queries related to collecting system statistics that may take a long time in the background. This option decides how often this update is scheduled.
|
||||
|
||||
WATCH_CHECK_INTERVAL - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinitely). This option determines how often the daemons are checked.
|
||||
|
||||
WATCH_MAX_DELAY - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinitely). This option determines the maximum delay to allow since the last captured frame. The daemon will be restarted if it has not captured any images after this period though the actual restart may take slightly longer in conjunction with the check interval value above.
|
||||
|
||||
RUN_AUDIT - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and filesystem may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.
|
||||
RUN_AUDIT - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. It is recommended you keep this **OFF** in most systems.
|
||||
|
||||
AUDIT_CHECK_INTERVAL - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and filesystem may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.
|
||||
|
||||
AUDIT_MIN_AGE - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. Event files or db records that are younger than this setting will not be deleted and a warning will be given
|
||||
|
||||
OPT_CONTROL - ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.
|
||||
|
||||
OPT_TRIGGERS - ZoneMinder can interact with external systems which prompt or cancel alarms. This is done via the zmtrigger.pl script. This option indicates whether you want to use these external triggers. Most people will say no here.
|
||||
|
||||
CHECK_FOR_UPDATES - From ZoneMinder version 1.17.0 onwards new versions are expected to be more frequent. To save checking manually for each new version ZoneMinder can check with the zoneminder.com website to determine the most recent release. These checks are infrequent, about once per week, and no personal or system information is transmitted other than your current version number. If you do not wish these checks to take place or your ZoneMinder system has no internet access you can switch these check off with this configuration variable
|
||||
|
||||
TELEMETRY_DATA - Enable collection of usage information of the local system and send it to the ZoneMinder development team. This data will be used to determine things like who and where our customers are, how big their systems are, the underlying hardware and operating system, etc. This is being done for the sole purpose of creating a better product for our target audience. This script is intended to be completely transparent to the end user, and can be disabled from the web console under Options. For more details on what information we collect, please refer to Zoneminder's privacy statement (available in the contextual help of TELEMETRY_DATA on your installation).
|
||||
|
||||
UPDATE_CHECK_PROXY - If you use a proxy to access the internet then ZoneMinder needs to know so it can access zoneminder.com to check for updates. If you do use a proxy enter the full proxy url here in the form of ``http://<proxy host>:<proxy port>/``
|
||||
|
||||
SHM_KEY - ZoneMinder uses shared memory to speed up communication between modules. To identify the right area to use shared memory keys are used. This option controls what the base key is, each monitor will have it's Id or'ed with this to get the actual key used. You will not normally need to change this value unless it clashes with another instance of ZoneMinder on the same machine. Only the first four hex digits are used, the lower four will be masked out and ignored.
|
||||
|
||||
COOKIE_LIFETIME - This will affect how long a session will be valid for since the last request. Keeping this short helps prevent session hijacking. Keeping it long allows you to stay logged in longer without refreshing the view. We recommend you keep this to the default of ``3600`` if you are not sure.
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
Options - Upload
|
||||
----------------
|
||||
|
||||
A partial screenshot of the upload options is shown below:
|
||||
|
||||
.. image:: images/Options_upload.png
|
||||
|
||||
OPT_UPLOAD - In ZoneMinder you can create event filters that specify whether events that match certain criteria should be uploaded to a remote server for archiving. This option specifies whether this functionality should be available
|
||||
OPT_UPLOAD - In ZoneMinder you can create event filters that specify whether events that match certain criteria should be uploaded to a remote server for archiving. This option specifies whether this functionality should be available.
|
||||
|
||||
UPLOAD_ARCH_FORMAT - Uploaded events may be stored in either .tar or .zip format, this option specifies which. Note that to use this you will need to have the Archive::Tar and/or Archive::Zip perl modules installed.
|
||||
|
||||
|
@ -27,6 +29,8 @@ UPLOAD_REM_DIR - You can use filters to instruct ZoneMinder to upload events to
|
|||
|
||||
UPLOAD_TIMEOUT - You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the maximum inactivity timeout (in seconds) that should be tolerated before ZoneMinder determines that the transfer has failed and closes down the connection.
|
||||
|
||||
UPLOAD_STRICT - You can require SFTP uploads to verify the host key of the remote server for protection against man-in-the-middle attacks. You will need to add the server's key to the known_hosts file. On most systems, this will be ``~/.ssh/known_hosts``, where ``~`` is the home directory of the web server running ZoneMinder.
|
||||
|
||||
UPLOAD_FTP_PASSIVE - You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates that ftp transfers should be done in passive mode. This uses a single connection for all ftp activity and, whilst slower than active transfers, is more robust and likely to work from behind filewalls. This option is ignored for SFTP transfers.
|
||||
|
||||
UPLOAD_DEBUG - You can use filters to instruct ZoneMinder to upload events to a remote server. If you are having (or expecting) troubles with uploading events then setting this to 'yes' permits additional information to be generated by the underlying transfer modules and included in the logs.
|
|
@ -5,6 +5,41 @@ Options - Users
|
|||
|
||||
In this section you will see a list of the current users defined on the system. You can also add or delete users from here. It is recommended you do not delete the admin user unless you have created another fully privileged user to take over the same role. Each user is defined with a name and password (which is hidden) as well as an enabled setting which you can use to temporarily enable or disable users, for example a guest user for limited time access. As well as that there is a language setting that allows you to define user specific languages. Setting a language here that is different than the system language will mean that when that user logs in they will have the web interface presented in their own language rather than the system default, if it is available.
|
||||
|
||||
There are also five values that define the user permissions, these are ‘Stream’, ‘Events’, ‘Control’, ‘Monitors’ and ‘System’ Each can have values of ‘None’, ‘View’ or ‘Edit’ apart from ‘Stream’ which has no ‘Edit’ setting. These values cover access to the following areas; ‘Stream’ defines whether a user is allowed to view the ‘live’ video feeds coming from the cameras. You may wish to allow a user to view historical events only in which case this setting should be ‘none’. The ‘Events’ setting determines whether a user can view and modify or delete any retained historical events. The ‘Control’ setting allows you to indicate whether the user is able to control any Pan/Tilt/Zoom type cameras you may have on your system. The ‘Monitors’ setting specifies whether a user can see the current monitor settings and change them. Finally the ‘System’ setting determines whether a user can view or modify the system settings as a whole, such as options and users or controlling the running of the system as a whole.
|
||||
This screen allows you to configure various permissions on a per user basis. The permissions as of today are defined as follows:
|
||||
|
||||
As well as these settings there is also a ‘Bandwidth’ setting which can be used to limit the maximum bandwidth that a user can view at and a ‘Monitor Ids’ setting that can be used for non-’System’ users to restrict them to only being able to access streams, events or monitors for the given monitors ids as a comma separated list with no spaces. If a user with ‘Monitors’ edit privileges is limited to specific monitors here they will not be able to add or delete monitors but only change the details of those they have access to. If a user has ‘System’ privileges then the ‘Monitors Ids’ setting is ignored and has no effect.’
|
||||
- Streams
|
||||
- None: the user has no access to view live streams from the defined monitors
|
||||
- View: the user has access to only view live streams from the defined monitors
|
||||
- Edit: the user has access to edit live streams from the defined monitors
|
||||
|
||||
- Events
|
||||
- These permissions relate to the ability to view events from the defined monitors. The permission levels are the same as the Streams permissions, except that they apply to recorded events
|
||||
|
||||
- Control
|
||||
- These permissions relate to the ability to control Pan/Tilt/Zoom (PTZ) of the defined monitors. The permission levels are the same as the Streams permissions, except that they apply to PTZ
|
||||
|
||||
- Monitors
|
||||
- specifies whether a user can see the current monitor settings and change them. The permissions levels are the same as the Streams permissions, except that they apply to monitor settings
|
||||
|
||||
- Groups
|
||||
- specifies whether a user can see monitor groups and change them. The permissions levels are the same as the Streams permissions, except that they apply to groups
|
||||
|
||||
- System
|
||||
- Determines whether a user can view or modify the system settings as a whole, such as options and users or controlling the running of the system as a whole. The permissions levels are the same as the Streams permissions, except that they apply to groups.
|
||||
|
||||
.. note:: if you are using zmNinja, users are required to have 'View' access to system because multi-server information is only available as part of this permission
|
||||
|
||||
- Bandwidth
|
||||
- Specifies the maximum bandwith that this user can configure (Low, Medium or High)
|
||||
|
||||
- API enabled
|
||||
- Specifies if the ZoneMinder API is enabled for this user (needs to be on, if you are using a mobile app such as zmNinja)
|
||||
|
||||
Finally, you can specify a list of monitors this user is allowed to access using the 'Restriced Monitors' list. You can select multiple monitors by shift+click(or command+click) on multiple monitors. If a user with ‘Monitors’ edit privileges is limited to specific monitors here they will not be able to add or delete monitors but only change the details of those they have access to. If a user has ‘System’ privileges then the ‘Monitors Ids’ setting is ignored and has no effect.
|
||||
|
||||
|
||||
Here is an example of a restricted user, for example:
|
||||
|
||||
.. image:: images/Options_Users_Example.png
|
||||
|
||||
This user "home" is enabled, can view live streams and events, but only from "DoorBell" and "DeckCamera". This user also cannot control PTZ.
|
|
@ -1,11 +1,28 @@
|
|||
Options - Web
|
||||
-------------
|
||||
This screen lets you customize several aspects of the web interface of ZoneMinder. A partial screenshot is shown below:
|
||||
|
||||
.. image:: images/Options_web.png
|
||||
|
||||
|
||||
WEB_TITLE -
|
||||
|
||||
.. todo ::
|
||||
not quite sure what this does. Seems to change the "target" name - not sure what effect it is supposed to have.
|
||||
|
||||
WEB_TITLE_PREFIX - If you have more than one installation of ZoneMinder it can be helpful to display different titles for each one. Changing this option allows you to customise the window titles to include further information to aid identification.
|
||||
|
||||
WEB_RESIZE_CONSOLE - Traditionally the main ZoneMinder web console window has resized itself to shrink to a size small enough to list only the monitors that are actually present. This is intended to make the window more unobtrusize but may not be to everyones tastes, especially if opened in a tab in browsers which support this kind if layout. Switch this option off to have the console window size left to the users preference
|
||||
HOME_URL - the link to navigate to, when a user clicks on the top left title.
|
||||
|
||||
HOME_CONTENT - The actual text that is shown on the top left corner. You can choose to leave it empty and put in a logo in a custom CSS as well.
|
||||
|
||||
WEB_CONSOLE_BANNER - Allows the administrator to place an arbitrary text message near the top of the web console. This is useful for the developers to display a message which indicates the running instance of ZoneMinder is a development snapshot, but it can also be used for any other purpose as well.
|
||||
|
||||
WEB_EVENT_DISK_SPACE - Adds another column to the listing of events showing the disk space used by the event. This will impart a small overhead as it will call du on the event directory. In practice this overhead is fairly small but may be noticeable on IO-constrained systems.
|
||||
|
||||
WEB_RESIZE_CONSOLE - Traditionally the main ZoneMinder web console window has resized itself to shrink to a size small enough to list only the monitors that are actually present. This is intended to make the window more unobtrusize but may not be to everyones tastes, especially if opened in a tab in browsers which support this kind if layout. Switch this option off to have the console window size left to the users preference.
|
||||
|
||||
WEB_ID_ON_CONSOLE - Some find it useful to have the monitor id always visible on the console. This option will add a column listing it. Note that if it is disabled, you can always hover over the monitor to see the id as well.
|
||||
|
||||
WEB_POPUP_ON_ALARM - When viewing a live monitor stream you can specify whether you want the window to pop to the front if an alarm occurs when the window is minimised or behind another window. This is most useful if your monitors are over doors for example when they can pop up if someone comes to the doorway.
|
||||
|
||||
|
@ -27,4 +44,8 @@ WEB_LIST_THUMB_WIDTH - This options controls the width of the thumbnail images t
|
|||
|
||||
WEB_LIST_THUMB_HEIGHT - This options controls the height of the thumbnail images that appear in the event lists. It should be fairly small to fit in with the rest of the table. If you prefer you can specify a width instead in the previous option but you should only use one of the width or height and the other option should be set to zero. If both width and height are specified then width will be used and height ignored.
|
||||
|
||||
WEB_USE_OBJECT_TAGS - There are two methods of including media content in web pages. The most common way is use the EMBED tag which is able to give some indication of the type of content. However this is not a standard part of HTML. The official method is to use OBJECT tags which are able to give more information allowing the correct media viewers etc to be loaded. However these are less widely supported and content may be specifically tailored to a particular platform or player. This option controls whether media content is enclosed in EMBED tags only or whether, where appropriate, it is additionally wrapped in OBJECT tags. Currently OBJECT tags are only used in a limited number of circumstances but they may become more widespread in the future. It is suggested that you leave this option on unless you encounter problems playing some content.
|
||||
WEB_USE_OBJECT_TAGS - There are two methods of including media content in web pages. The most common way is use the EMBED tag which is able to give some indication of the type of content. However this is not a standard part of HTML. The official method is to use OBJECT tags which are able to give more information allowing the correct media viewers etc to be loaded. However these are less widely supported and content may be specifically tailored to a particular platform or player. This option controls whether media content is enclosed in EMBED tags only or whether, where appropriate, it is additionally wrapped in OBJECT tags. Currently OBJECT tags are only used in a limited number of circumstances but they may become more widespread in the future. It is suggested that you leave this option on unless you encounter problems playing some content.
|
||||
|
||||
WEB_XFRAME_WARN - When creating a Web Site monitor, if the target web site has X-Frame-Options set to sameorigin in the header, the site will not display in ZoneMinder. This is a design feature in most modern browsers. When this condition occurs, ZoneMinder will write a warning to the log file. To get around this, one can install a browser plugin or extension to ignore X-Frame headers, and then the page will display properly. Once the plugin or extension has ben installed, the end user may choose to turn this warning off
|
||||
|
||||
WEB_FILTER_SOURCE - This option only affects monitors with a source type of Ffmpeg, Libvlc, or WebSite. This setting controls what information is displayed in the Source column on the console. Selecting 'None' will not filter anything. The entire source string will be displayed, which may contain sensitive information. Selecting 'NoCredentials' will strip out usernames and passwords from the string. If there are any port numbers in the string and they are common (80, 554, etc) then those will be removed as well. Selecting 'Hostname' will filter out all information except for the hostname or ip address. When in doubt, stay with the default 'Hostname'. This feature uses the php function 'url_parts' to identify the various pieces of the url. If the url in question is unusual or not standard in some way, then filtering may not produce the desired results.
|
|
@ -17,20 +17,4 @@ Here is an example of viewing an event stream:
|
|||
.. image:: images/viewevents-stream.png
|
||||
:width: 650px
|
||||
|
||||
* **A**: Administrative Event options on the event including viewing individual frames
|
||||
* **B**: The actual image stream
|
||||
* **C**: Navigation control
|
||||
* **D**: You can switch between watching a single event or Continuous mode (where it advances to the next event after playback is complete)
|
||||
* **E**: Event progress bar - how much of the current event has been played back
|
||||
|
||||
You will notice for the first time that alarm images now contain an overlay outlining the blobs that represent the alarmed area. This outline is in the colour defined for that zone and lets you see what it was that caused the alarm. Clicking on one of the thumbnails will take you to a full size window where you can see the image in all its detail and scroll through the various images that make up the event. If you have the ZM_RECORD_EVENT_STATS option on, you will be able to click the 'Stats' link here and get some analysis of the cause of the event.
|
||||
|
||||
More details on the Administrative Event options (A)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Should you determine that you don't wish to keep the event, clicking on Delete will erase it from the database and file system. Returning to the event window, other options here are renaming the event to something more meaningful, refreshing the window to replay the event stream, deleting the event, switching between streamed and still versions of the event (if supported) and generating an MPEG video of the event (if supported).
|
||||
|
||||
These last two options require further explanation. Archiving an event means that it is kept to one side and not displayed in the normal event listings unless you specifically ask to view the archived events. This is useful for keeping events that you think may be important or just wish to protect. Once an event is archived it can be deleted or unarchived but you cannot accidentally delete it when viewing normal unarchived events.
|
||||
|
||||
The final option of generating an MPEG video is still somewhat experimental and its usefulness may vary. It uses the open source ffmpeg encoder to generate short videos, which will be downloaded to your browsing machine or viewed in place. When using the ffmpeg encoder, ZoneMinder will attempt to match the duration of the video with the duration of the event. Ffmpeg has a particularly rich set of options and you can specify during configuration which additional options you may wish to include to suit your preferences. In particular you may need to specify additional, or different, options if you are creating videos of events with particularly slow frame rates as some codecs only support certain ranges of frame rates. A common value for FFMPEG_OUTPUT_OPTIONS under Options > Images might be ``'-r 25 -b 800k'`` for 25 fps and 800 kbps. Details of these options can be found in the `documentation <https://ffmpeg.org/ffmpeg.html>`__ for the encoders and is outside the scope of this document.
|
||||
|
||||
Building an MPEG video, especially for a large event, can take some time and should not be undertaken lightly as the effect on your host box of many CPU intensive encoders will not be good. However once a video has been created for an event it will be kept so subsequent viewing will not incur the generation overhead. Videos can also be included in notification emails, however care should be taken when using this option as for many frequent events the penalty in CPU and disk space can quickly mount up.
|
||||
The image above shows a typical window for an event that was recorded as an MP4 video
|
||||
|
|