Making time lapse videos when OctoPrint is not controlling the printer


I just received a new toolhead for my LulzBot TAZ 6 and to make sure everything is working correctly, I have moved the printer from the OctoPi / OctoPrint to my desktop. I have a Raspberry Pi Camera attached so I can goto http://:8080 and watch the stream but I'd like to do a time lapse capture like I can within OctoPrint.

Can this be done? If so, can I get some hints as to how?


raspistill can be used to shoot a timelapse:

# Shoot a photo every 10 seconds
/usr/bin/raspistill -tl 10

See the raspistill help output:

raspistill --help

You can get fancy by specifying other options to the raspistill command, or specify a different location for the files, whatever, but this should get you started.

Once you have the files, you can then use avconv to assemble the images into a timelapse video. I've done this a couple times but not frequently enough that I remember the options, but a quick google search will net you what you need to know there.

So basically, through octoprint, not really (that I know of) but it's reasonably easy to do manually.

I've seen a bunch of guides online on other options for shooting time lapse videos on the raspi, so you could use any of those. If you had a USB webcam, fswebcam can be set to automatically capture images with a set interval.


raspistill was mentioned in many of the Google search results I visited but with OctoPi / OctoPrint, mjpg-streamer and webcamd are running as background processes. OctoPrint manages to create a timelapse started and stopped by a print job so I was hoping that "magic" could be exposed.

If not, then I'll kill the background processes and use raspistill and avconv.


For now you'll have to kill the webcam daemon by sudo service webcamd stop. There's currently no way to capture timelapses outside of print jobs started through OctoPrint.


Might be a neat feature to be able to manually start and stop time-based time lapses through the UI, but at least for me that'd be a really low priority "nice to have" and probably wouldn't be trivial to implement.