.. _offline-video: **************************************** Object Identification in Offline Videos **************************************** Besides real-time object identification, FindFace Multi allows for offline video processing. This functionality has a wide range of possible applications, among which the most common case is object detection and recognition in archived videos. .. rubric:: In this chapter: .. contents:: :local: Configure Offline Video Processing ======================================= By default, video files are processed in a queued mode to prevent event drops due to resource overconsumption. You can modify the default number of simultaneously processed video files. To do so, open the ``/etc/findface-security/config.py`` configuration file and change the ``MAX_VIDEO_ARCHIVE_JOBS`` parameter. Please contact our experts prior (support@ntechlab.com) to make sure your resources are enough. .. code:: sudo vi /etc/findface-security/config.py ... FFSECURITY = { ... # maximum concurrent video manager jobs for video archives processing 'MAX_VIDEO_ARCHIVE_JOBS': 3, ... } ... Process Video File ===================== .. important:: Before the video processing, the following prep work is required: #. Designate a camera group to which the system will attribute the object recognition events from the video. The ``Video archive default camera group`` is perfect for this task. You can also create a new camera group with basic settings specifically for this video file. #. Assign the designated camera group to all :ref:`watch lists ` you want to monitor when processing the video. |video_list_en| .. |video_list_en| image:: /_static/video_list_en.png :scale: 60% .. |video_list_ru| image:: /_static/video_list_ru.png :scale: 60% To identify objects in an offline video, do the following: #. Create a video in FindFace Multi by uploading it from a file or online storage/cloud. To do so, navigate to the :guilabel:`Videos` tab. #. Click :guilabel:`+`. |create_video_en| .. |create_video_en| image:: /_static/create_video_en.png :scale: 60% .. |create_video_ru| image:: /_static/create_video_ru.png :scale: 60% #. Specify the video name. |video_upload_en| .. |video_upload_en| image:: /_static/video_upload_en.png :scale: 60% .. |video_upload_ru| image:: /_static/video_upload_ru.png :scale: 60% #. Specify a URL in online storage, or select a file. #. Click :guilabel:`Upload`. #. After the video is uploaded, navigate to the :guilabel:`Parameters` tab. Specify parameters of video processing: |video_parameters_en| .. |video_parameters_en| image:: /_static/video_parameters_en.png :scale: 60% .. |video_parameters_ru| image:: /_static/video_parameters_ru.png :scale: 60% * Indicate the camera group you have designated prior. (Optional) Select a camera within that camera group to tag the object recognition events from this video more precisely. * Configure the timestamps for object recognition events. #. On the :guilabel:`Advanced` tab, fine-tune the video processing: |video_advanced_en| .. |video_advanced_en| image:: /_static/video_advanced_en.png :scale: 60% .. |video_advanced_ru| image:: /_static/video_advanced_ru.png :scale: 60% * Check detectors that you want to enable for this video: faces, bodies, cars & ALPR. * If needed, change the video orientation. * :guilabel:`Timeout in ms`: Specify the timeout in milliseconds for posting detected objects. * :guilabel:`FFMPEG format`: Pass FFMPEG format (mxg, flv, etc.) if it cannot be detected automatically. * :guilabel:`FFMPEG parameters`: FFMPEG options for the video in the key-value format, for example, [“rtsp_transpotr=tcp”, “ss=00:20:00”]. * :guilabel:`Play speed limit`: If less than zero, the speed is not limited. In other cases, the stream is read with the given ``play_speed``. * :guilabel:`Imotion threshold`: Minimum motion intensity to be detected by the motion detector. * :guilabel:`Verify SSL`: Check to enable verification of the server SSL certificate when the object tracker posts objects to the server over https. Uncheck the option if you use a self-signed certificate. #. On the :guilabel:`Analytics` tab, specify settings for each object type detector. |video_analytics_en| .. |video_analytics_en| image:: /_static/video_analytics_en.png :scale: 60% .. |video_analytics_ru| image:: /_static/video_analytics_ru.png :scale: 60% * :guilabel:`Minimum object snapshot quality`: Minimum quality of an object snapshot to post. Do not change the default value without consulting with our technical experts (support@ntechlab.com). * :guilabel:`Minimum object size`: Minimum object size in pixels to post. * :guilabel:`Maximum object size`: Maximum object size in pixels to post. * :guilabel:`Compression quality`: Full frame compression quality. * :guilabel:`Offline mode`: Offline mode. Enable posting one snapshot of the best quality per entire track for each object in addition to the sequence of snapshots taken per track in the real-time mode (enabled by default). * :guilabel:`Time interval`: Time interval in seconds (integer or decimal) within which the object tracker picks up the best snapshot in the real-time mode. * :guilabel:`Post first object immediately`: Check to post the first object from a track immediately after it passes through the quality, size, and ROI filters, without waiting for the first ``Time interval`` to complete. The way the subsequent snapshots are posted will depend on the ``Post best snapshot`` value. Uncheck the option only to post the first object after the first ``Time interval`` completes. * :guilabel:`Post best snapshot`: Check to post the best snapshot obtained within each ``Time interval`` in the real-time mode, regardless of its quality. Uncheck the option to post the best snapshot only if its quality has improved compared to the previously posted snapshot. #. (Optional) On the :guilabel:`Region of Tracking` and :guilabel:`Regions of Interest` tabs, specify the region of tracking within the camera field and detection zones for each object type detector. #. Navigate to the :guilabel:`Processing` tab. Click :guilabel:`Process` to start object identification. |video_process_en| .. |video_process_en| image:: /_static/video_process_en.png :scale: 60% .. |video_process_ru| image:: /_static/video_process_ru.png :scale: 60% You can view object identification events right here, as well as on the :guilabel:`Events` and :guilabel:`Episodes` tabs by filtering the list of events by the camera group/camera associated with the video.