I do remember that the built-in timelapse used to do recorded post-roll images, i.e. it would keep recording after the print has left the Raspberry Pi but the printer was still processing. Some time during the recent updates, this behavior changed and the post-roll was just the last image cloned for N seconds of timelapse. So my timelapses all did end like this:
After some digging through the configs and documentation, I couldn't find an answer (for a day or two I thought I had one, but actually I hadn’t ... the option capturePostRoll is in the docs, but not in the v 1.13.11 code ... yet or anymore? Not a clue ...)
So today I threw this incredibly hacky bash script together and tied it into the autostart (/etc/rc.local) to launch when the raspi comes on. (See: Built-in Timelapse ends before print ends )
- It will in an endless loop, every few seconds call the REST api for the tool0 temperature.
- If the temperature is above 170 degrees, it will do a curl call to the webcam, requesting a still image.
- It will save this JPEG image with a timestamped filename into the folder /home/pi/autolapses
- Sleep for a fixed number of seconds
Now I still do need to compress the collected JPEGs in a separate step (e.g. into MP4) but I once again get timelapses that do end like this:
As I said, it's incredibly hacky, but ... hey, it works! It starts before the print starts, and ends after the print ends. Maybe it's something somebody else has use for too.