# rayzoc24/yt-editing-pipeline architecture

> Architecture diagram of the GitHub repository rayzoc24/yt-editing-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rayzoc24/yt-editing-pipeline
- Repository: https://github.com/rayzoc24/yt-editing-pipeline

## Overview

YT Pipeline turns local recordings into edited long-form or Shorts exports, captions, and transcripts. Users can submit one file, process the raw folder, or run a polling watcher; all paths converge on the pipeline coordinator, which conditionally removes silence, enhances audio, generates subtitles, exports the selected format, and archives the source. The graph includes the documented transcript and caption outputs and Hinglish support. Edges follow shown imports and calls; unsampled implementation details are represented only where the README documents the capability.

Main entry points: [`scripts/pipeline.py`](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/pipeline.py) (Pipeline Coordinator), [`scripts/subtitle_generator.py`](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py) (Subtitle Generation), [`scripts/ffmpeg_utils.py`](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/ffmpeg_utils.py) (FFmpeg Tools), [`raw`](https://github.com/rayzoc24/yt-editing-pipeline/tree/main/raw) (Raw Recordings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Input &amp; Control"]
  node_raw_recordings["Raw Recordings"]
  node_cli["CLI &amp; Batch<br/>[process.py]"]
  node_folder_watcher["Folder Watcher<br/>[watcher.py]"]
  node_coordinator["Pipeline Coordinator<br/>[pipeline.py]"]
  node_out_files["Edited Exports"]
  node_archive["Processed Archive"]
end

subgraph group_editing["Audio &amp; Video Editing"]
  node_silence_cut["Silence Removal<br/>[silence_remover.py]"]
  node_audio_cleanup["Audio Enhancement<br/>[audio_enhancer.py]"]
  node_exporter["Format Export"]
end

subgraph group_captions["Captions &amp; Language"]
  node_subtitle_gen["Subtitle Generation"]
  node_hinglish["Hinglish Transliteration<br/>[hinglish_utils.py]"]
  node_transcription["Speech Transcription"]
  node_caption_files["ASS / SRT Captions"]
  node_transcript_file["Plain Transcript"]
end

subgraph group_runtime["Media Runtime"]
  node_ffmpeg["FFmpeg Tools<br/>[ffmpeg_utils.py]"]
  node_ffmpeg_service["FFmpeg / FFprobe"]
  node_speech_service["Speech Recognition Service"]
end

node_creator(("Video Creator"))

node_creator -->|"saves recording"| node_raw_recordings
node_raw_recordings -->|"scans for videos"| node_folder_watcher
node_raw_recordings -->|"selects files"| node_cli
node_cli -->|"processes videos"| node_coordinator
node_folder_watcher -->|"processes ready files"| node_coordinator
node_coordinator -->|"removes silence"| node_silence_cut
node_coordinator -->|"enhances audio"| node_audio_cleanup
node_coordinator -->|"generates captions"| node_subtitle_gen
node_subtitle_gen -->|"transcribes speech"| node_transcription
node_transcription -->|"transliterates Hindi"| node_hinglish
node_transcription -.->|"recognizes speech"| node_speech_service
node_subtitle_gen -->|"writes captions"| node_caption_files
node_subtitle_gen -->|"writes transcript"| node_transcript_file
node_coordinator -->|"exports format"| node_exporter
node_exporter -->|"writes outputs"| node_out_files
node_coordinator -->|"moves source"| node_archive
node_silence_cut -->|"runs media commands"| node_ffmpeg
node_audio_cleanup -->|"runs media commands"| node_ffmpeg
node_subtitle_gen -->|"probes and renders"| node_ffmpeg
node_ffmpeg -->|"invokes tools"| node_ffmpeg_service

click node_raw_recordings "https://github.com/rayzoc24/yt-editing-pipeline/tree/main/raw"
click node_cli "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/process.py"
click node_folder_watcher "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/watcher.py"
click node_coordinator "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/pipeline.py"
click node_silence_cut "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/silence_remover.py"
click node_audio_cleanup "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/audio_enhancer.py"
click node_subtitle_gen "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py"
click node_hinglish "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/hinglish_utils.py"
click node_transcription "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py"
click node_caption_files "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py"
click node_transcript_file "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py"
click node_exporter "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py"
click node_ffmpeg "https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/ffmpeg_utils.py"
click node_out_files "https://github.com/rayzoc24/yt-editing-pipeline/tree/main/out"
click node_archive "https://github.com/rayzoc24/yt-editing-pipeline/tree/main/raw/processed"

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_raw_recordings,node_cli,node_folder_watcher,node_coordinator,node_out_files,node_archive toneBlue
class node_silence_cut,node_audio_cleanup,node_exporter toneAmber
class node_subtitle_gen,node_hinglish,node_transcription,node_caption_files,node_transcript_file toneMint
class node_ffmpeg,node_ffmpeg_service,node_speech_service toneRose
class node_creator toneIndigo
```

## Components

### Input & Control

- [Raw Recordings](https://github.com/rayzoc24/yt-editing-pipeline/tree/main/raw): `raw`
- [CLI & Batch](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/process.py): `scripts/process.py`
- [Folder Watcher](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/watcher.py): `scripts/watcher.py`
- [Pipeline Coordinator](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/pipeline.py): `scripts/pipeline.py`
- [Edited Exports](https://github.com/rayzoc24/yt-editing-pipeline/tree/main/out): `out`
- [Processed Archive](https://github.com/rayzoc24/yt-editing-pipeline/tree/main/raw/processed): `raw/processed`

### Audio & Video Editing

- [Silence Removal](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/silence_remover.py): `scripts/silence_remover.py`
- [Audio Enhancement](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/audio_enhancer.py): `scripts/audio_enhancer.py`
- [Format Export](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py): `scripts/subtitle_generator.py`

### Captions & Language

- [Subtitle Generation](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py): `scripts/subtitle_generator.py`
- [Hinglish Transliteration](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/hinglish_utils.py): `scripts/hinglish_utils.py`
- [Speech Transcription](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py): `scripts/subtitle_generator.py`
- [ASS / SRT Captions](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py): `scripts/subtitle_generator.py`
- [Plain Transcript](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/subtitle_generator.py): `scripts/subtitle_generator.py`

### Media Runtime

- [FFmpeg Tools](https://github.com/rayzoc24/yt-editing-pipeline/blob/main/scripts/ffmpeg_utils.py): `scripts/ffmpeg_utils.py`
- **FFmpeg / FFprobe**
- **Speech Recognition Service**

### Other components

- **Video Creator**

## Connections

- Video Creator → Raw Recordings: saves recording (evidence: `README.MD`)
- Raw Recordings → Folder Watcher: scans for videos (evidence: `scripts/watcher.py`)
- Raw Recordings → CLI & Batch: selects files (evidence: `scripts/process.py`)
- CLI & Batch → Pipeline Coordinator: processes videos (evidence: `scripts/process.py`)
- Folder Watcher → Pipeline Coordinator: processes ready files (evidence: `scripts/watcher.py`)
- Pipeline Coordinator → Silence Removal: removes silence (evidence: `scripts/pipeline.py`)
- Pipeline Coordinator → Audio Enhancement: enhances audio (evidence: `scripts/pipeline.py`)
- Pipeline Coordinator → Subtitle Generation: generates captions (evidence: `scripts/pipeline.py`)
- Subtitle Generation → Speech Transcription: transcribes speech (evidence: `scripts/subtitle_generator.py`)
- Speech Transcription → Hinglish Transliteration: transliterates Hindi (evidence: `scripts/subtitle_generator.py`)
- Speech Transcription → Speech Recognition Service: recognizes speech
- Subtitle Generation → ASS / SRT Captions: writes captions (evidence: `scripts/subtitle_generator.py`)
- Subtitle Generation → Plain Transcript: writes transcript (evidence: `README.MD`)
- Pipeline Coordinator → Format Export: exports format (evidence: `scripts/pipeline.py`)
- Format Export → Edited Exports: writes outputs
- Pipeline Coordinator → Processed Archive: moves source (evidence: `scripts/pipeline.py`)
- Silence Removal → FFmpeg Tools: runs media commands (evidence: `scripts/silence_remover.py`)
- Audio Enhancement → FFmpeg Tools: runs media commands (evidence: `scripts/audio_enhancer.py`)
- Subtitle Generation → FFmpeg Tools: probes and renders (evidence: `scripts/subtitle_generator.py`)
- FFmpeg Tools → FFmpeg / FFprobe: invokes tools (evidence: `scripts/ffmpeg_utils.py`)
