# deanmeiring/clipper architecture

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

- Interactive diagram: https://gitdiagram.com/deanmeiring/clipper
- Repository: https://github.com/deanmeiring/clipper

## Overview

Clipper turns video sources into captioned vertical highlights through a download, transcription, selection, and rendering workflow, exposed through both a CLI and a FastAPI web app. The web app also supports VOD discovery, channel-informed selection, YouTube posting, and long-form documentary and explainer production. The graph preserves those documented product branches; some subsystem paths and connections are based on README descriptions because their implementation was not sampled.

Main entry points: [`clipper/select_moments.py`](https://github.com/deanmeiring/clipper/blob/main/clipper/select_moments.py) (Moment selection), [`clipper/documentary.py`](https://github.com/deanmeiring/clipper/blob/main/clipper/documentary.py) (Documentary research), [`webapp/main.py`](https://github.com/deanmeiring/clipper/blob/main/webapp/main.py) (Web app), [`clipper/download.py`](https://github.com/deanmeiring/clipper/blob/main/clipper/download.py) (Download video)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_cli["CLI<br/>[cli.py]"]
  node_webapp["Web app<br/>[main.py]"]
end

subgraph group_clips["Short clip pipeline"]
  node_download["Download video<br/>[download.py]"]
  node_vod["Long VOD windows<br/>[long_vod.py]"]
  node_transcribe["Transcription<br/>[transcribe.py]"]
  node_loud["Loud moments<br/>[loud_moments.py]"]
  node_select["Moment selection<br/>[select_moments.py]"]
  node_reframe["Layout detection<br/>[reframe.py]"]
  node_captions["Caption generation<br/>[captions.py]"]
  node_render["Clip rendering<br/>[render.py]"]
end

subgraph group_insights["Discovery and learning"]
  node_discovery["Creator discovery<br/>[trending.py]"]
  node_analytics["Channel insights"]
  node_strategy["Channel strategy"]
end

subgraph group_publishing["Publishing"]
  node_upload["YouTube upload<br/>[youtube_upload.py]"]
end

subgraph group_longform["Long-form production"]
  node_documentary["Documentary research<br/>[documentary.py]"]
  node_explainer["Explainer scripts<br/>[explainer.py]"]
  node_visuals["Visual sourcing<br/>[visual_sources.py]"]
  node_beats["Keyword visuals<br/>[longform_beats.py]"]
  node_longrender["Long-form rendering<br/>[longform_video.py]"]
  node_promo["Promo Shorts<br/>[longform_promo.py]"]
end

node_user(("Creator"))
node_source["Video source"]
node_clipoutput["Clips and metadata"]

node_user -->|"runs"| node_cli
node_user -->|"uses"| node_webapp
node_cli -->|"starts pipeline"| node_download
node_webapp -->|"starts pipeline"| node_download
node_source -->|"downloads"| node_download
node_vod -->|"selective downloads"| node_download
node_download -->|"provides video"| node_transcribe
node_transcribe -->|"provides transcript"| node_select
node_select -->|"uses signal"| node_loud
node_select -->|"refines word cuts"| node_transcribe
node_select -.->|"sets clip layout"| node_reframe
node_reframe -->|"provides layout"| node_render
node_select -.->|"provides clip timing"| node_captions
node_captions -->|"provides subtitles"| node_render
node_render -->|"writes clips"| node_clipoutput
node_discovery -.->|"supports discovery"| node_webapp
node_analytics -.->|"informs strategy"| node_strategy
node_analytics -.->|"guides selection"| node_select
node_strategy -.->|"guides selection"| node_select
node_webapp -->|"offers posting"| node_upload
node_webapp -->|"starts series"| node_documentary
node_documentary -->|"plans visuals"| node_visuals
node_documentary -->|"plans cues"| node_beats
node_explainer -->|"sources visuals"| node_visuals
node_visuals -->|"supplies assets"| node_beats
node_beats -->|"renders scenes"| node_longrender
node_documentary -->|"provides scenes"| node_longrender
node_documentary -->|"plans promotions"| node_promo
node_longrender -.->|"supports publishing"| node_upload

click node_cli "https://github.com/deanmeiring/clipper/blob/main/clipper/cli.py"
click node_webapp "https://github.com/deanmeiring/clipper/blob/main/webapp/main.py"
click node_download "https://github.com/deanmeiring/clipper/blob/main/clipper/download.py"
click node_vod "https://github.com/deanmeiring/clipper/blob/main/clipper/long_vod.py"
click node_transcribe "https://github.com/deanmeiring/clipper/blob/main/clipper/transcribe.py"
click node_loud "https://github.com/deanmeiring/clipper/blob/main/clipper/loud_moments.py"
click node_select "https://github.com/deanmeiring/clipper/blob/main/clipper/select_moments.py"
click node_reframe "https://github.com/deanmeiring/clipper/blob/main/clipper/reframe.py"
click node_captions "https://github.com/deanmeiring/clipper/blob/main/clipper/captions.py"
click node_render "https://github.com/deanmeiring/clipper/blob/main/clipper/render.py"
click node_discovery "https://github.com/deanmeiring/clipper/blob/main/clipper/trending.py"
click node_analytics "https://github.com/deanmeiring/clipper/blob/main/clipper/channel_insights.py"
click node_strategy "https://github.com/deanmeiring/clipper/blob/main/clipper/channel_strategy.py"
click node_upload "https://github.com/deanmeiring/clipper/blob/main/clipper/youtube_upload.py"
click node_documentary "https://github.com/deanmeiring/clipper/blob/main/clipper/documentary.py"
click node_explainer "https://github.com/deanmeiring/clipper/blob/main/clipper/explainer.py"
click node_visuals "https://github.com/deanmeiring/clipper/blob/main/clipper/visual_sources.py"
click node_beats "https://github.com/deanmeiring/clipper/blob/main/clipper/longform_beats.py"
click node_longrender "https://github.com/deanmeiring/clipper/blob/main/clipper/longform_video.py"
click node_promo "https://github.com/deanmeiring/clipper/blob/main/clipper/longform_promo.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_cli,node_webapp toneBlue
class node_download,node_vod,node_transcribe,node_loud,node_select,node_reframe,node_captions,node_render toneAmber
class node_discovery,node_analytics,node_strategy toneMint
class node_upload toneRose
class node_documentary,node_explainer,node_visuals,node_beats,node_longrender,node_promo,node_user,node_source,node_clipoutput toneIndigo
```

## Components

### User entry points

- [CLI](https://github.com/deanmeiring/clipper/blob/main/clipper/cli.py): `clipper/cli.py`
- [Web app](https://github.com/deanmeiring/clipper/blob/main/webapp/main.py): `webapp/main.py`

### Short clip pipeline

- [Download video](https://github.com/deanmeiring/clipper/blob/main/clipper/download.py): `clipper/download.py`
- [Long VOD windows](https://github.com/deanmeiring/clipper/blob/main/clipper/long_vod.py): `clipper/long_vod.py`
- [Transcription](https://github.com/deanmeiring/clipper/blob/main/clipper/transcribe.py): `clipper/transcribe.py`
- [Loud moments](https://github.com/deanmeiring/clipper/blob/main/clipper/loud_moments.py): `clipper/loud_moments.py`
- [Moment selection](https://github.com/deanmeiring/clipper/blob/main/clipper/select_moments.py): `clipper/select_moments.py`
- [Layout detection](https://github.com/deanmeiring/clipper/blob/main/clipper/reframe.py): `clipper/reframe.py`
- [Caption generation](https://github.com/deanmeiring/clipper/blob/main/clipper/captions.py): `clipper/captions.py`
- [Clip rendering](https://github.com/deanmeiring/clipper/blob/main/clipper/render.py): `clipper/render.py`

### Discovery and learning

- [Creator discovery](https://github.com/deanmeiring/clipper/blob/main/clipper/trending.py): `clipper/trending.py`
- [Channel insights](https://github.com/deanmeiring/clipper/blob/main/clipper/channel_insights.py): `clipper/channel_insights.py`
- [Channel strategy](https://github.com/deanmeiring/clipper/blob/main/clipper/channel_strategy.py): `clipper/channel_strategy.py`

### Publishing

- [YouTube upload](https://github.com/deanmeiring/clipper/blob/main/clipper/youtube_upload.py): `clipper/youtube_upload.py`

### Long-form production

- [Documentary research](https://github.com/deanmeiring/clipper/blob/main/clipper/documentary.py): `clipper/documentary.py`
- [Explainer scripts](https://github.com/deanmeiring/clipper/blob/main/clipper/explainer.py): `clipper/explainer.py`
- [Visual sourcing](https://github.com/deanmeiring/clipper/blob/main/clipper/visual_sources.py): `clipper/visual_sources.py`
- [Keyword visuals](https://github.com/deanmeiring/clipper/blob/main/clipper/longform_beats.py): `clipper/longform_beats.py`
- [Long-form rendering](https://github.com/deanmeiring/clipper/blob/main/clipper/longform_video.py): `clipper/longform_video.py`
- [Promo Shorts](https://github.com/deanmeiring/clipper/blob/main/clipper/longform_promo.py): `clipper/longform_promo.py`

### Other components

- **Creator**
- **Video source**
- **Clips and metadata**

## Connections

- Creator → CLI: runs (evidence: `README.md`)
- Creator → Web app: uses (evidence: `README.md`)
- CLI → Download video: starts pipeline (evidence: `README.md`)
- Web app → Download video: starts pipeline (evidence: `README.md`)
- Video source → Download video: downloads (evidence: `README.md`)
- Long VOD windows → Download video: selective downloads (evidence: `clipper/long_vod.py`)
- Download video → Transcription: provides video (evidence: `README.md`)
- Transcription → Moment selection: provides transcript (evidence: `README.md`)
- Moment selection → Loud moments: uses signal (evidence: `clipper/select_moments.py`)
- Moment selection → Transcription: refines word cuts (evidence: `clipper/select_moments.py`)
- Moment selection → Layout detection: sets clip layout
- Layout detection → Clip rendering: provides layout (evidence: `clipper/render.py`)
- Moment selection → Caption generation: provides clip timing
- Caption generation → Clip rendering: provides subtitles (evidence: `clipper/render.py`)
- Clip rendering → Clips and metadata: writes clips (evidence: `README.md`)
- Creator discovery → Web app: supports discovery
- Channel insights → Channel strategy: informs strategy
- Channel insights → Moment selection: guides selection (evidence: `README.md`)
- Channel strategy → Moment selection: guides selection (evidence: `README.md`)
- Web app → YouTube upload: offers posting (evidence: `README.md`)
- Web app → Documentary research: starts series (evidence: `README.md`)
- Documentary research → Visual sourcing: plans visuals (evidence: `clipper/documentary.py`)
- Documentary research → Keyword visuals: plans cues (evidence: `clipper/documentary.py`)
- Explainer scripts → Visual sourcing: sources visuals (evidence: `clipper/explainer.py`)
- Visual sourcing → Keyword visuals: supplies assets (evidence: `clipper/longform_beats.py`)
- Keyword visuals → Long-form rendering: renders scenes (evidence: `clipper/longform_video.py`)
- Documentary research → Long-form rendering: provides scenes (evidence: `clipper/longform_video.py`)
- Documentary research → Promo Shorts: plans promotions (evidence: `clipper/longform_promo.py`)
- Long-form rendering → YouTube upload: supports publishing
