plug-in to upload a video to YouTube of a time-lapse or is this function slated for development
There's this method...which actually would utilize the built in timelapse process and just upload the result after it completes. Some of these old cookbook tricks on the wiki get lost some times.
I think I finally got this working..
Note: this it not a complete guide, but instead a fill-in for some steps in this guide
The missing/changed steps:
OAuth2 (After creating a project in GC):
- Google console
- +Enable APIs and Services (near top)
- Search: Youtube
- YouTube Data API v3 -> Enable
- OAuth consent screen (left menu)
- Type: External -> Next
- Enter an Application name -> Save
- Credentials (left menu)
- +Create credentials (near top)
- OAuth client ID
- Other, Enter a name -> Create
- Download your client_secrets.json file (from Credentials page)
youtube-upload error fix (main.py):
- Localize your main.py-file (mine was in ./OctoPrint/venv/Lib/site-packages/youtube_upload, Windows installation)
- Open it in any text editor
- Add: 'from oauth2client import file' just below 'import oauth2client' and save the file
Generate .youtube-upload-credentials.json-file:
- Run a dummy upload (will not do anything, just trigger the generation).
Replace <absolute path to client_secrets.json>:youtube-upload --client-secrets "<absolute path to client_secrets.json>" --title="Timelapse: {gcode}" --description="Timelapse of {gcode}, printed and recorded via OctoPrint" --category="Science & Technology" --tags="OctoPrint" "{movie}"
- Copy the link generated (if you can't, like me running this from CMD, hit CTRL+C, then copy it and run the previous command again)
- Open it in a browser and follow the steps to get your verification code
- Enter your verification code where you ran the command and press enter
You should now be good to go, add entry to config.yaml as in the guide and change to your liking.
(Personally i tried with a real dummy .mp4-movie from CMD just to make sure it was working, then deleted it from YT).
Does this method still work? What is the event you are using from octolapse?
Does OctoLapse expose events? The default timelapse event would be CaptureDone
.
https://docs.octoprint.org/en/master/events/index.html#timelapses
Just took a quick peak, I think it does here. Looks like it's movie_done
and the payload includes gcode, movie (path to file), and movie_basename.
Yep, found it in the issue tracker...
This suggest
PLUGIN_OCTOLAPSE_MOVIE_DONE
is the event but ive tried this and no event fires - will try just movie_done and see what happens
The event is plugin_octolapse_movie_done, and it works just like movie_done.
Oh, also, it appears to be case sensitive. It should be lower case. Ill write up a guide soon.