Linux tool to download video clips and convert to AVI

csJosh

n3wb
Joined
May 4, 2023
Messages
26
Reaction score
23
Location
United States
Hi All,
I created a linux command-line tool to download video clips from Dahua cameras or NVR and convert them to AVI. I can put the source up on github if people find it helpful. My intention is to expand it and hook it into HomeAssistant.

Background:
My home setup is Dahua smart cameras (5442 and 3541) and Dahua dumb NVR. I've been trying to be the most out of the smarts on the cameras with HomeAssistant without running any additional VMS like Frigate or Blue-Iris. I tried ONVIF, HTTP and even RPC2 interfaces, but found them all to be a kinda flaky with respect to session management and accessing video clips and they didn't offer a way to convert the DAV to AVI. SmartPSS works well, but it requires windows and does not offer a programmatic interface.

And then:
I discovered the Dahua SDK (https://depp.dahuasecurity.com/integration/guide/download/SDK). It is a set of client libraries for talking with Dahua products and is available for linux. I think it uses the port 37777 protocol and I'm guessing that SmartPSS is built on top of it. The documentation is somewhat incomplete, but the libraries seem to work!

I'm looking forward to playing around with what else they can do. Looks like it can also play back clips and take snapshots.

-Josh
 
Top