Ask your AI agent in plain English for "the lobby camera from 8 to 9 PM yesterday" and get back a clean MP4 — straight from your Dahua-family DVR or NVR.
The short version
Dahua recorders, and the many brands built on Dahua's protocol, hide recorded footage behind a clunky web UI and a fiddly HTTP CGI interface. This skill hands that whole mess to your AI agent.
You register each recorder once with a short alias. After that, your agent can handle requests like:
Pull the loading-bay camera from 11:00 PM to 11:20 PM last night and save it as an MP4.
The skill searches the recorder, downloads the segment, converts it to a standard MP4, trims it to your window, verifies the result, and reports progress as it goes.
What it actually does
- Speaks the Dahua CGI protocol natively.
mediaFileFind.cgisearch andloadfile.cgidownload, with Basic-vs-Digest auth fallback and the+-vs-%20space-encoding quirks handled for you. - Smart format handling. Auto-detects the DHAV container vs a raw H.264/H.265 bitstream by inspecting the stream, then remuxes (DHAV) or rebuilds the timing (raw) into a standard MP4 with faststart.
- Strategy ladder. Fast CGI download first; if a recorder returns a short clip (parallel-stream firmware), it supplements with RTSP and keeps the longer file; backs off and retries on throttling; falls through to RTSP playback for stubborn firmware. Every step is a structured progress event.
- Built for AI agents. Emits NDJSON progress events so your agent can run a download as a background task and keep the conversation responsive.
SKILL.mddocuments the dispatch pattern. - Secure credential storage. Onboarding picks between your OS keyring (Windows Credential Manager / macOS Keychain / Linux Secret Service) and a local
.envfile. On macOS and Linux the file is restricted to your user account (0600); credentials never appear on command lines or in logs. - Guided setup. Onboarding opens a real terminal for credential entry and can install ffmpeg for you (with your confirmation, via winget, Homebrew, or apt), so you are not left hunting for prerequisites.
- Verification built in. Each downloaded MP4 is checked with ffprobe for codec, resolution, frame rate, and duration, and—when Pillow and tesseract are available—its on-screen-display timestamp.
- Flexible file organization. Flat, per-day, per-camera, or per-day-per-camera layouts, set once during onboarding.
Brands it works with
All of these share the Dahua HTTP CGI / RTSP protocol:
- Dahua (DH-NVR4xxx / 5xxx, DH-XVR series, and similar)
- IC Realtime (ICIP-, NVR-, MAX-IP series)
- Lorex — newer models only (older Lorex use a different protocol)
- Amcrest (NV21xx, NV41xx, etc.)
- Honeywell Performance (HEN, HQA series)
- EZVIZ business line
- Other Dahua OEM rebrands that expose the same CGI/RTSP interface
Not sure whether your recorder qualifies? Send the brand, model, and firmware through the contact form and I'll sanity-check it before you buy.
Who it's for
Anyone with a Dahua-family DVR/NVR who regularly needs to export recorded clips by camera and time, and would rather ask in plain English than navigate the recorder's UI. Security teams, integrators supporting mixed Dahua/OEM fleets, and developers building an agent workflow around recorded footage.
How it handles the hard parts
- Format guesswork — detects DHAV vs raw bitstream automatically, so you get a playable MP4 either way.
- Timestamps — preserves timing on DHAV downloads, regenerates it for raw bitstreams, and repairs playback gaps on the RTSP fallback path.
- Auth quirks — tries Digest, falls back to Basic for older IC Realtime firmware.
- Encoding quirks — handles the strict
%20-vs-+space encoding that newer Dahua firmware requires. - Verification — confirms the file is real video of plausible length before reporting success.
Tested on
Tested across multiple Dahua-family firmware versions, including older IC Realtime firmware with the Basic-auth quirk and newer Dahua firmware with the strict %20 encoding requirement. There is no fixed model matrix yet — Dahua-protocol recorders that expose CGI and RTSP should work, and reports are welcome.
Compatibility notes
It uses the open Agent Skills (SKILL.md) standard, so it works natively in Claude (Code, Desktop, and web) and OpenAI Codex, plus Gemini CLI, Cursor, GitHub Copilot, OpenClaw, Hermes, and any other SKILL.md-compatible AI assistant.
Recommended environment:
- Windows, macOS, or Linux with Python 3.10+.
ffmpegandffprobeavailable on PATH.- Network access from the agent machine to the recorder (HTTP/HTTPS for CGI, plus RTSP for fallback).
- A recorder account with permission to search and play back recorded footage.
Recorders on a LAN often use self-signed certificates, which the skill accepts for local connections. Keep your recorder on a local network or VPN rather than exposing it to the public internet.
A note on trimming
Clips are trimmed by copying from the nearest keyframe, so the start is accurate to within about one to three seconds rather than the exact frame. That is ideal for "show me roughly 8 to 9 PM" review work; it is not a frame-exact, evidence-grade export tool.
Run Hikvision cameras too?
If you also have Hikvision recorders, see the Hikvision NVR skill — same idea, built for Hikvision's ISAPI protocol.
FAQ
Which brands does this actually support?
Dahua and the many OEMs built on Dahua's CGI/RTSP protocol — IC Realtime, newer Lorex, Amcrest, Honeywell Performance, the EZVIZ business line, and similar rebrands. Older Lorex and non-Dahua brands (Hikvision, UniFi Protect, Axis) are not covered here.
Which AI agents does it work with?
It uses the open Agent Skills (SKILL.md) standard, so it works natively in Claude (Code, Desktop, and web) and OpenAI Codex, plus Gemini CLI, Cursor, GitHub Copilot, OpenClaw, Hermes, and any other SKILL.md-compatible assistant.
Where are recorder passwords stored?
In your OS keyring when possible (Windows Credential Manager / macOS Keychain / Linux Secret Service), or in a local .env file for headless setups. On macOS and Linux that file is restricted to your user account (0600). Credentials never appear on command lines or in logs.
Does it download audio?
No. Audio is dropped during conversion — Dahua OEM audio is inconsistent and rarely useful for review.
What if the fast download fails?
The skill falls back automatically: it retries after a backoff if the recorder throttled it, and drops to RTSP playback for firmware that will not serve a clean direct download.
Is it affiliated with Dahua or IC Realtime?
No. This is an independent skill from DJX Systems for working with Dahua-protocol recorders. Dahua, IC Realtime, and the other brand names are trademarks of their respective owners.
