Quasim0ndo wrote:Maybe this is a rather naive proposal : Would it be possible to only invoke raspistill once and keep it running (the same way it keeps running duing a timelapse) and then have it watch a temp file which just contains a number. When that number increases a picture is taken, when the number becomes -1 the process is terminated.
I have looked at the code, and something like this would be pretty simple to implement.
Instead of using a file for communication, I'd suggest using Unix signals instead as that's more efficient than polling a file.
I imagine a use case like this. The timelapse argument would take a new possible value, signal:
Code: Select all
raspistill -tl signal -t 86400 -o img%06.jpg
That would make timelapse wait for an INT signal instead of a specified time. So between frames, you'd have to run a command like this to trigger the next photo:
You could implement the same logic in a Python script too. You could for example sent the INT signal whenever the user presses a switch.
The above command would run for 86400 seconds, but you can always stop the process prematurely. Just press Ctrl+C if it's open in a terminal, or run:
What do you think of this solution?