fraschetti / Octoslack

OctoPrint plugin for Slack, Mattermost, Pushbullet, Pushover, Rocket.Chat, Discord, Riot/Matrix, & Microsoft Teams
MIT License
74 stars 34 forks source link

[Feature Request] Upload rendered timelapse #28

Closed JoKneeMo closed 5 years ago

JoKneeMo commented 6 years ago

When a timelapse render is completed, the only configuration option is to post the screenshot to the slack channel. Would it be possible to have it post the rendered video?

For the record, I'm using Amazon S3 for uploads and Rocket.Chat as the Slack API endpoint.

I imagine it doesn't already do it because imgur is the default uploader.

fraschetti commented 6 years ago

Hi @JoKneeMo,

Entirely possible. I played a bit with attempting to render the snapshots to an animated gif but apparently Python (the underlying language for OctoPrint and Octoslack) is a bit lacking in this department. More specifically, it can be done but the libraries required to make it happen are not precompiled for the RaspberryPi architecture. As such, installing a plugin that uses these libraries would include a multi-hour compile time which is a tad unreasonable.

Time permitting, I'll browse around to see if Python has a video library that may be more readily available.

JoKneeMo commented 6 years ago

I looked at the code further and see that the snapshots are taken directly by the plugin. While making a GIF of the collected snapshots sounds interesting, I wouldn't find it useful for my use cases.

My use case is to just upload the timelapse already rendered by octopi to Amazon S3. It looks like the MovieDone event includes the full path to the file as movie.

I'm not that great at coding myself so I failed miserably, but what I was trying to do was

fraschetti commented 5 years ago

Hi @JoKneeMo I don't personally use the timelapses because they don't (yet) support multiple cameras. Because of that, I wasn't even thinking of the OctoPrint timelapse feature when I originally sent my response. I'll play around with this a bit - The Octoslack side of things isn't terribly complex but I want to see how a long S3 upload might behave within the OctoPrint ecosystem.

fraschetti commented 5 years ago

This functionality is now available in 1.6.0