.. _configure-vms: Configure Video Recorder ====================================================== The FindFace Core internal :ref:`architecture ` allows for embedding Video Recorder, an additional functionality that records, stores, and plays back video data from cameras. This section is about the Video Recorder configuration. .. note:: If you haven't deployed it yet, do so by using the FindFace Multi :ref:`console installer ` or :ref:`step-by-step instructions `. .. rubric:: In this section: .. contents:: :local: Enable Video Recorder ------------------------------ To enable Video Recorder, do the following: #. Enable the ``findface-video-worker`` service to transfer video chunks to the ``findface-video-storage`` service. .. important:: This setting makes the Video Recorder functionality available over :ref:`HTTP API `. It's also obligatory if you want to harness Video Recorder as part of the FindFace Multi :ref:`web interface `. Do the following: #. Open the ``/etc/findface-video-worker-cpu.ini`` (``/etc/findface-video-worker-gpu.ini``) configuration file for each ``findface-video-worker`` instance that will supply Video Recorder with video. .. code:: sudo vi /etc/findface-video-worker-cpu.ini sudo vi /etc/findface-video-worker-gpu.ini #. Set ``enabled = true`` in the ``recorder`` section. .. code:: #------------------------------ [recorder] #------------------------------ ## video recording enabled ## type:bool env:CFG_RECORDER_ENABLED longopt:--recorder-enabled enabled = true #. Restart each ``findface-video-worker`` instance involved. .. code:: sudo systemctl restart findface-video-worker* #. Configure Video Recorder to work as part of the FindFace Multi web interface. .. note:: Omit the following steps if you do not need the Video Recorder tools to appear in the FindFace Multi web interface. Do the following: #. Open the ``/etc/findface-security/config.py`` configuration file. .. code:: sudo vi /etc/findface-security/config.py #. Find the ``FFSECURITY_UI_CONFIG`` -> ``vms`` section. The list of parameters to configure is the following: +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | Parameter | Description | +================================================+====================================================================================================================+ | ``"enabled"`` | Set ``True`` to add the :guilabel:`Enable recording` checkbox to :ref:`camera settings `. | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | ``"video_player"`` | Set ``True`` to enable the video player to open in :ref:`event notifications ` and | | | :ref:`camera preview ` (instead of static frames). This setting requires ``"enabled": True``. | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | ``"timeline"`` -> ``"min_zoom"`` | Defines the largest possible scale on the :ref:`video player timeline `, seconds per pixel. | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | ``"timeline"`` -> ``"max_zoom"`` | Defines the smallest possible scale on the timeline, seconds per pixel. | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | ``"timeline"`` -> ``"objects"`` -> | Set ``True`` to enable marking face events on the timeline. | | ``"faces"`` -> ``"enabled"`` | | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | ``"timeline"`` -> ``"objects"`` -> | The maximum number of face events simultaneously marked on the timeline. If there is more face events than | | ``"faces"`` -> ``"limit"`` | that, you will be asked to zoom in. | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | ``"timeline"`` -> ``"objects"`` -> | Set ``True`` to enable marking car events on the timeline. | | ``"cars"`` -> ``"enabled"`` | | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | ``"timeline"`` -> ``"objects"`` -> | The maximum number of car events simultaneously marked on the timeline. | | ``"cars"`` -> ``"limit"`` | If there is more car events than that, you will be asked to zoom in. | +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ .. code:: FFSECURITY_UI_CONFIG = { "vms": { "enabled": True, "video_player": True, "timeline": { "min_zoom": 0.2, "max_zoom": 200, "objects": { "events": { "faces": { "enabled": True, "limit": 500, }, "cars": { "enabled": False, "limit": 500, }, }, }, }, }, } #. Set the maximum storage time for the recorded video chunks in the ``VMS_VIDEOS_MAX_AGE`` parameter. Video chunks older than the given number of days will be automatically deleted. .. tip:: To roughly estimate the required storage time, consider that a ``1920×1080`` camera produces around 60 GB of video per day. We recommend that you measure the exact video volume from your cameras and calculate the required storage time, based on the video volume and the available disk space. .. tip:: If you are going to keep the video chunks for a long time, be sure to monitor the remaining free space using Zabbix, Prometheus, or a similar software. It will prevent the video from occupying the entire space and thus having blocked up the server operation. .. code:: # VMS video chunks will be deleted older than VMS_VIDEOS_MAX_AGE 'VMS_VIDEOS_MAX_AGE': 7, #. Restart the ``findface-security`` service. .. code:: sudo systemctl restart findface-security.service Nuances of Disabling Video Recorder ---------------------------------------- If Video Recorder is running and recording video on selected cameras, and you need to disable it, be sure to disable video recording on the cameras first, before proceeding with the ``/etc/findface-security/config.py`` and ``/etc/findface-video-worker-*.ini`` configuration files. Remove Video Manually ------------------------ You can manually remove video chunks older than the given number of days by executing the command below. To set the number of days, use the ``--vms-videos-max-age`` argument. .. code:: sudo findface-security cleanup_vms --vms-videos-max-age=30 .. seealso:: * :ref:`deploy-vms` * :ref:`Enable Video Recording from Camera ` * :ref:`vms-event` * :ref:`backup-restore` * :ref:`mongodb-backup-recover`