Configure Video Recorder

The FindFace Core internal 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 console installer or step-by-step instructions.

In this section:

Enable Video Recorder

To enable Video Recorder, do the following:

  1. 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 HTTP API. It’s also obligatory if you want to harness Video Recorder as part of the FindFace Multi web interface.

    Do the following:

    1. 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.

      sudo vi /etc/findface-video-worker-cpu.ini
      sudo vi /etc/findface-video-worker-gpu.ini
      
    2. Set enabled = true in the recorder section.

      #------------------------------
      [recorder]
      #------------------------------
      ## video recording enabled
      ## type:bool env:CFG_RECORDER_ENABLED longopt:--recorder-enabled
      enabled = true
      
    3. Restart each findface-video-worker instance involved.

      sudo systemctl restart findface-video-worker*
      
  2. 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:

    1. Open the /etc/findface-security/config.py configuration file.

      sudo vi /etc/findface-security/config.py
      
    2. Find the FFSECURITY_UI_CONFIG -> vms section.

      The list of parameters to configure is the following:

      Parameter

      Description

      "enabled"

      Set True to add the Enable recording checkbox to camera settings.

      "video_player"

      Set True to enable the video player to open in event notifications and camera preview (instead of static frames). This setting requires "enabled": True.

      "timeline" -> "min_zoom"

      Defines the largest possible scale on the video player timeline, seconds per pixel.

      "timeline" -> "max_zoom"

      Defines the smallest possible scale on the timeline, seconds per pixel.

      "timeline" -> "objects" -> "faces" -> "enabled"

      Set True to enable marking face events on the timeline.

      "timeline" -> "objects" -> "faces" -> "limit"

      The maximum number of face events simultaneously marked on the timeline. If there is more face events than that, you will be asked to zoom in.

      "timeline" -> "objects" -> "cars" -> "enabled"

      Set True to enable marking car events on the timeline.

      "timeline" -> "objects" -> "cars" -> "limit"

      The maximum number of car events simultaneously marked on the timeline. If there is more car events than that, you will be asked to zoom in.

      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,
                          },
                      },
                  },
              },
          },
      }
      
    3. 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.

      # VMS video chunks will be deleted older than VMS_VIDEOS_MAX_AGE
      'VMS_VIDEOS_MAX_AGE': 7,
      
    4. Restart the findface-security service.

      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.

sudo findface-security cleanup_vms --vms-videos-max-age=30