youtube-agentic-ai-studio README

项目的 README,来自 github.com/raunakpatil/youtube-agentic-ai-studio。合并为一个 markdown 文件:README.md。

YAAS: 100% free, $0 per video. Seven agents: Research, Fact-check, Script, Visuals, Voice, Render, Publish

YAAS: Youtube Agentic Ai Studio

Type an idea. Get a finished, fact-checked YouTube video. Free.

YAAS researches a topic, checks the facts, writes the script, records a voiceover, finds visuals, renders the video, and helps you title, tag and publish it, all from one simple local app.

Python License: MIT Cost Free APIs Tests Stars

Quick start · How it works · Free APIs · Setup guide · FAQ

https://github.com/user-attachments/assets/e94dab2d-3110-440c-b82e-b9289c0e6b51


⚡ Quick start

git clone https://github.com/raunakpatil/youtube-agentic-ai-studio.git
cd youtube-agentic-ai-studio
pip install -r requirements.txt
python gui.py          # opens http://localhost:7070

Then type a topic on the Home screen and press Make video. That's it.

Use Python 3.10, 3.11 or 3.12. Python 3.13+ isn't supported yet (the pinned numpy<2 has no prebuilt wheels for it).

No keys are required to try it. A free Gemini key (1 minute to get) makes the scripts much better. Paste it in Settings and it's stored locally in .env. Uploading straight to YouTube needs a one-time Google setup, covered in the Setup guide. You can always download the MP4 and upload it yourself instead.


🧭 How it works

The app has three screens, in the order you use them:

Screen What you do there
Home Type a topic, or press Let AI pick a topic, or click a trending idea. Choose long video or Short. Watch plain-English progress: researching → writing → finding visuals → recording voice → rendering.
Review & publish Five numbered steps: 1 watch it, 2 polish the title (or let AI suggest 6 better ones), 3 edit description & tags (with real YouTube search suggestions), 4 make a thumbnail (photo or new AI artwork), 5 upload now or schedule. A live How easy is it to find? score tells you what to fix.
My videos Every finished video is saved automatically, with Long videos and Shorts in separate sections. Re-open, re-edit, re-publish, download or delete.

Settings (top right) holds your channel name, voice, optional keys and advanced options. Everything has a sensible default.

Home: one box to type your video idea
Home: type an idea, or let AI pick one
Progress while a video is being made
Making a video: plain-English progress, step by step
Review and publish page
Review & publish: watch, title, findability score
Thumbnail style picker: Impact, Cinematic, Split and Studio
Thumbnail styles: pick Impact, Cinematic, Split or Studio

The four thumbnail styles in 16:9 and 9:16

Behind the scenes:

topic ──► Research ──► Fact-check ──► Script ──► Visuals ──► Voice ──► Render ──► Review ──► Publish
          (AI +        (Wikipedia    (AI)       (Pexels →   (Edge     (MoviePy)   (title lab,  (YouTube
          trends)       + arXiv)                 NASA → …)   TTS)                  SEO score)   API)

✨ Features

🧠 Trend-aware topics Live ideas from Google Trends, Wikipedia, Hacker News, Spaceflight News and arXiv. Click one, or let the AI ride a trend that fits your niche.
📚 Fact-checked scripts Before writing, YAAS pulls background from Wikipedia and arXiv, tells the AI not to contradict it, and lists the sources in your description.
✍️ Never-stuck AI Gemini model chain → Groq → OpenRouter → Pollinations (keyless), so a quota error doesn't kill the run. Broken JSON from models is repaired automatically.
🖼️ Visuals without a key Pexels → Pixabay → NASA (public domain, space topics) → Openverse (CC, credited) → AI-generated images. Credits are written into the description for you.
🎙️ Free voice Microsoft Edge neural voices with word-synced captions.
🎞️ Long videos & Shorts 16:9 with chapters, Ken Burns motion and B-roll cuts, or 9:16 Shorts with big captions. Each format gets matching thumbnails and its own section in My videos.
🏷️ Your brand Your channel name appears in the intro, on Shorts and on thumbnails. Change the text or switch it off in Settings.
✦ Title Lab 6 alternative titles written from what people actually search, each scored.
🔎 Findability score 11 checks based on YouTube best practice (length, keyword placement, chapters, tags, hashtags, call to action), each with a tip.
🔤 Keyword ideas Real YouTube autocomplete suggestions + related terms, one click to add as tags.
🖌️ Thumbnail designer 4 styles (Impact, Cinematic, Split, Studio) with live previews, short punchy text with a highlighted word, AI text ideas, and any photo from the video or brand-new AI artwork as the background. 1280×720 for long videos, 1080×1920 for Shorts, always under YouTube's 2 MB limit.
📅 Schedule uploads Upload now or pick a time. Downloads for MP4, thumbnail and captions (SRT).
📊 Your stats Production history, plus live subscribers and views per upload with a free YouTube Data API key.
🗂️ My videos Every render archived with its script, sources, photos and metadata.
©️ Credits Every video carries a semi-transparent raunakpatil.com watermark, and descriptions end with Made with YAAS by Raunak Patil · raunakpatil.com.
🎵 Background music Drop MP3s in music library/ and they're shuffled and looped to fit.

🔌 The free API stack

Everything below is free. Keyless ones work out of the box; the others need a free sign-up and are optional.

Service Used for Key
Google Gemini Research, scripts, titles free key, recommended
Groq Fast backup AI free key, optional
OpenRouter Backup AI (free models) free key, optional
Pollinations (text) Last-resort backup AI keyless
Edge TTS Neural voiceover keyless
Pexels Stock photos free key, optional
Pixabay Stock photos free key, optional
NASA Image Library Public-domain space imagery keyless
Openverse Creative Commons images (credited) keyless
Pollinations (image) AI B-roll & thumbnail art keyless
Wikipedia Fact-checking + trending ideas keyless
arXiv Fact-checking + new research ideas keyless
Google Trends RSS Search spikes keyless
Hacker News (Algolia) Tech trends keyless
Spaceflight News API Space & science news keyless
YouTube autocomplete Keyword research keyless
Datamuse Related keywords keyless
YouTube Data API Channel stats free key, optional
YouTube upload (OAuth) Publishing one-time setup

Home → Connected services → Test connections pings every service and shows what's working.

Free, keyless services can rate-limit or change without notice. YAAS retries, then falls through to the next source, and the run only fails if every option for a step is down.


🔑 Keys and settings

Keys live in .env (git-ignored) and nothing else stores them. Either paste them in Settings or copy .env.example:

cp .env.example .env

Non-secret settings (voice, channel description, video style) are saved to settings.json (git-ignored), so git pull never clashes with them. The defaults live in config.py, documented line by line.


📁 Project structure

├── gui.py                  ← run this: starts the app (Flask, http://localhost:7070)
├── config.py               ← every default, documented (+ .env / settings.json loaders)
├── .env.example            ← copy to .env for your keys
│
├── apis/                   ← free API integrations (all fail-soft)
│   ├── trends.py           ← Google Trends, Wikipedia, HN, Spaceflight News, arXiv
│   ├── knowledge.py        ← Wikipedia + arXiv fact grounding
│   ├── seo.py              ← YouTube autocomplete, Datamuse, findability score
│   ├── images.py           ← Pixabay, NASA, Openverse, Pollinations
│   ├── llm.py              ← Groq → OpenRouter → Pollinations fallback
│   └── youtube_stats.py    ← public channel stats
│
├── agents/
│   ├── gemini_client.py    ← Gemini model chain + fallback hand-off
│   ├── json_utils.py       ← repairs broken JSON from models
│   ├── researcher.py       ← topic research (trend-aware, grounded)
│   └── scriptwriter.py     ← script writing
│
├── video/
│   ├── narrator.py         ← Edge TTS voiceover + captions
│   ├── stock.py            ← image download chain + credits
│   ├── creator.py          ← renderer (Ken Burns, captions, Shorts, watermark)
│   ├── thumbnail.py        ← thumbnail designer (4 styles, 16:9 + 9:16)
│   ├── fonts.py            ← Google Fonts download + fallbacks
│   └── music.py            ← background music mixer
│
├── uploader/youtube.py     ← YouTube sign-in + upload
├── studio/                 ← the app behind gui.py
│   ├── pipeline.py         ← blueprint: run / stop, live progress, status
│   ├── review.py           ← blueprint: description, thumbnail designer, Title Lab + SEO
│   ├── library.py          ← blueprint: saved videos
│   ├── upload.py           ← blueprint: YouTube publishing
│   ├── settings.py         ← blueprint: keys + settings
│   ├── dashboard.py        ← blueprint: trends, channel stats, API health
│   ├── runner.py           ← the pipeline thread
│   ├── state.py            ← the current video + live log
│   ├── security.py         ← localhost-only guard
│   ├── templates/index.html← the page
│   └── static/             ← app.css + js/ (one file per screen)
├── tests/                  ← pytest suite (offline, no keys needed)
├── docs/screenshots/       ← README images
└── output/                 ← generated files (git-ignored)
    └── library/            ← every finished video, archived

🧪 Running the tests

pip install pytest
pytest

The suite runs offline with no API keys. It covers JSON repair, the findability score, every thumbnail style in both shapes, descriptions and credits, the watermark, .env handling and the AI model chain. GitHub Actions runs it on every push and pull request.


❓ FAQ

Does this cost anything?

No. Every service has a free tier or needs no account, and rendering runs on your own machine.

Do I need any API keys?

Not to try it. Without keys, scripts come from the keyless backup AI and visuals from NASA / Openverse / AI images. A free Gemini key is strongly recommended for script quality and reliability.

How long does one video take?

Research and script take under a minute. A Short renders in a few minutes; a 6–8 minute video in roughly 3–10 minutes depending on your CPU and the Render quality setting.

The voiceover step fails with a 403 error

Microsoft periodically changes its free speech service. Update the voice library: pip install -U edge-tts.

Can I use it without uploading to YouTube?

Yes. Download the MP4, thumbnail and captions from Review & publish and upload them however you like.

Can I turn off the raunakpatil.com watermark?

No. The small semi-transparent watermark is part of every video YAAS renders, as credit for the free tool. The description credit line can be switched off in Settings → Music & publishing.

Why is moviepy pinned to 1.0.3?

MoviePy 2.x removed moviepy.editor and changed the API, and NumPy must stay below 2.0 for it. Don't upgrade either.

The video has tiny or ugly text

Your system is missing the fonts the renderer looks for. Install DejaVu (sudo apt install fonts-dejavu on Ubuntu). Windows already has them.

YouTube upload fails with "access denied"

Delete youtube_token.json and upload again to redo sign-in. Make sure your Google account is a Test user on the OAuth consent screen.


🗺️ Roadmap


🎬 Made with YAAS

Eldritch Lore runs on this pipeline: science, history and "what if" videos.

🤝 Contributing

Pull requests welcome. Open an issue first for big changes. See CONTRIBUTING.md.

Made by Raunak Patil · UI styled after raunakpatil.com

youtube-agentic-ai-studio (raunakpatil/youtube-agentic-ai-studio)

正在搜索数据库…

这是什么?一条全自动、免费的 AI 流水线:调研热门话题、撰写带旁白的脚本、生成配音和使用图库图片的动画视频,并把成品视频上传到 YouTube——全部由一条命令触发。
这是命令行工具,还是有图形界面?它由一条命令启动,但同时也附带一个本地 Web 仪表盘,其中包含用于配置频道的设置面板,以及用于在发布前观看/审批视频的审核界面。
怎么把它跑起来?克隆仓库并按安装指南操作,大约需要 10 分钟:安装 Python 依赖,把你的 API 密钥填入配置,然后运行流水线命令。
我需要哪些 API 密钥?你需要一个免费的 Google Gemini 密钥用于调研/脚本撰写(每天 1500 次请求),一个免费的 Pexels 密钥用于图库图片(每小时 200 次请求),发布还需要 YouTube Data API 凭据。Edge TTS 旁白不需要密钥,ElevenLabs 是可选的。
安装上有什么需要留意的坑吗?moviepy 必须固定在 v1.0.3,因为 v2.0 移除了 moviepy.editor 模块并改变了整个 API;你还需要安装 DejaVu 字体,否则字幕会渲染得又小又难看。
可以只用它而不真的发布到 YouTube 吗?可以,审核仪表盘允许你点击「Reject」跳过上传——渲染好的 MP4 仍会保存到 output/,或者你也可以把 pipeline.py 中的上传步骤整个注释掉。
如果 AI 模型在运行中途达到用量配额会怎样?流水线会轮换使用一条 8 模型回退链:如果某个模型返回配额或过载错误,它会最多重试 3 次,然后自动切换到下一个模型,运行因此永远不会卡住。
制作一个视频要多久?在中端机器(i7、16GB 内存)上:调研和脚本撰写约 30 秒,旁白约 10 秒,图片下载约 20 秒,渲染一个 10 分钟的视频大约需要 3-8 分钟,上传还要再加 2-5 分钟。
有没有用这个工具做出的真实频道?有——「Eldritch Lore」是一个涵盖历史和「假如」类题材的 YouTube 频道,完全靠这条流水线运行,每个视频的调研、脚本撰写、旁白和上传都由这套代码完成。
大小
9.2 MB
星标
267
更新
提交Nov 03
时长
7个月
提交 · 90 天