How To Upgrade Amcrest / Lorex to Dahua Firmware And Get All Dahua Features

I discovered this thread through Google and have been reading it with interest. Thanks for all the useful information!

I have a question: I can see that upgrading to the Dahua firmware adds some interesting features, but does it fix bugs?

The reason I ask: I have an IP8M-T2499EW, which I mostly use to take 1/second snapshots (that I later combine into a time-lapse video). I use the HTTP interface on the cameras to retrieve JPG snapshots. I've tested both the URL returned by ONVIF GetSnapshotURL and the /cgi-bin/snapshot.cgi documented in the Amcrest API document.

I discovered that the IP8M is incapable of retrieving full 8MP snapshots: if you try to read the URL while the camera is set to full resolution it will fail 99.9% of the time with a HTTP 400 error code.
The only way to reliably retrieve snapshots is to set the resolution to 4MP or less.
I asked about the problem on the Amcrest forum and many other people have the same issue.
I have had a support request in with Amcrest since March. I gave them access to the camera and they admitted the problem exists, but I haven't heard anything since. They did release a firmware upgrade in October but that didn't fix the problem.

So, I'm wondering whether the Dahua firmware has the same problem. I'm getting the impression from the posts here, and from Amcrest's general lack of responsiveness and lack of firmware upgrades, that they don't really do significant software development or support (maybe just minimal rebranding?) so my guess is that the bug is in the original firmware and that Amcrest is incapable of fixing it (I've seen the same problem, but at a much reduced frequency) with some 4MP Amcrest cameras). Alternatively it's an issue that Amcrest introduced trying to add a feature to code they don't understand(?)

Is there anyone out there who is using the snapshot interface and can tell whether the Dahua firmware has the same problem? Obviously I'd rather not go through risk of switching firmware if it has the same low level bugs.

Thanks for any help/information on this.

PS: I did try using the NAS interface to get the snapshots. It does not seem to save them with anywhere near the desired 1/sec frequency. Actually, even through the HTTP interface, at reduced resolution, I only am able to get about 1 every 2 seconds, but I can live with that.
 
@DanTappan, on my converted T2499EW, I can fetch an 8MP snapshot from the CGI interface in less than 1/2 sec on my test bench (short ethernet):

you might compare to the numbers you're getting on your stock Amcrest unit to see if the Dahua FW is doing this any faster.
(i only have the one unit, so i can;t compare to stock any more)

snapshot_8mp.PNGsnapshot_timing.PNG
 
Last edited:
  • Like
Reactions: DanTappan
I just ran a bash script against my IP5M-T1179EW-28MM (stock Amcrest firmware) to curl 60 jpgs as fast as possible over wired Ethernet, and it took about 60 seconds. Each jpg is 5 MPix and about 770Kbytes.

I tried running a longer test, but the camera hangs up if I do more than about 80.
 
interesting, but that's different hardware than the T2499EW ( 8mp aluminum-bodied eyeball/turret) that DanTappan was asking about, so may not be directly comparable...
I have afeeling they really skimped on the IP5M-T1179E ... :-)
 
interesting, but that's different hardware than the T2499EW ( 8mp aluminum-bodied eyeball/turret) that DanTappan was asking about, so may not be directly comparable...
I have afeeling they really skimped on the IP5M-T1179E ... :)

True, but it's also a data point regarding Dan's question, should I choose to switch over to Dahua firmware.

I'm supposed to review the unit I bought and get my money back, but I keep stalling because right now I'd give it only 3.5 stars. :confused:
 
3.5 out of 4 possible is not bad. out of 10, not so much... :)

LOL! It's amazon, so it's out of 5. I like the hardware, but the firmware and software are pretty wretched.
 
Yes, look for something else if you want better software.
Dahua is one of the worst.
I have 4 dahua cameras and NVR and now thinking of changing to hikvision because of the software bugs and issues they have.
 
@DanTappan, on my converted T2499EW, I can fetch an 8MP snapshot from the CGI interface in less than 1/2 sec on my test bench (short ethernet):

you might compare to the numbers you're getting on your stock Amcrest unit to see if the Dahua FW is doing this any faster.
(i only have the one unit, so i can;t compare to stock any more)

View attachment 79170View attachment 79171

I didn't have any stock Dahua models, but I just got hold of a Dahua 8MP Zoom camera ( DH-IPC-HFW4631H-ZSA, running firmware "2.460.0000000.16.R, Build Date: 2017-09-04") and tested it out in my setup. It turns out that:
  • The Dahua, with original Dahua firmware, works somewhat better, in that it is sometimes able to retrieve 8MP snapshots
  • BUT the Dahua seems to have intermittent similar issues.
  • The main difference is that when it gets into the failure mode it returns - 500 Server Error: Internal Server Error for url: .... - instead of a 400 error, and it recovers after awhile.
  • As with the "Amcrest" camera, reducing the resolution to 4MP makes the problem go away (or at least very infrequent)
I can't find any more recent firmware for the DH-IPC-HFW4631H-ZSA, but it seems pretty likely that
  • the underlying bug was present in the firmware Amcrest got from Dahua
  • it may well be present in the latest firmware, just not quite as bad as the Amcrest version
 
I just ran a bash script against my IP5M-T1179EW-28MM (stock Amcrest firmware) to curl 60 jpgs as fast as possible over wired Ethernet, and it took about 60 seconds. Each jpg is 5 MPix and about 770Kbytes.

I tried running a longer test, but the camera hangs up if I do more than about 80.
Yes, that's pretty much the symptom of the bug. At lower resolutions, generally between 4MP and 8MP, the snapshot URLs will work for awhile and then hang, eventually returning the 400 error. As you reduce the resolution and possibly the image quality, it works more reliably. So I'm not surprised that that's what you saw with a 5MP camera.
 
still not quite apples-to-apples, given different hardware has varying amounts of processing 'headroom'....

I was suggesting you run the same browser-based test i did (or @TheWaterbug's scripted fetch) against a stock AMCREST T2499EW cam to see if mine with Dahua FW is any faster,

but yeah, it might just not work reliably on any HW/FW...
 
still not quite apples-to-apples, given different hardware has varying amounts of processing 'headroom'....

I was suggesting you run the same browser-based test i did (or @TheWaterbug's scripted fetch) against a stock AMCREST T2499EW cam to see if mine with Dahua FW is any faster,

but yeah, it might just not work reliably on any HW/FW...
What I use is a python script which fetches images once a second, so it's doing essentially what your shell script test did. But, with the stock Amcrest firmware configured to 8MP resolution even a simple browser fetch fails soldily: 400 errors 99% of the time.
So seems pretty apples-to-apples to me.
 
(or @TheWaterbug's scripted fetch)

In case anyone wants to try this:

Code:
#!/bin/bash
NumShots=$1
PauseBeforeShot=$2

for i in `seq 1 $NumShots`
do
    sleep $PauseBeforeShot
    outfile=jpg/Snapshot
    outfile+=$i
    outfile+=.jpg
    sudo curl -o $outfile --digest --user user:Password -O "http://192.168.1.45/cgi-bin/snapshot.cgi"
done

Save as GetSnapshots.sh, or whatever, and then sudo chmod +x GetSnapshots.sh to make it executable (on macOS or Linux), then invoke with ./GetSnapshots 100 0 or whatever arguments you want to use.

edit: Kudos to @mrfurious for the tip on using --digest with curl to authenticate with Amcrest/Dahua cameras.
 
An an example: The camera out of the box, when uploading via ftp creates a path of the form <date>/001/dav/<hour> for video and <date>/001/jpg/<hour>/<minute> for snapshots.
After the NVR configuration, the ftp path is of the form, <date>/video_001 and <date>/pic_001.

There is no option that I know of to control the ftp path. Yet nothing seems to reset it. What is the ftp path written by default with the Dahua firmware?

I prefer the shorter path, but other functions are not working or working inconsistently. In particular, if the camera is set to 8mp video, snapshots, either scheduled or from event, occur inconsistently, usually ok over night but stop during the day. So far, with the Dahua firmware, it seems to be working, but I've thought that before with Amcrest as well.

for the file path, See the HTTP API spec, specifically Get & SetStorageGroupConfig.

eg: http://<cam ip>/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup

if you try the Set option, be sure to note the prior settings, in case you need to revert...
 
Last edited:
  • Like
Reactions: mat200
I've also noticed that there's an option missing. On the Amcrest, you can choose, 1, 3 or 5 snapshots when motion activated. There is no choice of how many with Dahua, only snapshots or not.

see what you get with this URL from the http api doc,
http://<cam ip>/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect[0].EventHandler

look for the setting for 'EventHandler.SnapshotTimes '. try the SetConfig syntax (see the SetEventHandler section of the doc) to change it...
 
  • Like
Reactions: mat200
For anyone who flashed their Amcrest NVR4108E... Did you use the firmware for Dahua N42B2P?

The reason I ask is the Dahua N42B2P seems like different hardware (different specs with 200Mbps vs 80Mbps bandwidth as pointed out earlier). The Dahua with the exact same specs seems to be DHI-NVR4108.
 
With the Amcrest camera upgraded to Dahua firmware, I can no longer remove the "Amcrest" watermark? Any way to remove it after flashing?

Or should I have removed the "Amcrest" watermark prior to flashing?