Automated Metadata Optimization Engine for YouTube
High-Performance Concurrent LLM Analysis (Gemini 1.5 Pro & NVIDIA Nemotron)
Zen MetaBot is a highly optimized, local desktop client designed to automate YouTube metadata generation. The pipeline uses a custom "Debate Engine" architecture where two distinct LLM models evaluate the same video context independently, before a synthesis prompt generates the ultimate metadata payload designed for maximum CTR and algorithmic reach.
The system utilizes a multi-agent pipeline to process raw video files into highly optimized YouTube metadata.
[ RAW VIDEO ] ───▶ ( yt-dlp ) ───▶ [ MULTIMODAL PARSING ]
│
▼
[ CONTEXT CACHE ]
│
┌────────────────────────────┼────────────────────────────┐
▼ ▼ ▼
[ NVIDIA MODE ] [ DEBATE MODE ] [ GEMINI MODE ]
(Nemotron Inference) (Concurrent Multi-Agent) (Gemini Inference)
│ │ │
└────────────────────────────┼────────────────────────────┘
▼
[ SYNTHESIS & SEO GRADING ]
│
▼
[ YOUTUBE DATA API ]
| System Component | Description |
|---|---|
| Vision Extraction | Frame-by-frame multimodal parsing to build a persistent context cache, avoiding redundant API calls. |
| Debate Pipeline | Multi-agent drafting where distinct LLMs generate competing metadata, followed by strict synthesis evaluation. |
| Execution Modes | Toggle between isolated models (nvidia, gemini) or the concurrent debate synthesizer via the UI. |
| Heuristic Scoring | Built-in SEO grading algorithm (0–100) evaluating title CTR potential, tag relevance, and algorithmic hook. |
| Asynchronous UI | CustomTkinter dark-mode desktop interface running completely decoupled from background API threads. |
[ Expand ] Project Structure
.
├── bot.py # Main entry point (GUI or CLI daemon)
├── requirements.txt # Dependency locks
├── .env.example # Template for required environment variables
│
├── zenmetabot/ # Core Package
│ ├── youtube.py # YouTube Data API v3 integration layer
│ ├── downloader.py # Audio/Video multiplexer via yt-dlp
│ ├── brain.py # Multimodal extraction interface
│ ├── ai_nvidia.py # NVIDIA Nemotron inference client
│ ├── ai_gemini.py # Gemini inference client
│ ├── debate.py # Multi-agent synthesis and SEO grading
│ ├── orchestrator.py # Central pipeline controller
│ ├── gui.py # CustomTkinter interface rendering
│ └── ... # Utilities & Configs
│
└── brain/ # Local cache directory for extracted context
To run this project locally, provision external API keys for the inference models and Google services.
- Environment:
Python 3.10+ - System Binaries:
FFmpegmust be in your system PATH. - API Keys: You will need keys for YouTube Data API v3, NVIDIA Developer (Nemotron), and Google AI Studio (Gemini).
git clone https://github.com/atomicdhruba/Zen-Metabot.git
cd Zen-Metabot
pip install -r requirements.txt
cp .env.example .envPopulate .env with your API keys:
NVIDIA_API_KEY=your_key_here
GEMINI_API_KEY=your_key_here
GENERATION_MODE=debate[ Expand ] How to get your YouTube API key
To avoid standard Google App Verification overhead, this repository uses a "Bring Your Own Key" (BYOK) model for YouTube authentication. Your tokens remain strictly local.
- Create a project in the Google Cloud Console.
- Enable the YouTube Data API v3.
- Configure the OAuth Consent Screen (External, add
.../auth/youtube.force-sslscope, and add your email as a Test User). - Create OAuth client ID credentials (Desktop app).
- Download the JSON credential file, rename it to
client_secrets.json, and place it in the root of the repository.
On initial execution, a local server will spawn to handle the OAuth callback, generating a token.pickle file for subsequent headless runs.
Initialize the desktop GUI dashboard:
python bot.pyExecute in headless CLI mode for server environments:
python bot.py --cliNever commit your secrets.
The provided .gitignore explicitly blocks .env, client_secrets.json, cookies.txt, and token.pickle. Do not override these rules.
If Zen MetaBot optimizes your workflow, consider supporting its continued development.