An advanced YouTube video archiving and audio processing system with intelligent music blending capabilities. Starchive combines automated video downloading with sophisticated audio manipulation tools for creating mashups and analyzing music.
make sure to run:
python3 -m pip install -U yt-dlp
often because there are new updates almost every day.
- Automatic YouTube Archiving: Browser extension automatically downloads videos when visited
- Multi-format Support: Downloads video (MP4), audio (WAV), subtitles (VTT), thumbnails, and metadata (JSON)
- Vocal Separation: Extracts instrumental and vocal tracks using UVR (Ultimate Vocal Remover)
- Audio Analysis: BPM detection, key analysis, and beat detection
- Interactive Blend Shell: Real-time audio mixing interface for creating mashups
- Intelligent Matching: Automatic BPM and key matching with pitch/tempo adjustments
- Sync Technology: Precise audio synchronization using rubberband for seamless blending
- Segment-based Editing: Split tracks into segments with gap detection and smart placement
- Conflict Detection: Prevents vocal overlaps and ensures clean audio blending
starchive <command> [args]
Commands:
run Start the web server for browser extension
ls List downloaded files with metadata
dl Download video by YouTube ID
vocal Extract vocal/instrumental tracks
bpm Analyze BPM and musical key
sync Synchronize audio files for mashups
split Split audio by silence detection
blend Interactive audio blending shell
play Play audio files with keyboard controls
demo Create 30-second preview clips
rm Remove files by video ID
retry Retry failed downloads
- Web Server (
web/
): HTTP API on port 3009 for browser extension - Media Processing (
media/
): YouTube download and subtitle processing - Audio Engine (
audio/
,blend/
): Advanced audio processing and blending - Database (
util/database.go
): SQLite storage for metadata and blend history - Command Handlers (
command_handlers*.go
): CLI command implementations
- Auto-detection: Monitors YouTube visits and triggers downloads
- Background Processing: Queues downloads without interrupting browsing
- Manual Interface: Popup for direct video ID input
- Download: yt-dlp fetches video/audio/metadata
- Conversion: ffmpeg extracts WAV audio
- Separation: UVR splits vocals/instrumentals
- Analysis: Python scripts analyze BPM and musical key
- Blending: Interactive shell for creating mashups
- Go (1.19+)
- Python 3.13 with virtual environment (included in
uvr/
) - yt-dlp: Video downloading
- ffmpeg: Audio/video processing
- rubberband: Audio time-stretching
- Ultimate Vocal Remover: AI vocal separation
- Install dependencies: Ensure yt-dlp, ffmpeg, and rubberband are in PATH
- Build:
go build
- Run server:
./starchive run
- Load extension: Add
firefox/
directory to Firefox as temporary extension - Start blending:
./starchive blend
for interactive audio mixing
- Data Storage: Files saved to
./data/
directory - Download Options: Use
--download-videos=false
to skip video files - Cookies: Place
cookies.txt
in root for private video access
The interactive blend shell supports sophisticated audio manipulation:
- Track Loading: Load two tracks for mixing
- Parameter Control: Adjust volume, pitch, tempo, and positioning
- Smart Matching: Automatic BPM/key alignment
- Real-time Preview: Live audio playback with modifications
- Export Options: Save blended results with detailed metadata
- Gap Analysis: Finds optimal placement points in instrumental tracks
- Beat Quantization: Snaps audio segments to musical beats
- Energy Matching: Balances vocal and instrumental energy levels
- Conflict Avoidance: Prevents vocal overlaps in mashups
starchive/
├── main.go # CLI entry point and command dispatch
├── blend/ # Audio blending engine
├── audio/ # Core audio processing
├── media/ # YouTube download and conversion
├── web/ # HTTP server and browser extension API
├── util/ # Database, file utilities, and helpers
├── firefox/ # Browser extension components
├── data/ # Primary download storage
└── uvr/ # Python virtual env for vocal separation
- yt-dlp: YouTube video downloading
- ffmpeg: Audio/video conversion and processing
- rubberband: High-quality audio time-stretching
- Ultimate Vocal Remover: AI-powered vocal/instrumental separation
- Go modules: See
go.mod
for complete dependency list - Python packages: Audio analysis and processing (isolated in
uvr/
)
This project is not associated with https://www.starchive.io/