Updated Clip Handling Logic (markdown)

Gramps
2025-08-05 22:01:16 -07:00
parent 5ba9e74e37
commit a25280cc9e

@ -1,64 +1,154 @@
# Clip Handling Logic
<html>
<body>
<!--StartFragment--><html><head></head><body><h2>🎞️ Clip Handling Logic</h2>
<p>This page documents how the LCS Pipeline detects, classifies, and processes highlight clips from livestream sessions.</p>
<hr>
<h3>🗂️ Clip Categories</h3>
<p>All clips are sorted into one of the following categories, each in its own subdirectory:</p>
This page explains how the LCS Pipeline processes clips — from raw input files to final uploads.
Folder Name | Description
-- | --
montages/ | Pre-edited reels combining multiple highlights. One file → one final video.
hits/ | Single standout moments (e.g., eliminations). Processed into individual highlight videos.
misses/ | Funny or frustrating fails. Each one becomes a clip.
outtakes/ | Manually triggered clips marked during stream (via button or voice). Not auto-processed.
## Overview
Each clip goes through a multi-stage process:
<hr>
<h3>📥 Input Assumptions</h3>
<ul>
<li>
<p>All clip files are placed in session folders named <code inline="">YYYY.MM.DD</code> or <code inline="">YYYY.MM.DD.N</code></p>
</li>
<li>
<p>Each clip file = one standalone video</p>
</li>
<li>
<p>Files with <code inline="">-vert</code> suffix are treated as vertical</p>
</li>
<li>
<p>All other files default to widescreen</p>
</li>
</ul>
<hr>
<h3>🧠 Classification Rules</h3>
<p>The system infers:</p>
<ul>
<li>
<p><strong>Vertical format</strong>: filename ends in <code inline="">-vert</code> or <code inline="">-vertical</code></p>
</li>
<li>
<p><strong>Clip date</strong>: extracted from the parent folder name</p>
</li>
<li>
<p><strong>Processing path</strong>:</p>
<ul>
<li>
<p>If under <code inline="">montages/</code> → auto-title screen</p>
</li>
<li>
<p>Else → prompts for <code inline="">notes.json</code> input</p>
</li>
</ul>
</li>
</ul>
<hr>
<h3>📄 Metadata Expectations</h3>
<p>Each clip may be accompanied by a <code inline="">notes.json</code> file containing:</p>
<ul>
<li>
<p><code inline="">highlight</code> (required): Short descriptive sentence</p>
</li>
<li>
<p><code inline="">tags</code> (optional): List of relevant keywords</p>
</li>
<li>
<p><code inline="">gag_name</code> (optional): Alt-title or meme label</p>
</li>
</ul>
<p>If missing, user will be prompted during processing.</p>
<hr>
<h3>🧪 Examples</h3>
<pre><code>2025.08.03/
├── hits/
│ └── shotgun-doublekill.mp4
│ └── shotgun-doublekill.notes.json
├── outtakes/
│ └── llama-bait-fail.mp4
├── montages/
│ └── fn-highlight-reel-aug3.mp4
└── rendered/
</code></pre>
<hr>
<p>Next page: <a href="https://chatgpt.com/c/Metadata-Extraction"><code inline="">Metadata Extraction</code></a></p></body></html><!--EndFragment-->
</body>
</html>## 🎞️ Clip Handling Logic
1. **Discovery**: Files are found in `hits/`, `misses/`, `montages/`, or `outtakes/` folders.
2. **Metadata Extraction**: Reads `notes.json` if available.
3. **Title Generation**: Auto or manual titles are generated.
4. **Rendering**: Intro + title + clip + outro stitched together.
5. **Upload**: Posted to YouTube (and PeerTube if wide format).
6. **Archival**: Final metadata and URLs are saved.
## Clip Categories
* `hits/`: Notable eliminations.
* `misses/`: Funny or fail moments.
* `montages/`: Pre-trimmed highlight reels.
* `outtakes/`: Manually marked moments.
## Notes File
Each clip folder may include a `notes.json` with optional metadata:
```json
{
"highlight": "Gramps nails a double headshot!",
"tags": ["Fortnite", "Double Kill", "Highlights"],
"gag_name": "Senior Sniper Supreme"
}
```
## Format Rules
* Vertical clips: Filename ends with `-vert` or `-vertical`.
* Each clip → one output video.
* Output stored in `rendered/` subfolder of the session.
## Rendering Pipeline
```text
[ intro ] + [ dynamic title card ] + [ content ] + [ outro ]
```
## Publishing Rules
* Vertical: Upload to YouTube Shorts playlist.
* Wide: Upload to both YouTube Clips and PeerTube.
## Automation Notes
* Title overlays use Fortnite fonts/colors.
* If `notes.json` is missing, OpenAI fallback generates description.
* Upload returns YouTube URL for archive.
## Dev Tip
Set debug flag in `config.py` to avoid destructive actions during tests.
This page documents how the LCS Pipeline detects, classifies, and processes highlight clips from livestream sessions.
---
🧠 Managed and documented by ChatGPT, the official LCS Pipeline wiki boss. 😎
### 🗂️ Clip Categories
All clips are sorted into one of the following categories, each in its own subdirectory:
| Folder Name | Description |
| ----------- | ----------------------------------------------------------------------------------------- |
| `montages/` | Pre-edited reels combining multiple highlights. One file → one final video. |
| `hits/` | Single standout moments (e.g., eliminations). Processed into individual highlight videos. |
| `misses/` | Funny or frustrating fails. Each one becomes a clip. |
| `outtakes/` | Manually triggered clips marked during stream (via button or voice). Not auto-processed. |
---
### 📥 Input Assumptions
* All clip files are placed in session folders named `YYYY.MM.DD` or `YYYY.MM.DD.N`
* Each clip file = one standalone video
* Files with `-vert` suffix are treated as vertical
* All other files default to widescreen
---
### 🧠 Classification Rules
The system infers:
* **Vertical format**: filename ends in `-vert` or `-vertical`
* **Clip date**: extracted from the parent folder name
* **Processing path**:
* If under `montages/` → auto-title screen
* Else → prompts for `notes.json` input
---
### 📄 Metadata Expectations
Each clip may be accompanied by a `notes.json` file containing:
* `highlight` (required): Short descriptive sentence
* `tags` (optional): List of relevant keywords
* `gag_name` (optional): Alt-title or meme label
If missing, user will be prompted during processing.
---
### 🧪 Examples
```
2025.08.03/
├── hits/
│ └── shotgun-doublekill.mp4
│ └── shotgun-doublekill.notes.json
├── outtakes/
│ └── llama-bait-fail.mp4
├── montages/
│ └── fn-highlight-reel-aug3.mp4
└── rendered/
```
---
Next page: [`[Metadata Extraction](https://chatgpt.com/c/Metadata-Extraction)`](./Metadata-Extraction)