How rishijawale/youtube-shorts-clipper works
YouTube Shorts Highlight Clipper is a local CLI that turns a YouTube URL into one or more vertical highlight videos. Its main workflow retrieves video metadata and replay heatmap data, selects highlight timestamps (with manual time overrides), downloads segments, optionally prepares captions, then formats and exports clips. Captioning supports YouTube subtitles and local Whisper transcription; framing supports blur, crop, and fit, with hardware-accelerated encoding when available. The source excerpt is partial, so detailed internal call relationships are shown only where the README documents the workflow.
Main entry points: clipper.py CLI orchestration
Components 16
Clip workflow
- CLI orchestration
scripts/clipper.py - Video metadata
scripts/clipper.py - Replay heatmap
scripts/clipper.py - Peak detection
scripts/clipper.py - Audio fallback
scripts/clipper.py - Segment download
scripts/clipper.py
Captioning
- Subtitle retrieval
scripts/clipper.py - VTT parsing and chunking
scripts/clipper.py - Whisper transcription
scripts/clipper.py - ASS caption generation
scripts/clipper.py
Video rendering
- Vertical framing
scripts/clipper.py - Video encoding
scripts/clipper.py - Exported MP4
scripts/clipper.py
Other components
- CLI user
- YouTube / yt-dlp
- FFmpeg
Connections 21
- CLI user → CLI orchestration: provides URL and options
README.md - CLI orchestration → Video metadata: requests metadata
README.md - Video metadata → YouTube / yt-dlp: retrieves data
README.md - Video metadata → Replay heatmap: provides heatmap
README.md - CLI orchestration → Peak detection: selects highlights
README.md - Replay heatmap → Peak detection: supplies replay data
README.md - CLI orchestration → Audio fallback: uses fallback
scripts/clipper.py - CLI orchestration → Segment download: downloads segments
README.md - Segment download → YouTube / yt-dlp: fetches video
README.md - CLI orchestration → Subtitle retrieval: fetches subtitles
README.md - Subtitle retrieval → YouTube / yt-dlp: retrieves VTT
README.md - Subtitle retrieval → VTT parsing and chunking: provides subtitle cues
README.md - VTT parsing and chunking → ASS caption generation: writes captions
README.md - CLI orchestration → Whisper transcription: transcribes when needed
README.md - Whisper transcription → ASS caption generation: writes captions
README.md - CLI orchestration → Vertical framing: selects framing mode
README.md - Segment download → Vertical framing: provides video segment
README.md - Vertical framing → Video encoding: sends filtered video
README.md - ASS caption generation → Video encoding: burns in captions
README.md - Video encoding → FFmpeg: encodes video
README.md - Video encoding → Exported MP4: exports clip
README.md