3
Architecture Overview
Gramps edited this page 2025-08-05 22:12:22 -07:00
<html> <html><head></head>

🧱 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)

  1. Session Discovery
    Scans for new YYYY.MM.DD folders on startup. Multiple sessions per day supported (.2, .3, etc.).

  2. Clip Classification
    Reads each subfolder (hits/, misses/, montages/, etc.) and classifies by:

    • Folder name

    • Filename suffix (-vert for vertical)

  3. Metadata Injection
    Loads notes.json (if present) or prompts user for:

    • highlight (required)

    • tags, gag_name (optional)

  4. Title + Description Generation
    Uses OpenAI to create:

    • Dynamic video titles (based on folder + metadata)

    • Social-ready video descriptions

  5. Intro/Outro Assembly

    • Concatenates intro + title card + clip + outro

    • Uses branding assets in assets/

  6. Thumbnail Generation
    Creates stylized Fortnite-style thumbnails under 2MB

  7. Upload

    • Vertical → YouTube Shorts

    • Widescreen → YouTube Clips (and PeerTube, if enabled)

  8. 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

</html> </html>## 🧱 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)

  1. Session Discovery Scans for new YYYY.MM.DD folders on startup. Multiple sessions per day supported (.2, .3, etc.).

  2. Clip Classification Reads each subfolder (hits/, misses/, montages/, etc.) and classifies by:

    • Folder name
    • Filename suffix (-vert for vertical)
  3. Metadata Injection Loads notes.json (if present) or prompts user for:

    • highlight (required)
    • tags, gag_name (optional)
  4. Title + Description Generation Uses OpenAI to create:

    • Dynamic video titles (based on folder + metadata)
    • Social-ready video descriptions
  5. Intro/Outro Assembly

    • Concatenates intro + title card + clip + outro
    • Uses branding assets in assets/
  6. Thumbnail Generation Creates stylized Fortnite-style thumbnails under 2MB

  7. Upload

    • Vertical → YouTube Shorts
    • Widescreen → YouTube Clips (and PeerTube, if enabled)
  8. 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](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)