mirror of
https://github.com/MrUnknownDE/tplink-nvr-export.git
synced 2026-04-05 16:22:03 +02:00
main
TP-Link Vigi NVR Export
A CLI tool to export video recordings from TP-Link Vigi NVRs over a specified time period.
⚠️ Note: This tool is in early development. API endpoints may need adjustment based on your specific NVR model and firmware version.
Features
- 📹 Export recordings by time range
- 📅 Filter by date/time with flexible formats
- 🎯 Filter by recording type (continuous, motion, alarm)
- 📊 Progress bar during downloads
- 🔒 Secure authentication via OpenAPI
- 🖥️ Windows GUI - No command line needed!
Requirements
- Python 3.10+
- TP-Link Vigi NVR with OpenAPI enabled
- Network access to NVR on port 20443 (default)
Installation
Option 1: Download Windows GUI (Recommended)
- Go to Releases
- Download
nvr-export-gui-windows.exe - Double-click to run - no installation needed!
Option 2: Download Windows CLI
- Go to Releases
- Download
nvr-export-cli-windows.exe - Run from Command Prompt or PowerShell
.\nvr-export-cli-windows.exe export -h 192.168.1.100 -u admin -c 1 -s "2024-12-28" -e "2024-12-29" -o ./exports
Option 3: Install with pip (Requires Python)
# Clone the repository
git clone https://github.com/mrunknownde/tplink-nvr-export.git
cd tplink-nvr-export
# Install with pip
pip install -e .
# Or with pipx for isolated environment
pipx install .
Option 4: Build Windows Executable Locally
# Install dependencies
pip install -e ".[dev]"
# Build CLI executable
pyinstaller --onefile --name nvr-export --console src/tplink_nvr_export/cli.py
# Build GUI executable
pyinstaller --onefile --name nvr-export-gui --windowed src/tplink_nvr_export/gui.py
# Executables will be in dist/
NVR Setup
Before using this tool, enable OpenAPI on your NVR:
- Open NVR web interface (https://your-nvr-ip)
- Navigate to Settings > Network > OpenAPI
- Enable OpenAPI
- Note the port (default: 20443)
Usage
Export recordings
# Export recordings from channel 1 for a specific day
nvr-export export \
--host 192.168.1.100 \
--user admin \
--channel 1 \
--start "2024-12-28 00:00" \
--end "2024-12-28 23:59" \
--output ./exports
# Export only motion recordings
nvr-export export \
--host 192.168.1.100 \
--user admin \
--channel 2 \
--start "2024-12-01" \
--end "2024-12-31" \
--type motion \
--output ./exports
List channels
nvr-export channels --host 192.168.1.100 --user admin
Search recordings (without downloading)
nvr-export search \
--host 192.168.1.100 \
--user admin \
--channel 1 \
--start "2024-12-28" \
--end "2024-12-29"
Supported Time Formats
YYYY-MM-DD HH:MM:SSYYYY-MM-DD HH:MMYYYY-MM-DDDD.MM.YYYY HH:MM:SSDD.MM.YYYY HH:MMDD.MM.YYYY
Tested NVR Models
- VIGI NVR4032H (Firmware 1.4.0)
Should work with other VIGI NVR models supporting OpenAPI:
- VIGI NVR1008H
- VIGI NVR1016H
- VIGI NVR2016H
- VIGI NVR4016H
Troubleshooting
Connection refused
- Ensure OpenAPI is enabled on the NVR
- Check firewall allows port 20443
- Verify NVR IP address
Authentication failed
- Verify username and password
- Ensure user has admin privileges
No recordings found
- Check the channel ID exists (use
channelscommand) - Verify recordings exist for the time range
- Try with
--type all
License
MIT License
Contributing
Contributions welcome! Please open an issue first to discuss changes.
Description
Languages
Python
100%
