自动YouTube Shorts视频工厂 — 零成本,无需外部视频API。每日使用edge-tts(免费Micro...)生成基于引用的短视频。
Zero-cost autonomous YouTube Shorts pipeline. Ships 3 videos/day, no paid APIs.
Stack: edge-tts (free) → Pexels clips (free API) → MoviePy (local) → YouTube upload
bash
# 1. Install dependencies
pip install moviepy edge-tts google-api-python-client google-auth-oauthlib pillow
# 2. Set Pexels API key (free at pexels.com/api)
export PEXELS_API_KEY="your_key_here"
# 3. Set up YouTube OAuth (one-time)
python3 scripts/yt_setup.py # Opens browser for auth
# 4. Prepare quote library
cp assets/sample_quotes.json quote_library.json # Or provide your own
# 5. Run once to test
python3 scripts/pipeline.py
# 6. Add to cron (3x daily)
# 0 8,14,20 * * * cd /your/path && python3 scripts/pipeline.py >> pipeline.log 2>&1
json
{
"motivational": [
{"quote": "Champions keep playing until they get it right.", "author": "Billie Jean King"},
{"quote": "The secret of getting ahead is getting started.", "author": "Mark Twain"}
],
"sports_quotes": [
{"quote": "I am the greatest.", "author": "Muhammad Ali"}
]
}
Supported niches: motivational, sports_quotes, business_quotes, film_tv_quotes, wisdom_philosophy
VariableDefaultDescriptionPEXELS_API_KEYrequiredFree at pexels.com/apiYT_TOKEN_FILE``~/.yt_token.pickleYouTube OAuth tokenOUTPUT_DIR``/tmp/tsw_outputVideo output directoryAUDIO_DIR``/tmp/tsw_audioTTS audio cacheCLIP_CACHE_DIR``/tmp/tsw_clipsPexels clip cache (reused)
references/youtube-setup.mdreferences/niche-config.mdreferences/troubleshooting.md