Some images go missing

Issue #4 new
Dougie Lawson created an issue

You're running on a time.sleep(60) timer. Sometimes that means we miss a minute because there's no time left to run raspistill and it takes more than a minute to capture an image, save it and run the timer. (In my case I'm storing the images on a NAS box using an NFS share so writing the image takes a noticable time).

I'm going to run a test where I log the timestamp for each image down to the microsecond level, that way we can see how long (on average) it takes from start to finish.

I suspect setting it to time.sleep(59.5) may be a good starting point. I'll also drop the 5 second delay on raspistill down to a 1s delay. Some tuning may be needed, YMMV.

It's only a minor issue because I'm still getting good pics of Mr & Mrs Blackbird and their best mate Robin on my bird table.

Comments (4)

  1. Dougie Lawson reporter

    time.sleep(57.825) made it much better but not perfect. next test will be time.sleep(57.826)

  2. Fotosyn repo owner

    Great thanks Dougie... yeah the NAS route probably would increase the chance of this happening. For me personally, missing an image sometimes doesn't really have an impact; but I suppose it depends on what you're recording

  3. Dougie Lawson reporter

    It was all a case of timing. Your logging code helped, I increased the resolution of the log timestamps so I could get an average time to capture and save an image. Couple of rounds of tuning and time.sleep(57.826) reduces the drift close enough to zero that I'm no longer losing images.

  4. Fotosyn repo owner

    That's excellent... thanks for all your contribution and efforts to get it working the way you wanted. Pleased it's doing the job for you...

  5. Log in to comment