nlef / moonraker-telegram-bot

Telegram bot to interact with Moonraker (Klipper Web API Server)
Creative Commons Zero v1.0 Universal
245 stars 64 forks source link

do not convert images for time lapse #311

Closed nlef closed 5 months ago

nlef commented 6 months ago

The main idea is to save raw pixel arrays received from the camera when creating a timelapse. In the current implementation there is a double conversion

  1. from a raw array of pixels into an image of a given format when saving the image to disk
  2. from an image on disk into an array of pixels for further video assembly

It is proposed to remove unnecessary conversions, while leaving the ability to save lapse images for additional processing through additional configuration parameters

nlef commented 5 months ago

For camera with resolution 2592x1944 one frame takes up 20 MB on disk A catalog of timelapses for long prints can take up a lot of space. It’s probably worth trying to use archiving with fast algorithms as an optional option

nlef commented 5 months ago

Added the ability to compress raw data the size of one frame was reduced to 8.5 MB I think this is an acceptable trade-off between performance and disk space.