Hey Guys,
I have a server running curl or wget requests to take/save snapshots from the NVR, triggered by alarms that the NVR sends or manually. This is essesntially like loading the ipaddres/cgi-bin/snapshot.cgi in a web browser.The reason for this is that the built in FTP upload or Email was sometimes (often actually) fail to either save the file or add to email attachment.
Now that I am using curl to download, I can see why. It normally takes about 2-3 for the image to download, <0.1 of which is actual protocol talk and login and the file transmission (jpeg download) is only 0.2s. BUT sometimes, the whole operation would take 3 to 12 seconds (and this is probably why emails are missing attachments from time to time), of which the file transmission is again only 0.2s. So I am guessing the camera is taking long time to produce that snapshot.cgi (which is jpeg).
I would like to bring these numbers down to as low as possible as often the snapshots would miss a moving object. Does anyone know how I can speed this up? I already tried changing the snapshot quality level (1-6) and that didn't seem to have much of effect - I was still getting slow responses in the 5+ seconds with the lowest quality. Files were obviously slightly larger and so was the file transmit (0.3s) with the higher quality. I also tried talking directly to the cameras instead of the NVR - it was actually slower. Any ideas?
I have a server running curl or wget requests to take/save snapshots from the NVR, triggered by alarms that the NVR sends or manually. This is essesntially like loading the ipaddres/cgi-bin/snapshot.cgi in a web browser.The reason for this is that the built in FTP upload or Email was sometimes (often actually) fail to either save the file or add to email attachment.
Now that I am using curl to download, I can see why. It normally takes about 2-3 for the image to download, <0.1 of which is actual protocol talk and login and the file transmission (jpeg download) is only 0.2s. BUT sometimes, the whole operation would take 3 to 12 seconds (and this is probably why emails are missing attachments from time to time), of which the file transmission is again only 0.2s. So I am guessing the camera is taking long time to produce that snapshot.cgi (which is jpeg).
I would like to bring these numbers down to as low as possible as often the snapshots would miss a moving object. Does anyone know how I can speed this up? I already tried changing the snapshot quality level (1-6) and that didn't seem to have much of effect - I was still getting slow responses in the 5+ seconds with the lowest quality. Files were obviously slightly larger and so was the file transmit (0.3s) with the higher quality. I also tried talking directly to the cameras instead of the NVR - it was actually slower. Any ideas?