How surfcanarias/youtube-to-mp3 works
This is a YouTube-to-MP3 downloader and music manager. A user starts either the GUI or CLI, submits a YouTube URL, and the downloader retrieves media through yt-dlp, invokes FFmpeg conversion, and writes MP3 files. Optional metadata enrichment queries artwork and lyrics services, then embeds ID3 tags. The GUI reports progress and also supports editing existing MP3 metadata. The graph reflects sampled runtime code plus README-documented integrations; unsampled GUI details are represented only where their enclosing paths are explicit.
Components 16
Entry Points
- GUI Launcher
main.py - CLI Wrapper
youtubedl.py
Download Conversion
- Downloader Engine
core/downloader.py - YouTube Service
- FFmpeg Encoder
- MP3 Files
Metadata Enrichment
- Metadata Pipeline
core/metadata.py - iTunes Artwork
- YouTube Thumbnails
- LrcLib Lyrics
- SyncedLyrics Fallback
- ID3 Tagger
core/metadata.py
User Interface
- GUI Application
gui/app.py - Progress Widgets
gui/components.py - Metadata Editor
gui/app.py
Other components
- User
Connections 23
- User → GUI Launcher: launches
- User → CLI Wrapper: runs CLI
- GUI Launcher → GUI Application: launches GUI
- CLI Wrapper → GUI Application: dispatches GUI
- CLI Wrapper → Downloader Engine: starts download
- GUI Application → Downloader Engine: starts download
- Downloader Engine → YouTube Service: downloads media
- Downloader Engine → FFmpeg Encoder: invokes conversion
- Downloader Engine → MP3 Files: writes MP3
- Downloader Engine → GUI Application: reports progress
- GUI Application → Progress Widgets: updates display
- CLI Wrapper → Metadata Pipeline: requests metadata
- GUI Application → Metadata Pipeline: requests metadata
- Metadata Pipeline → iTunes Artwork: searches artwork
- Metadata Pipeline → YouTube Thumbnails: loads thumbnails
- Metadata Pipeline → LrcLib Lyrics: searches lyrics
- Metadata Pipeline → SyncedLyrics Fallback: falls back
- Metadata Pipeline → ID3 Tagger: embeds tags
- ID3 Tagger → MP3 Files: writes ID3
- Metadata Editor → MP3 Files: reads MP3
- Metadata Editor → Metadata Pipeline: fetches metadata
- Metadata Editor → ID3 Tagger: saves tags
- GUI Application → Metadata Editor: opens editor