nvrclip: export exact Dahua/Hikvision clips without vendor software

yashau

n3wb
Apr 13, 2021
1
1
Earth
Long time lurker here.

I got tired of installing giant vendor software just to export a short clip from an NVR, so I made a small tool for it. It's open source so feel free to rummage through the source code:


It can export exact MP4 clips from Dahua and Hikvision NVRs. No SmartPSS, DSS Express, iVMS, browser plugins, vendor SDKs, or background services.

Basic example:
Code:
.\nvrclip.exe grab shop cashier --from "2026-05-06 14:50" --to "2026-05-06 15:20"

Output:
Code:
shop_cashier_2026-05-06_1450-1520.mp4

It uses a TOML config with NVR aliases and channel aliases, so you can do things like "shop cashier" instead of remembering channel numbers.

The main thing I wanted to fix is the annoying "download the whole recording chunk" workflow. If the NVR has one file from 14:00-15:00 and another from 15:00-16:00, but you ask for 14:50-15:20, nvrclip downloads the overlapping parts, trims them, and gives you one MP4.

Current features (check README.md for more details):

  • Dahua and Hikvision support
  • exact --from / --to exports
  • --around + --minutes convenience mode
  • channel aliases
  • MP4 output via ffmpeg
  • fast copy mode or exact H.264 re-encode mode
  • temp/debug options
  • no vendor SDKs

This is still early, and NVR firmware differences are always fun, so feedback/testing on different models would be very welcome. PRs are always welcome too.

Thanks for taking a look :)
 
  • Like
Reactions: looney2ns