Jump to content
rory

Auto Dav to AVI for Dahua DVRs

Recommended Posts

Id like to get some feedback from people using the PSS software .. or even if just backing up .dav files from DVRs that use that format .. eg. Dahua. (not sure if any other DVRs do or not).

 

I put together a custom version of the Dahua Player which just opens up the convert to avi dialog. I put it on my site for download.

 

Anyway I am now testing PSS for offsite archiving and video monitoring as an option.

Works well either in just archiving mode or with the video alarm window.

 

Problem is everything is in .dav format .. so if need to open up a video right away need to either open the player and convert it or use the PSS software which is busy with alarm video at the time .. I really want them in AVI and wondering if that is the general consensus? Ofcourse the AVI will only play with H.264 codecs installed but thats taken care of with a basic Divx codecs download.

 

So last couple days (and nights) ive been working on a program that you drop in a single folder (for now) which is say the folder by date that PSS saves the alarm video to (alarm video in this case being motion detect from the DVR). When you run that program it monitors the folder for new .dav files and converts them to avi which goes into an AVI subfolder .. and removes the .dav file .. had issues with the file still being open on longer motion detection as PSS can be saving it in chunks and it closes and then reopens it doing this several times before finally closing it .. anyway fixed that by trying to rename it in the code, if it fails then it is open and we bypass that file for the time being. It checks the .dav files every 5 seconds which seems to be a good timespan for now - I also tested it with a folder of a few hundred existing .dav files and it works. It only converts 100max in one go, and only 1 at a time, and at the 5 second check it bypasses the process if its still busy converting - I am opening the external player program and i need to also terminate it before running it again, also perform a bunch of checks inbetween to make sure it is either open or closed etc. Code is rather rudimentary, old school VB6, dirty little do until loops with system time checks called from a timer so it will move on if it takes to long, or error if the external player gives a problem opening or closing out - but CPU and memory is low (even on my P4) except when the player convert program is running which is out of my hands.

 

Id like to make my own converter and not have to use the customized player but the player SDK is mostly in chinese. So for right now I will use the player.

 

Okay enough with the technical part, so it works, somewhat anyway.

 

Do you think this would be something useful to go further with? Like to make it monitor any folder that is created within the record folder? Any suggestions, comments, more ideas .. welcome.

Share this post


Link to post
Share on other sites

New version: 1.05

 

dav2avimon.jpg

 

Updates

• Version 1.01: monitor folder is now optional, added option to delete original DAV files, added error check for File System Object.

• Version 1.05: new programmer's dhplayer (dhplayerX), fixed flashing from dhplayer focus, added options available when not monitoring.

http://www.bahamassecurity.com/software/cctv-software/dahua-dav-monitor.asp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×