Add character consistency, SDXL-friendly dimensions, real vision checks, and Piper narration
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
# Shorts Autopilot
|
||||
|
||||
WebUI that finds trending YouTube videos, writes original 60 second scripts with a local Ollama model, generates clips with Google Veo, stitches them with ffmpeg, and uploads them to YouTube as Shorts with generated tags.
|
||||
Self-hosted WebUI that turns trending YouTube topics into original 60 second Shorts and uploads them to your channel with generated tags.
|
||||
|
||||
Two video engines:
|
||||
|
||||
- **local** (default, free): scene illustrations from Stable Diffusion on your own GPU, narration from local text to speech, slow pan and stitch with ffmpeg. No API costs and no quotas.
|
||||
- **veo** (optional, paid): true AI video from Google's Veo through the Gemini API. Needs billing enabled.
|
||||
|
||||
Scripts and tags always come from a local Ollama model, so text generation is free either way.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.10+
|
||||
- ffmpeg on PATH
|
||||
- Ollama with a text model and a vision model:
|
||||
- `ollama pull llama3.1:8b`
|
||||
- `ollama pull llama3.2-vision`
|
||||
- Gemini API key with billing enabled (Veo)
|
||||
- Python 3.10+, ffmpeg, Ollama (installed by `install.sh`)
|
||||
- Ollama models: `llama3.1:8b` for text, `llama3.2-vision` for kids frame checks
|
||||
- For the local engine: about 15 GB of disk for torch and the image model
|
||||
- For the veo engine: a Gemini API key with billing enabled
|
||||
- Google Cloud project with YouTube Data API v3 enabled
|
||||
|
||||
## Google OAuth setup
|
||||
@@ -17,37 +22,66 @@ WebUI that finds trending YouTube videos, writes original 60 second scripts with
|
||||
1. Google Cloud Console: enable YouTube Data API v3.
|
||||
2. Create an OAuth client of type Web application.
|
||||
3. Add redirect URI `http://localhost:8000/auth/callback`.
|
||||
4. Download it as `client_secret.json` next to `app.py`.
|
||||
5. Add your Google account as a test user on the OAuth consent screen.
|
||||
4. Download the JSON at creation time, rename it `client_secret.json`, and put it next to `app.py`.
|
||||
5. Add your Google account as a test user, or publish the app so logins do not expire weekly.
|
||||
|
||||
## Run
|
||||
## Install and run
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
python app.py
|
||||
chmod +x install.sh run.sh install-local.sh
|
||||
./install.sh
|
||||
./install-local.sh
|
||||
./run.sh
|
||||
```
|
||||
|
||||
Open http://localhost:8000
|
||||
|
||||
1. Settings: set the storage folder, Gemini key, and profile options, then Save.
|
||||
1. Settings: set the folders, pick the video engine, adjust the profile, then Save.
|
||||
2. Dashboard: Link YouTube channel to this profile.
|
||||
3. Click GO.
|
||||
|
||||
## Storage layout
|
||||
## Folders
|
||||
|
||||
All large writes are configurable in Settings, so nothing has to land on a small internal disk:
|
||||
|
||||
- **Storage folder**: job folders and finished videos
|
||||
- **Models folder**: AI model downloads (several GB)
|
||||
- **Temp folder**: scratch space during rendering
|
||||
|
||||
Layout under the storage folder:
|
||||
|
||||
```
|
||||
<storage folder>\
|
||||
output\<profile>\<job>\ in progress or failed jobs
|
||||
published\<profile>\<job>\ uploaded to YouTube
|
||||
output/<profile>/<job>/ in progress or failed jobs
|
||||
published/<profile>/<job>/ uploaded to YouTube
|
||||
```
|
||||
|
||||
App settings, profiles, OAuth tokens, and logs live in `data\`. The log file is `data\logs\app.log`.
|
||||
App settings, profiles, OAuth tokens, and logs live in `data/`. The log file is `data/logs/app.log`.
|
||||
|
||||
To keep the virtual environment off the internal disk:
|
||||
|
||||
```
|
||||
mv .venv /Volumes/YourDisk/shorts-autopilot/venv
|
||||
ln -s /Volumes/YourDisk/shorts-autopilot/venv .venv
|
||||
```
|
||||
|
||||
## Profiles
|
||||
|
||||
Each profile has its own audience settings and its own linked YouTube channel. Generation settings and folders are shared. Use one profile per channel and switch with the dropdown.
|
||||
|
||||
## Made for kids
|
||||
|
||||
When enabled on a profile, uploads are flagged as made for kids and scripts go through word filters, an LLM compliance review, and per-clip vision checks. By default kids uploads are held as private for manual review. Also set your channel audience to made for kids in YouTube Studio.
|
||||
When enabled on a profile:
|
||||
|
||||
- Uploads are flagged as made for kids and as AI generated
|
||||
- Scripts pass hard-coded word and call-to-action filters
|
||||
- An LLM reviews each script in advisory, block, or off mode
|
||||
- Every generated scene is checked by a local vision model
|
||||
- Uploads are held as private for manual review by default
|
||||
|
||||
Also set the channel audience to made for kids in YouTube Studio.
|
||||
|
||||
## Notes
|
||||
|
||||
- Uploads cost about 1,600 of the default 10,000 daily API quota units.
|
||||
- Uploads from unverified Google API projects are locked to private until the project passes Google's audit.
|
||||
- If Ollama stops responding, restart it: `brew services restart ollama` on macOS, `sudo systemctl restart ollama` on Linux.
|
||||
|
||||
Reference in New Issue
Block a user