Dahua camera scheduled periodic snapshots to FTP for making a timelapse

ABPAM

n3wb
Mar 4, 2021
16
2
Plovdiv, Bulgaria
Hello!
Second post for one day :) But, please, don't take this as SPAM, I intentionally create a second thread for this problem, because it's not related to the first one.
Earlier today, I asked here about setting up an FTP server, because I've had some problems with the password. Problem solved, but now I am trying to setup a schedule for a periodic snapshots, that are to be uploaded to an FTP server. Here's what I've done:

1. Setup the FTP server (vsftpd) on a computer in the same network (ubuntu server 20.04).
2. Connected the Camera to the FTP server and tested it on both ends: When clicking the "test" button, the camera returns: "FTP server test success." and the server's logs (tail -f /var/log/vsftpd.log) look like this:

Code:
Thu Mar  4 13:23:04 2021 [pid 106880] CONNECT: Client "::ffff:192.168.1.105"
Thu Mar  4 13:23:04 2021 [pid 106879] [cam1] OK LOGIN: Client "::ffff:192.168.1.105"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK MKDIR: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK MKDIR: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/1614871385_42958074590"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK UPLOAD: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/1614871385_42958074590/ftp_test.txt", 4 bytes, 1.26Kbyte/sec
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK DELETE: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/1614871385_42958074590/ftp_test.txt"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK RMDIR: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/1614871385_42958074590"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK RMDIR: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/"
So, I assume everything is setup correctly.

3. I set up the snapshot schedule (Menu Item "Storage" -> Submenu Item "Schedule" -> Tab "Snapshot") and enabled all types ("General", "Event", "Alarm") for all days from "00:00:00" to "23:59:59" (I will fix this schedule to a more reasonable one, leaving only "General"/Every day/08:00:00 - 18:00:00, once I make sure it all works).

4. I set up the individual snapshot in Menu Item "Camera" -> Submenu item "Video" -> Tab "Snapshot" with the following parameters:
Snapshot type: General
Image size: 720p (1280*720)
Quality: 6 (Best)
Interval: Customized - 10s

My logic tells me that with these settings the camera has to take a snapshot every 10 seconds, every day, all day long, and send it to the FTP server. However, when I take a look at the server's directory where the images must be kept, I see only one directory with the name of "6J0327APAGD3A90" (which is my camera's default name, I haven't changed it), which contains a subdirectory with the name of "DVRWorkDirectory", which is empty. Also when I tail -f /var/log/vsftpd.log no additional logs are appearing. What am I doing wrong?

Camera: Dahua IPC-HFW1435S-W-S2

Thank you!
 
I haven't seen any option for file size limit in my camera's control panel. And, I don't think this might be the problem, because I use pretty low image settings (720p). Anyway, can you tell me where you set the file size limit on your camera, so I could look for a similar option on mine? :)
 
In my case, it's not that. I selected 720p (1280x720) which is the lowest of a list with 1280x720, 1280x960, 1920x1080, 2304x1296 and 2560x1440 and the quality of the snapshot is 1 (again the lowest). Still nothing. There's gotta be some other reason. Is there anything I need to do to trigger the start of the upload process?
 
Tried that, but nothing happens. I set the schedule for all three options: General, Event and Alarm, with no result, while the motion detection is also set up properly. Also, I need to get a snapshot no matter if there is any movement in the frame, so Motion Detection might not be an option.
 
enabled all types ("General", "Event", "Alarm")

Would you try so:
First, this a series 1 camera, it means the cpu is weakest in the line, get rid of the Event and Alarm in ftp at start. Then disable motion at all in this camera, if possible, this too releases some cpu resources.

Otherwise looks ok. There might be an issue with firmware too. If i'm correct this cameras latest firmware is:


Hope this helps
 
Are you setting it up to use FTP or SFTP? I couldn't get SFTP to work with my Dahua cameras, only FTP.
Also, once you do get it working, good luck dealing with the Dahua directory structure. It's awful. A folder is created every day, hour, and minute, and there are other folders thrown in there randomly as well.
 
Are you setting it up to use FTP or SFTP? I couldn't get SFTP to work with my Dahua cameras, only FTP.
Also, once you do get it working, good luck dealing with the Dahua directory structure. It's awful. A folder is created every day, hour, and minute, and there are other folders thrown in there randomly as well.
Folder structure is actually pretty logical, no problem there,
if you have small project to do with that, try file renameing with irfanview patch mode, that can sort and rename every phpto into one folder with timestamp in name for example.
 
Folder structure is actually pretty logical, no problem there,
if you have small project to do with that, try file renameing with irfanview patch mode, that can sort and rename every phpto into one folder with timestamp in name for example.
You have perked my interest: are you saying that this IrfanView software can pull all of the images from a clustf**k of directories on an FTP server and store them all into a single directory on the ftp server with a timestamped name? If so, i would be very interested in that.
 
  • Like
Reactions: Flintstone61
Would you try so:
First, this a series 1 camera, it means the cpu is weakest in the line, get rid of the Event and Alarm in ftp at start. Then disable motion at all in this camera, if possible, this too releases some cpu resources.

Otherwise looks ok. There might be an issue with firmware too. If i'm correct this cameras latest firmware is:


Hope this helps

Ok, freed all events, left only "General" and disabled motion detection. Still no sign of uploading attempts in FTP's logs. The firmware I'm using is "2.680.0000000.20.R, Build Date: 2020-06-15", but there is a new one with a changelog: "Fix some tiny bugs" :D The camera is 200km away from me and, to be honest, I'm a little scared to update the firmware without having the option to react immediately (which in this case is quite impossible). Also the camera is in "production" state, streaming to a website, which makes it even more complicated for firmware update. According to Dahua's manual, though, this is the correct procedure, but it's nowhere written that the snapshots can be taken periodically. (I'm saying this, because pretty unbelievable for this to be a bug and still shown in the official documentation).

Are you setting it up to use FTP or SFTP? I couldn't get SFTP to work with my Dahua cameras, only FTP.
Also, once you do get it working, good luck dealing with the Dahua directory structure. It's awful. A folder is created every day, hour, and minute, and there are other folders thrown in there randomly as well.

It's not SFTP, I tried to keep things as simple as possible. Both, the server and the camera are in the same LAN network, so there's no much need to secure things so tightly. It's just plain FTP (vsftpd server with no TLS , running on port 21). About the directory structure, what you say, doesn't actually sound so awful, instead it makes a lot of sense - I can write myself a script for sorting the files anyway, so that's not really a problem :)
 
The firmware I'm using is "2.680.0000000.20.R, Build Date: 2020-06-15",

Now you got my attention, From where did you have such a release, and can you share it with me please. I have literally hundreds of dahua firmware files but no such. As the gap between previous release is so small, it might be a somebodys custom firmware with some "personality" issues. Can I have it?
I personally use several 5 series cameras for timelapse, and even then sometimes i have to mess with firmwares to get them work. I have 7 different working right now, i think. As one side business I offer timelapse portal service for customers with automatic video generation and day-by-day overview. Mostly for construction sites.
 
Now you got my attention, From where did you have such a release, and can you share it with me please. I have literally hundreds of dahua firmware files but no such. As the gap between previous release is so small, it might be a somebodys custom firmware with some "personality" issues. Can I have it?
I personally use several 5 series cameras for timelapse, and even then sometimes i have to mess with firmwares to get them work. I have 7 different working right now, i think. As one side business I offer timelapse portal service for customers with automatic video generation and day-by-day overview. Mostly for construction sites.


hello mate, have you managed to fix this issue. Having problems myself....
 
Hello!
Second post for one day :) But, please, don't take this as SPAM, I intentionally create a second thread for this problem, because it's not related to the first one.
Earlier today, I asked here about setting up an FTP server, because I've had some problems with the password. Problem solved, but now I am trying to setup a schedule for a periodic snapshots, that are to be uploaded to an FTP server. Here's what I've done:

1. Setup the FTP server (vsftpd) on a computer in the same network (ubuntu server 20.04).
2. Connected the Camera to the FTP server and tested it on both ends: When clicking the "test" button, the camera returns: "FTP server test success." and the server's logs (tail -f /var/log/vsftpd.log) look like this:

Code:
Thu Mar  4 13:23:04 2021 [pid 106880] CONNECT: Client "::ffff:192.168.1.105"
Thu Mar  4 13:23:04 2021 [pid 106879] [cam1] OK LOGIN: Client "::ffff:192.168.1.105"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK MKDIR: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK MKDIR: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/1614871385_42958074590"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK UPLOAD: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/1614871385_42958074590/ftp_test.txt", 4 bytes, 1.26Kbyte/sec
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK DELETE: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/1614871385_42958074590/ftp_test.txt"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK RMDIR: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/1614871385_42958074590"
Thu Mar  4 13:23:05 2021 [pid 106881] [cam1] OK RMDIR: Client "::ffff:192.168.1.105", "/timelapse/FTP_TEST/"
So, I assume everything is setup correctly.

3. I set up the snapshot schedule (Menu Item "Storage" -> Submenu Item "Schedule" -> Tab "Snapshot") and enabled all types ("General", "Event", "Alarm") for all days from "00:00:00" to "23:59:59" (I will fix this schedule to a more reasonable one, leaving only "General"/Every day/08:00:00 - 18:00:00, once I make sure it all works).

4. I set up the individual snapshot in Menu Item "Camera" -> Submenu item "Video" -> Tab "Snapshot" with the following parameters:
Snapshot type: General
Image size: 720p (1280*720)
Quality: 6 (Best)
Interval: Customized - 10s

My logic tells me that with these settings the camera has to take a snapshot every 10 seconds, every day, all day long, and send it to the FTP server. However, when I take a look at the server's directory where the images must be kept, I see only one directory with the name of "6J0327APAGD3A90" (which is my camera's default name, I haven't changed it), which contains a subdirectory with the name of "DVRWorkDirectory", which is empty. Also when I tail -f /var/log/vsftpd.log no additional logs are appearing. What am I doing wrong?

Camera: Dahua IPC-HFW1435S-W-S2

Thank you!

sorry wrong qoute. Anyways have you made FTP work mates?