youtube-agentic-ai-studio README

The project's README from github.com/raunakpatil/youtube-agentic-ai-studio. As one markdown file: 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)

Searching Database…

What is this?A fully automated, free AI pipeline that researches trending topics, writes a narrated script, generates voiceover and animated video with stock images, and uploads the finished video to YouTube — all triggered from a single command.
Is this a command-line tool or does it have a GUI?It is kicked off from a single command, but it also ships a local web dashboard with a settings panel for configuring the channel and a review screen for watching/approving videos before they publish.
How do I get it running?Clone the repo and work through the Setup Guide, which takes about 10 minutes: install the Python dependencies, drop your API keys into config, then run the pipeline command.
What API keys do I need?You need a free Google Gemini key for research/scripting (1500 req/day) and a free Pexels key for stock images (200 req/hour), plus YouTube Data API credentials to publish. Edge TTS narration needs no key, and ElevenLabs is optional.
Any install pitfalls I should know about?moviepy must stay pinned to v1.0.3 because v2.0 removed the moviepy.editor module and changed the whole API; you also need DejaVu fonts installed or the captions render tiny and ugly.
Can I use this without actually publishing to YouTube?Yes, the review dashboard lets you click 'Reject' to skip the upload — the rendered MP4 still gets saved to output/, or you can comment out the upload step in pipeline.py entirely.
What happens if an AI model hits its usage quota mid-run?The pipeline rotates through an 8-model fallback chain: if a model returns a quota or overload error it retries up to 3 times, then automatically advances to the next model so the run never stalls.
How long does it take to produce one video?On a mid-range machine (i7, 16GB RAM): research and scripting take about 30 seconds, narration ~10 seconds, image downloads ~20 seconds, and rendering a 10-minute video takes roughly 3-8 minutes, with upload adding another 2-5 minutes.
Is there a real channel built with this tool?Yes — 'Eldritch Lore', a YouTube channel covering history and 'what if' scenarios, runs entirely on this pipeline, with every video researched, scripted, narrated, and uploaded by this exact code.
Size
9.2 MB
Stars
267
Updated
CommitNov 03
Age
7mo
Commits · 90 Days