ExifTool Forum

General => Other Discussion => Topic started by: Alan Clifford on October 31, 2021, 05:44:39 PM

Title: icat and raspberry pi motion camera photos
Post by: Alan Clifford on October 31, 2021, 05:44:39 PM
There is a question at the end for Phil please

My Pi cams start an event when motion is detected and stops the event after 60 seconds without motion.  Photos are saved into a directory for each event.

To simulate the situation after a month, I copied the photos from a working Pi to my spare Pi.  I was a bit shocked as there were 47000 photos in 1500 directories.  The first run of icat took rather a long time as "convert" takes about two seconds per photo.  This would not happen on the working Pi as I'd just let the photos build up.

I added a directory of 13 photos and icat took 2 minutes 15 seconds.   A third run with 438 photos added took about 17 minutes (the motion dectection sometimes is confused by shadows and sunlight so, at 1 - 3 photos per second, they build up).  A run without adding anything takes about 1 minute 20 seconds.

Here it is, if my test Pi is switched on: http://idaeus.clifford.ac/motionicat/2021-10-01--09-33-24--2104/index.html (http://idaeus.clifford.ac/motionicat/2021-10-01--09-33-24--2104/index.html)

Question to Phil.  It will be possible for a new directory of photos to be added before an icat run is finished.  So there would potentially be two or more instances of icat running.  Would this cause problems?  Would they be fighting to write, for instance, list.html.temp?  I've already got code in my current scripts I could reuse to prevent this happening if it would be a problem.
Title: Re: icat and raspberry pi motion camera photos
Post by: Phil Harvey on October 31, 2021, 07:33:02 PM
You shouldn't run concurrent versions of icat on the same directory.  In my current version of icat you can limit it to only processing specified directories with the --only option, which may help, but then you still need to get the processed directory indexed in the html page of the parent, so eventually you need to run it on the parent directory too.

Anyway, I have updated the icat release to my current version in case this is useful to you.  This new version also has the advantage that it supports using left/right cursor keys for moving backward/forward through the images.

- Phil
Title: Re: icat and raspberry pi motion camera photos
Post by: Alan Clifford on October 31, 2021, 08:09:40 PM
Thanks Phil.

I'll have to have a think about the --only.

In any case, the 1.3 minutes to run without converting photos is a vast improvement on my current setup.