# mystery-cli/faceless-video-engine architecture

> Architecture diagram of the GitHub repository mystery-cli/faceless-video-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mystery-cli/faceless-video-engine
- Repository: https://github.com/mystery-cli/faceless-video-engine

## Overview

Faceless Video Engine automates daily Shorts and weekly long-form YouTube production. Daily runs research and write a script, synthesize timed narration, create visuals, render, upload, and clean up; weekly runs generate countdown plans and reuse the production engine. Analytics feed performance into future topic selection. Edges cite README workflow descriptions or source excerpts/index references; some implementation details are unsampled, so the graph avoids asserting unverified internal calls.

Main entry points: [`run_daily.py`](https://github.com/mystery-cli/faceless-video-engine/blob/main/run_daily.py) (Daily runner), [`run_weekly.py`](https://github.com/mystery-cli/faceless-video-engine/blob/main/run_weekly.py) (Weekly runner), [`src/longform_gen.py`](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/longform_gen.py) (Countdown planning), [`src/script_gen.py`](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/script_gen.py) (Short planning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Run orchestration"]
  node_daily["Daily runner<br/>[run_daily.py]"]
  node_weekly["Weekly runner<br/>[run_weekly.py]"]
end

subgraph group_editorial["Editorial and feedback"]
  node_shorts["Short planning<br/>[script_gen.py]"]
  node_longform["Countdown planning<br/>[longform_gen.py]"]
  node_llm["LLM access<br/>[llm.py]"]
  node_analytics["Performance analytics<br/>[analytics.py]"]
  node_history[("Topic history<br/>[script_gen.py]")]
  node_longhistory[("Long-form history<br/>[longform_gen.py]")]
end

subgraph group_production["Video production"]
  node_voice["Voice synthesis<br/>[tts.py]"]
  node_captions["Word timing and captions<br/>[captions.py]"]
  node_visuals["Visual selection<br/>[visuals.py]"]
  node_aiimages["AI image generation<br/>[ai_images.py]"]
  node_assembly["Video assembly<br/>[assemble.py]"]
  node_remotionbridge["Remotion renderer bridge<br/>[remotion_render.py]"]
  node_composition["Short composition<br/>[Root.tsx]"]
  node_shortvideo["Video rendering<br/>[ShortVideo.tsx]"]
end

subgraph group_publishing["Publishing"]
  node_publisher["YouTube publishing<br/>[upload.py]"]
end

node_creator(("Channel operator"))
node_youtube["YouTube"]
node_gemini["Gemini / Pollinations"]
node_pexels["Pexels stock footage"]
node_edge["Edge neural TTS"]
node_ffmpeg["ffmpeg fallback"]

node_creator -->|"starts daily run"| node_daily
node_creator -->|"starts weekly run"| node_weekly
node_daily -->|"generates plan"| node_shorts
node_shorts -->|"requests generation"| node_llm
node_shorts -->|"reads and records topics"| node_history
node_daily -->|"synthesizes script"| node_voice
node_daily -->|"creates captions"| node_captions
node_daily -->|"requests visuals"| node_visuals
node_visuals -->|"generates images"| node_aiimages
node_visuals -->|"fetches stock footage"| node_pexels
node_daily -->|"renders video"| node_assembly
node_assembly -->|"delegates rendering"| node_remotionbridge
node_remotionbridge -->|"uses composition"| node_composition
node_composition -->|"registers component"| node_shortvideo
node_assembly -->|"falls back to"| node_ffmpeg
node_daily -->|"uploads finished video"| node_publisher
node_publisher -->|"uploads and organizes"| node_youtube
node_publisher -.->|"returns upload result"| node_daily
node_weekly -->|"generates countdown plan"| node_longform
node_longform -->|"requests generation"| node_llm
node_longform -->|"uses performance signal"| node_analytics
node_longform -->|"reads and records themes"| node_longhistory
node_weekly -->|"reuses video engine"| node_assembly
node_weekly -->|"uploads finished video"| node_publisher
node_analytics -->|"fetches performance data"| node_youtube
node_analytics -->|"steers topic selection"| node_shorts
node_llm -->|"generates text"| node_gemini
node_llm -.->|"falls back to Pollinations"| node_gemini
node_voice -->|"synthesizes speech"| node_edge

click node_daily "https://github.com/mystery-cli/faceless-video-engine/blob/main/run_daily.py"
click node_weekly "https://github.com/mystery-cli/faceless-video-engine/blob/main/run_weekly.py"
click node_shorts "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/script_gen.py"
click node_longform "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/longform_gen.py"
click node_llm "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/llm.py"
click node_analytics "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/analytics.py"
click node_history "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/script_gen.py"
click node_longhistory "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/longform_gen.py"
click node_voice "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/tts.py"
click node_captions "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/captions.py"
click node_visuals "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/visuals.py"
click node_aiimages "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/ai_images.py"
click node_assembly "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/assemble.py"
click node_remotionbridge "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/remotion_render.py"
click node_composition "https://github.com/mystery-cli/faceless-video-engine/blob/main/remotion/src/Root.tsx"
click node_shortvideo "https://github.com/mystery-cli/faceless-video-engine/blob/main/remotion/src/ShortVideo.tsx"
click node_publisher "https://github.com/mystery-cli/faceless-video-engine/blob/main/src/upload.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_daily,node_weekly toneBlue
class node_shorts,node_longform,node_llm,node_analytics,node_history,node_longhistory toneAmber
class node_voice,node_captions,node_visuals,node_aiimages,node_assembly,node_remotionbridge,node_composition,node_shortvideo toneMint
class node_publisher toneRose
class node_creator,node_youtube,node_gemini,node_pexels,node_edge,node_ffmpeg toneIndigo
```

## Components

### Run orchestration

- [Daily runner](https://github.com/mystery-cli/faceless-video-engine/blob/main/run_daily.py): `run_daily.py`
- [Weekly runner](https://github.com/mystery-cli/faceless-video-engine/blob/main/run_weekly.py): `run_weekly.py`

### Editorial and feedback

- [Short planning](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/script_gen.py): `src/script_gen.py`
- [Countdown planning](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/longform_gen.py): `src/longform_gen.py`
- [LLM access](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/llm.py): `src/llm.py`
- [Performance analytics](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/analytics.py): `src/analytics.py`
- [Topic history](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/script_gen.py): `src/script_gen.py`
- [Long-form history](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/longform_gen.py): `src/longform_gen.py`

### Video production

- [Voice synthesis](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/tts.py): `src/tts.py`
- [Word timing and captions](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/captions.py): `src/captions.py`
- [Visual selection](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/visuals.py): `src/visuals.py`
- [AI image generation](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/ai_images.py): `src/ai_images.py`
- [Video assembly](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/assemble.py): `src/assemble.py`
- [Remotion renderer bridge](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/remotion_render.py): `src/remotion_render.py`
- [Short composition](https://github.com/mystery-cli/faceless-video-engine/blob/main/remotion/src/Root.tsx): `remotion/src/Root.tsx`
- [Video rendering](https://github.com/mystery-cli/faceless-video-engine/blob/main/remotion/src/ShortVideo.tsx): `remotion/src/ShortVideo.tsx`

### Publishing

- [YouTube publishing](https://github.com/mystery-cli/faceless-video-engine/blob/main/src/upload.py): `src/upload.py`

### Other components

- **Channel operator**
- **YouTube**
- **Gemini / Pollinations**
- **Pexels stock footage**
- **Edge neural TTS**
- **ffmpeg fallback**

## Connections

- Channel operator → Daily runner: starts daily run (evidence: `README.md`)
- Channel operator → Weekly runner: starts weekly run (evidence: `README.md`)
- Daily runner → Short planning: generates plan (evidence: `run_daily.py`)
- Short planning → LLM access: requests generation (evidence: `src/script_gen.py`)
- Short planning → Topic history: reads and records topics (evidence: `src/script_gen.py`)
- Daily runner → Voice synthesis: synthesizes script (evidence: `README.md`)
- Daily runner → Word timing and captions: creates captions (evidence: `README.md`)
- Daily runner → Visual selection: requests visuals (evidence: `README.md`)
- Visual selection → AI image generation: generates images (evidence: `src/visuals.py`)
- Visual selection → Pexels stock footage: fetches stock footage (evidence: `src/visuals.py`)
- Daily runner → Video assembly: renders video (evidence: `README.md`)
- Video assembly → Remotion renderer bridge: delegates rendering (evidence: `src/assemble.py`)
- Remotion renderer bridge → Short composition: uses composition (evidence: `README.md`)
- Short composition → Video rendering: registers component (evidence: `remotion/src/Root.tsx`)
- Video assembly → ffmpeg fallback: falls back to (evidence: `src/assemble.py`)
- Daily runner → YouTube publishing: uploads finished video (evidence: `README.md`)
- YouTube publishing → YouTube: uploads and organizes (evidence: `src/upload.py`)
- YouTube publishing → Daily runner: returns upload result (evidence: `run_daily.py`)
- Weekly runner → Countdown planning: generates countdown plan (evidence: `run_weekly.py`)
- Countdown planning → LLM access: requests generation (evidence: `src/longform_gen.py`)
- Countdown planning → Performance analytics: uses performance signal (evidence: `src/longform_gen.py`)
- Countdown planning → Long-form history: reads and records themes (evidence: `src/longform_gen.py`)
- Weekly runner → Video assembly: reuses video engine (evidence: `README.md`)
- Weekly runner → YouTube publishing: uploads finished video (evidence: `README.md`)
- Performance analytics → YouTube: fetches performance data (evidence: `src/analytics.py`)
- Performance analytics → Short planning: steers topic selection (evidence: `src/analytics.py`)
- LLM access → Gemini / Pollinations: generates text (evidence: `src/llm.py`)
- LLM access → Gemini / Pollinations: falls back to Pollinations (evidence: `src/llm.py`)
- Voice synthesis → Edge neural TTS: synthesizes speech (evidence: `README.md`)
