Minimal template to render a slideshow video locally and upload it to YouTube once per day. Designed for Windows Task Scheduler (or any cron) with no cloud hosting.
- Python 3.10+
- FFmpeg on PATH
- Google Cloud project with YouTube Data API v3 enabled
- OAuth 2.0 Desktop credentials JSON (
client_secret.json)
- Clone/copy this folder.
- Install deps (venv recommended):
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt- Place
client_secret.jsonin the project root. - Copy
.env.exampleto.envand adjust paths if needed. - Add input assets:
assets/slides/→ your .jpg/.png imagesassets/bgm.mp3→ optional background music
python -m app.mainThis will open a browser for Google auth and create token.json locally.
python -m flask --app app.web run --port 5000Then open http://localhost:5000, choose multiple images, edit title/description, and click Start. The server stores uploads in a temp folder, renders, uploads to YouTube, then discards temp files. Uses the same env/config as the CLI.
Use Task Scheduler → Create Basic Task → Action: python with arguments -m app.main and "Start in" set to the project folder. Ensure the machine is on/logged in at the scheduled time.
- Edit
app/video_builder.pyto change durations, resolution, overlays, etc. - Edit
app/youtube_client.pyfor metadata defaults. - Environment overrides live in
.env(see defaults inapp/config.py).
- Output file is deleted after a successful upload to save space. Remove that line if you want to keep renders.
- Keep your
client_secret.jsonandtoken.jsonprivate.