How drunktrader/lazy_clipper works
LazyClipper turns a submitted YouTube URL into a reusable project, transcript, and ranked moments; a user then explicitly requests selected moments as captioned vertical clips. The frontend reviews project status and results while the backend coordinates ingestion, analysis, persistence, and rendering. The graph combines sampled calls and imports with README-documented capabilities; some route-to-worker dispatch details are not visible in the excerpts and are omitted.
Main entry points: pipeline.py Processing pipeline · App.tsx Workspace UI · llm.py LLM analysis · routes.py Project API
Components 20
Project workspace
- Workspace UI
frontend/src/App.tsx - API client
frontend/src/api.ts - YouTube player
API and persistence
- Project API
backend/app/api/routes.py - FastAPI runtime
backend/app/main.py - Database setup
backend/app/db.py - Project records
backend/app/models.py - Project database
Media processing
- Processing pipeline
backend/app/services/pipeline.py - YouTube ingestion
backend/app/services/youtube.py - Media operations
backend/app/services/media.py - Caption rendering
backend/app/services/captions.py
Transcript and analysis
- Speech transcription
backend/app/services/transcription.py - Transcript analysis
backend/app/analysis/transcript.py - Moment scoring
backend/app/analysis/moments.py - LLM analysis
backend/app/services/llm.py
Other components
- User
- FFmpeg
- YouTube
- LLM gateway
Connections 21
- User → Workspace UI: uses
README.md - Workspace UI → API client: requests
frontend/src/App.tsx - API client → Project API: calls
frontend/src/api.ts - Workspace UI → YouTube player: plays original
README.md - FastAPI runtime → Project API: mounts
backend/app/main.py - FastAPI runtime → Processing pipeline: registers runners
backend/app/main.py - Database setup → Project records: registers tables
backend/app/db.py - Database setup → Project database: creates engine
backend/app/db.py - Project API → Project records: queries records
backend/app/api/routes.py - Processing pipeline → Project records: loads and updates
backend/app/services/pipeline.py - Processing pipeline → YouTube ingestion: fetches source
backend/app/services/pipeline.py - YouTube ingestion → YouTube: retrieves video
README.md - Processing pipeline → Speech transcription: transcribes audio
backend/app/services/pipeline.py - Processing pipeline → Transcript analysis: chunks transcript
backend/app/services/pipeline.py - Processing pipeline → LLM analysis: analyzes chunks
backend/app/services/pipeline.py - LLM analysis → Moment scoring: scores candidates
backend/app/services/llm.py - LLM analysis → LLM gateway: sends prompts
backend/app/services/llm.py - Processing pipeline → Media operations: renders clips
backend/app/services/pipeline.py - Processing pipeline → Caption rendering: burns captions
backend/app/services/pipeline.py - Media operations → FFmpeg: processes media
README.md - Caption rendering → FFmpeg: burns subtitles
README.md