A modern, all-in-one Python tool to download audio (MP3, FLAC, M4A) and video (MP4) from YouTube and YouTube Music—with album art, smart file/folder naming, playlist support, lyrics saving, batch mode, and automatic metadata tagging.
- Download individual videos/music or full playlists
- Extract audio as MP3, FLAC, or M4A (your choice)
- Save videos as MP4 (best available quality)
- Embed YouTube cover art as album art for audio files
- Write artist, album, title, year, genre, and track numbers into tags
- Save lyrics/video descriptions as text files alongside your music
- Batch/playlist downloading, clean UX, automatic retries
- Works on Windows, macOS, Linux
Download Python if you don't have it.
Windows:
- Download ffmpeg build
- Unzip and add
binfolder to PATH - Verify:
ffmpeg -version
macOS:
brew install ffmpegLinux (Debian/Ubuntu):
sudo apt update && sudo apt install ffmpeggit clone https://github.com/aswinop/yt-downloader.git
cd yt-downloader
pip install -r requirements.txtrich– Beautiful CLI interfaceyt-dlp– YouTube download backendpyperclip– Clipboard detectionrequests– HTTP requestspillow– Image processingmutagen– Audio metadata editing
python downloader.py-
URL Input
- Automatically detects YouTube links in clipboard
- Or paste URL manually
- Or load multiple URLs from text file
-
Format Selection
- Audio: MP3, FLAC, or M4A
- Video: MP4 (best quality)
-
Output Folder
- Choose download location
- Default:
Downloads/folder
-
Playlist Support
- View all playlist entries
- Select specific tracks (e.g.,
1-3,5,7)
-
Download & Processing
- Progress bars with ETA
- Automatic retries on failure
- Metadata embedding
- Cover art extraction
-
Completion
- Summary table of all downloads
- Option to open download folder
- Batch mode for multiple downloads
🎵 YouTube & YouTube Music Downloader 🎬
═══════════════════════════════════════════════════════════════════════════════
🎯 Smart organization 📁 Playlist support 🎨 Cover art embedding
🏷️ Metadata tagging 📝 Lyrics saving 🔄 Batch processing
🔗 Enter YouTube URL
• Paste a YouTube/YouTube Music URL
• Type 'file' to load from text file
• Type 'q' to quit
URL (): https://youtu.be/abc123def456
📥 Download Type
🎵 audio - Music (MP3, FLAC, M4A) with metadata & cover art
🎬 video - Video (MP4) with subtitles
Choose type [video/audio] (video): video
📁 Output Folder
Files will be saved in: Downloads
Change folder (Downloads): MyVideos
🎯 Ready to download: https://youtu.be/abc123def456
🚀 Start download? [y/n] (y): y
⠴ 🎬 Downloading 1/1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:45
[download] Destination: MyVideos/Example Channel/Sample Video Title.f401.mp4
[download] Destination: MyVideos/Example Channel/Sample Video Title.f140.m4a
[Merger] Merging formats into "MyVideos/Example Channel/Sample Video Title.mp4"
🎉 Download Summary
┌─────────────────────────────────────────────────────────────────────────────┐
│ File: MyVideos/Example Channel/Sample Video Title.mp4 │
│ Type: Video Status: ✅ Success Size: 124.5 MB │
└─────────────────────────────────────────────────────────────────────────────┘
✅ Successfully downloaded 1 file(s)
📊 Total size: 124.5 MB
🔄 Download another batch? [y/n] (n): n
📂 Open download folder? [y/n] (y): y
🎊 All done! Happy watching! 🎬
Downloads/
├── Channel Name/
│ ├── Video Title.mp4
│ └── Video Title.txt (description)
└── Artist Name/
└── Album Name/
├── 01 - Song Title.flac
├── 01 - Song Title.txt (lyrics)
├── 02 - Song Title.flac
└── 02 - Song Title.txt (lyrics)
Audio Files:
- Embedded cover art from YouTube thumbnails
- ID3 tags (MP3) or Vorbis comments (FLAC)
- Track numbering for playlists
- Lyrics/descriptions saved as text files
Video Files:
- Best available MP4 quality
- Embedded subtitles (English)
- SponsorBlock segments removed
- Clean filenames
Playlists:
- Selective track downloading
- Maintains playback order
- Album metadata from playlist
No album art?
- YouTube may not provide high-quality thumbnails for some content
ffmpeg not found?
- Ensure ffmpeg is in your PATH:
ffmpeg -version
Installation issues?
- Try:
pip install --upgrade pip - Use virtual environment for clean installation
Download failures?
- Check internet connection
- Verify YouTube URL is accessible
- Some content may be region-restricted
MIT License - see LICENSE file for details.