🧱 Architecture Overview
This page provides a high-level technical map of the LCS Pipeline — from input detection to final video upload. It outlines how the system is structured, modularized, and designed for hands-free content generation.
🎯 Primary Goal
To automate livestream clip creation, formatting, titling, thumbnail generation, and publishing across multiple platforms with minimal user input.
🗂️ Core Workflow (Pipeline Phases)
-
Session Discovery
Scans for newYYYY.MM.DDfolders on startup. Multiple sessions per day supported (.2,.3, etc.). -
Clip Classification
Reads each subfolder (hits/,misses/,montages/, etc.) and classifies by:-
Folder name
-
Filename suffix (
-vertfor vertical)
-
-
Metadata Injection
Loadsnotes.json(if present) or prompts user for:-
highlight(required) -
tags,gag_name(optional)
-
-
Title + Description Generation
Uses OpenAI to create:-
Dynamic video titles (based on folder + metadata)
-
Social-ready video descriptions
-
-
Intro/Outro Assembly
-
Concatenates intro + title card + clip + outro
-
Uses branding assets in
assets/
-
-
Thumbnail Generation
Creates stylized Fortnite-style thumbnails under 2MB -
Upload
-
Vertical → YouTube Shorts
-
Widescreen → YouTube Clips (and PeerTube, if enabled)
-
-
Archive & Cleanup
-
Metadata written to
metadata/history/<date>/<slug>.json -
Original clip folder optionally deleted (unless
DEBUG=True)
-
📁 Key Components
| Module | Role |
|---|---|
| main.py | Pipeline launcher and orchestrator |
| render_engine.py | Handles stitching + export |
| title_utils.py | Generates title screens |
| yt_poster.py | YouTube upload logic |
| pt_poster.py | PeerTube upload logic (optional) |
| thumbnail_utils.py | Builds and validates thumbnails |
| metadata_utils.py | Normalizes and stores clip metadata |
📦 Folder Independence
Each session folder is processed atomically — no cross-folder dependencies.
-
Safe to rerun on failed or partially processed sessions
-
Idempotent if
rendered/and history already exist
🔧 Exception Paths
-
timelapses/are handled via custom renderer (future logic) -
outtakes/require manual metadata and never auto-upload
See also: Clip Handling Logic, File Naming, Metadata Extraction
This page provides a high-level technical map of the LCS Pipeline — from input detection to final video upload. It outlines how the system is structured, modularized, and designed for hands-free content generation.
🎯 Primary Goal
To automate livestream clip creation, formatting, titling, thumbnail generation, and publishing across multiple platforms with minimal user input.
🗂️ Core Workflow (Pipeline Phases)
-
Session Discovery Scans for new
YYYY.MM.DDfolders on startup. Multiple sessions per day supported (.2,.3, etc.). -
Clip Classification Reads each subfolder (
hits/,misses/,montages/, etc.) and classifies by:- Folder name
- Filename suffix (
-vertfor vertical)
-
Metadata Injection Loads
notes.json(if present) or prompts user for:highlight(required)tags,gag_name(optional)
-
Title + Description Generation Uses OpenAI to create:
- Dynamic video titles (based on folder + metadata)
- Social-ready video descriptions
-
Intro/Outro Assembly
- Concatenates intro + title card + clip + outro
- Uses branding assets in
assets/
-
Thumbnail Generation Creates stylized Fortnite-style thumbnails under 2MB
-
Upload
- Vertical → YouTube Shorts
- Widescreen → YouTube Clips (and PeerTube, if enabled)
-
Archive & Cleanup
- Metadata written to
metadata/history/<date>/<slug>.json - Original clip folder optionally deleted (unless
DEBUG=True)
- Metadata written to
📁 Key Components
| Module | Role |
|---|---|
main.py |
Pipeline launcher and orchestrator |
render_engine.py |
Handles stitching + export |
title_utils.py |
Generates title screens |
yt_poster.py |
YouTube upload logic |
pt_poster.py |
PeerTube upload logic (optional) |
thumbnail_utils.py |
Builds and validates thumbnails |
metadata_utils.py |
Normalizes and stores clip metadata |
📦 Folder Independence
Each session folder is processed atomically — no cross-folder dependencies.
- Safe to rerun on failed or partially processed sessions
- Idempotent if
rendered/and history already exist
🔧 Exception Paths
timelapses/are handled via custom renderer (future logic)outtakes/require manual metadata and never auto-upload
See also: [Clip Handling Logic](https://chatgpt.com/c/Clip-Handling-Logic), [File Naming](https://chatgpt.com/c/File-Naming-&-Directory-Conventions), [Metadata Extraction](https://chatgpt.com/c/Metadata-Extraction)