Overview
This article describes eight possible reasons why a UniFi Video camera could stop recording. Please thoroughly check the configuration each section discusses before continuing to the next one.
Table of Contents
- Camera Recording Mode not Configured
- Inadequate Motion Sensitivity Settings
- Incorrect Recording Path
- Recording Path has Incorrect Permissions (Linux-Based NVRs)
- External Storage Device is Not Mounted
- System is in Emergency Shutdown State
- RAMDisk is Not Configured Correctly (Windows NVR)
- Database is Inconsistent or Corrupt
- Related Articles
Camera Recording Mode not Configured
In UniFi Video, cameras must first be configured to either Always Record or Record Only Motion mode before recordings will be generated. You can view the recording mode in the Camera page of UniFi Video.
To change the recording mode:
- Log in to the UniFi Video Controller and go to the Cameras section.
- Open a camera's Properties pane by clicking on the camera.
- Click on the Recording tab.
- Under the Configuration section, in the Record Mode dropdown, choose either Always Record or Record Only Motion, then click Save.
If Schedules are in use, verify the Schedule configuration is appropriate. You may also need to verify that the time zone is set correctly under Settings > Time & Date, and that the NVR has sufficient internet access to be able to update its time via NTP.
Inadequate Motion Sensitivity Settings
If Record Only Motion is selected, make sure that the Motion Sensitivity settings are configured in a manner adequate for the scene that is being monitored. To configure Motion Sensitivity:
- Log in to the UniFi Video Controller and go to the Cameras section.
- Open a camera's Properties pane by clicking on the camera.
- Click on the Recording tab.
- Under the Motion Detection section (click to expand), click the Configure button in the Zones section.
- In the Window that appears, verify that the motion detection zone covers the area you wish to monitor, and increase Sensitivity as needed until motion events are triggered reliably.
Remember to use the Test Zone functionality to test your settings, then click the Save button to store the changes.
Incorrect Recording Path
If the recording path is not set to a valid directory, UniFi Video will fail to store recordings. While the interface will validate that the path is correct during configuration, it is possible that the path may be incorrect after a configuration is restored from backup, or the filesystem has been changed at the OS level.
Verify that the recording path is correct under Settings > System Configuration > Recording Path.
For reference, the default recording paths are:
- Windows Custom Installs: C:\ProgramData\unifi-video\data\videos
- Linux Custom Installs: /usr/lib/unifi-video/data/videos
- UVC-NVR / UVC-NVR-2TB: /srv/unifi-video/videos
Recording Path has Incorrect Permissions (Linux-Based NVRs)
On Linux-based NVRs, the unifi-video user and group must be correctly assigned to the target recording directory so that UniFi Video can store recordings. The user and group can be unexpectedly changed while mounting an external device, browsing the structure using software, or making configuration changes.
To correct the permissions, SSH into the NVR and issue the following commands to re-assign all permissions correctly. Be sure to change the path as necessary to reflect your environment. The chown
command may take a significant amount of time depending on the number of recordings in storage.
sudo service unifi-video stop
sudo chown -R unifi-video:unifi-video /srv/unifi-video/videos
sudo service unifi-video start
In certain cases—particularly when using network attached storage, the permissions or ownership of the root directory of the mounted storage may change. To avoid this, create a subfolder to use as a recording target and assign the appropriate permissions.
External Storage Device is Not Mounted
If external storage is used as the recording target, such as an external hard drive connected via USB or a NAS appliance, it is possible that the device has unexpectedly become unmounted. In some cases, the storage may not successfully mount after the NVR is rebooted, or the device may become unavailable during operation due to a disconnect, network issue, or configuration change.
Access the storage path on the NVR via SSH or Windows Explorer as applicable, and verify that the expected storage size is available and the storage is correctly mounted with appropriate permissions. In certain scenarios it is possible that UniFi Video may be writing to the local mount path while the storage device is unmounted, effectively consuming storage on the root or C:\ drive and interfering with the mount process.
System is in Emergency Shutdown State
If the available free space in the target recording directory is less than the Space to Keep Free setting, UniFi Video will enter Emergency Shutdown mode to maintain stability. In this mode, no new recordings will be stored to disk. Emergency Shutdown mode will be indicated as a log entry in server.log. To troubleshoot this issue:
- Verify the video storage paths, as detailed above.
- Verify that the Space to Keep Free storage retention settings are configured appropriately considering the size and configuration of your storage. Go to Settings > click the System Configuration button > Configure tab > Space to Keep Free and modify the slider accordingly. The UVC-NVR / UVC-NVR-2TB use a default setting of 10GB and 40GB respectfully.
- Perform a Database Analysis, with Restore Recordings enabled. This feature can be accessed from Settings > System Configuration > Tools. Be sure to check Restore Recordings, then click Analyze. This is particularly important after restoring a configuration backup in order to import old recordings so they can be added to the purge rotation to free space.
If the Emergency Shutdown state persists, review the server.log and purge.log file for further entries that may describe the cause.
RAMDisk is Not Configured Correctly (Windows NVR)
If UniFi Video is unable to store inbound video segments to the temporary cache, recordings will not be processed. Verify that the RAMDisk has been correctly configured, is mounted with sufficient space (minimum 3GB), and that the path has been properly set in system.properties.
For more detailed information on the use of a Windows RAMDisk, see: UniFi Video - Using a RAMDisk as a UniFi Video Temporary Directory in Windows
Database is Inconsistent or Corrupt
In certain scenarios, a database that has inconsistent data may impede the NVR's ability to process recordings. If all prior options have been exhausted, a database reset will restore the data and structure without losing vital configuration or prior recordings.
For specific instructions, please review the article appropriate to your NVR operating system:
UniFi Video - How to Reset a UniFi Video Installation for Linux/Hardware NVR
UniFi Video - How to Reset a UniFi Video Installation for Windows
Related Articles
UniFi Video - Using a RAMDisk as a UniFi Video Temporary Directory in Windows
UniFi Video - How to Reset a UniFi Video Installation for Linux/Hardware NVR
UniFi Video - How to Reset a UniFi Video Installation for Windows