16 releases (4 breaking)
0.5.2 | Feb 17, 2024 |
---|---|
0.5.1 | Feb 17, 2024 |
0.4.11 | Aug 3, 2023 |
0.4.10 | Jul 30, 2023 |
0.1.0 | Jul 10, 2023 |
#42 in Video
119 downloads per month
27KB
218 lines
Unifi-Protect footage bulk download tool
This CLI-tool allows you to download all footage from your Unifi-Protect NVR. It is written in Rust and uses the unifi-protect crate to communicate with the Unifi-Protect API.
Installation
- Install rust & cargo if not installed: https://rust-lang.org/tools/install
- Install this CLI-tool:
cargo install unifi-protect-bulk-download
Usage
unifi_protect_bulk_download download <uri> <username> <password> <path> <mode> <recording_type> <start_date> <end_date>
Arguments:
- <uri> The uri of the unifi protect server
- <username> The username for logging into the unifi protect server
- <password> The password for logging into the unifi protect server
- <path> The path to the directory to download the files to
- <mode> The mode to download the files in (daily or hourly) [possible values: daily, hourly]
- <recording_type> The type of recording to download (rotating or timelapse) [possible values: rotating, timelapse]
- <start_date> The start date to download the files from (YYYY-MM-DD)
- <end_date> The end date to download the files from (YYYY-MM-DD)
Example
For example, to download all footage from your Unifi-Protect NVR, for all cameras, for the months of June and July 2023, run the following command:
download https://<Unifi-Protect-IP-Addr> <username> <password> /path/to/destination/folder daily rotating 2023-06-01 2023-07-31
In the above example, replace:
- <Unifi-Protect-IP-Addr> with the IP-Address of your unifi-protect system
- <username> with the username of your unifi-protect account
- <password> with the password of your unifi-protect account
- /path/to/destination/folder with the path to the folder where you want to download the footage to
- daily with hourly in case you want one video per camera per hour, rather than per day of footage
- rotating with timelapse in case you want to download timelapse footage rather than real time recordings
- 2023-06-01 with the start date of the footage you want to download
- 2023-07-31 with the end date of the footage you want to download
GPL3 LICENSE SYNOPSIS
TL;DR* Here's what the license entails:
- Anyone can copy, modify and distribute this software.
- You have to include the license and copyright notice with each and every distribution.
- You can use this software privately.
- You can use this software for commercial purposes.
- If you dare build your business solely from this code, you risk open-sourcing the whole code base.
- If you modify it, you have to indicate changes made to the code.
- Any modifications of this code base MUST be distributed with the same license, GPLv3.
- This software is provided without warranty.
- The software author or license can not be held liable for any damages inflicted by the software. More information on about the LICENSE can be found here
Dependencies
~11–24MB
~353K SLoC