Spaces:
Paused
Paused
better music-downloader Skill, reduces context bloat by 60%
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299---name: music-downloaderdescription: This skill should be used when users need to download audio or music from online platforms like YouTube, SoundCloud, Spotify, or other streaming services. It provides yt-dlp and spotdl command templates for high-quality audio extraction, playlist downloads, metadata embedding, and multi-platform support.---# Music Downloader## OverviewThis skill enables downloading high-quality audio from various platforms (YouTube, SoundCloud, Spotify, etc.) using yt-dlp and spotdl. It provides command templates for single tracks, playlists, albums, and advanced features like metadata embedding, thumbnail extraction, and format conversion.If the user did not provide a specific link to a song or playlist, you must search the web using tools in your environment to find what the user is looking for.When using the `Web_Search` tool, set the Search Type to `videos` and prefer official YouTube links.## When to Use This SkillUse this skill when users request:- Downloading audio/music from YouTube, SoundCloud, Spotify, or other platforms- Extracting audio from videos in MP3, Opus, or other formats- Downloading entire playlists or albums- High-quality audio with metadata and album art- Batch downloading multiple tracks- Converting video content to audio files## Quick Start**Most Common Use Case - Download MP3 from YouTube:**```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s" "VIDEO_URL"```**Download from Spotify:**```bashspotdl --audio-quality 320k --embed-metadata --output "{artist}/{title}.{ext}" "SPOTIFY_TRACK_URL"```**Note:** If you encounter issues, try downloading or updating yt-dlp via pip: `pip install --upgrade yt-dlp`## General Commands## List Available Formats```bashyt-dlp -F "URL"```## Download MP3 at Max Quality```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --postprocessor-args "-b:a 320k" -o "%(title)s.%(ext)s" "https://www.youtube.com/watch?v=xYJki23aeTQ&ab_channel=OnlyRealHipHop49"```## Basic High-Quality MP3 Download```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s" "VIDEO_URL"```## Download Custom Bitrate```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --postprocessor-args "-b:a 192k" -o "%(title)s.%(ext)s" "VIDEO_URL"```## Download and add Metadata Tags```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-metadata -o "%(title)s.%(ext)s" "VIDEO_URL"```## Download Entire Playlist```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(playlist_title)s/%(title)s.%(ext)s" "PLAYLIST_URL"```## Download Playlist (Specific Range)```bashyt-dlp --playlist-items 1-5 -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(playlist_title)s/%(title)s.%(ext)s" "PLAYLIST_URL"```## Download HQ from SoundCloud```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Embed Album Art Automatically```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --embed-thumbnail --audio-quality 0 -o "%(title)s.%(ext)s" "VIDEO_URL"```## Download Specific Formats*Opus instead of MP3*```bashyt-dlp -f bestaudio --extract-audio --audio-format opus -o "%(title)s.%(ext)s" "VIDEO_URL"```## Skip Already Downloaded Files```bashyt-dlp --download-archive "downloaded.txt" -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s" "VIDEO_URL"```## Download Multiple Individual Files```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --add-metadata --embed-thumbnail --write-description --postprocessor-args "-b:a 320k" -o "%(title)s.%(ext)s" "https://www.youtube.com/watch?v=xYJki23aeTQ&ab_channel=OnlyRealHipHop49" "https://www.youtube.com/watch?v=xKJaew2gMSo&ab_channel=OnlyRealHipHop49" "https://www.youtube.com/watch?v=zLJkO3RnWUk&ab_channel=OnlyRealHipHop49"```## Download and Automatically Split by Chapters```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --split-chapters -o "%(title)s.%(ext)s" "VIDEO_URL"```## Extract Only a Portion of a Video (by Time)```bashyt-dlp -f bestvideo+bestaudio --external-downloader ffmpeg --external-downloader-args "ffmpeg_i:-ss 00:01:00 -to 00:05:00" -o "%(title)s.%(ext)s" "VIDEO_URL"```## Update Metadata of Existing Files```bashyt-dlp --download-archive "downloaded.txt" --skip-download --embed-metadata --embed-thumbnail --write-description "VIDEO_URL"```## Auto-Rename Duplicate Files```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --force-overwrites -o "%(title)s.%(ext)s" "VIDEO_URL"```## Download from a URL List File```bashyt-dlp -a "urls.txt" -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s"```## Download and Limit Download Speed```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --rate-limit 1M -o "%(title)s.%(ext)s" "VIDEO_URL"```## Download from Vimeo```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "Vimeo/%(uploader)s - %(title)s.%(ext)s" "VIMEO_VIDEO_URL"```## Download from Facebook```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "Facebook/%(uploader)s - %(title)s.%(ext)s" "FACEBOOK_VIDEO_URL"```## Download from Instagram```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "Instagram/%(uploader)s - %(title)s.%(ext)s" "INSTAGRAM_VIDEO_URL"```## Download from Twitter```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "Twitter/%(uploader)s - %(title)s.%(ext)s" "TWITTER_VIDEO_URL"```## Download from TikTok```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "TikTok/%(uploader)s - %(title)s.%(ext)s" "TIKTOK_VIDEO_URL"```## Download from Reddit```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "Reddit/%(uploader)s - %(title)s.%(ext)s" "REDDIT_VIDEO_URL"```## Download from Dailymotion```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "Dailymotion/%(uploader)s - %(title)s.%(ext)s" "DAILYMOTION_VIDEO_URL"```## Download YouTube Transcript as Text```bashyt-dlp --write-auto-subs --sub-lang en --skip-download -o "%(title)s.%(ext)s" "VIDEO_URL"```## Download YouTube Transcript as Markdown```bashyt-dlp --write-auto-subs --sub-lang en --skip-download --convert-subs srt -o "%(title)s.md" "VIDEO_URL"```## Download Video Info and Save as JSON```bashyt-dlp --write-info-json --skip-download -o "%(title)s.json" "VIDEO_URL"```## List Available Formats without Downloading```bashyt-dlp -F "VIDEO_URL"```## Download from YouTube Age-Restricted Content```bashyt-dlp --username "YOUR_YOUTUBE_EMAIL" --password "YOUR_PASSWORD" -f bestvideo+bestaudio -o "%(title)s.%(ext)s" "AGE_RESTRICTED_VIDEO_URL"```---# SoundCloud Commands## List Available Formats```bashyt-dlp -F "URL"```## Download High-Quality MP3 from SoundCloud```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Download HQ with Metadata from SoundCloud```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-metadata -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Download Entire Playlist from SoundCloud```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "SoundCloud/%(playlist_title)s/%(title)s.%(ext)s" "SOUNDCLOUD_PLAYLIST_URL"```## Download Entire Playlist from SoundCloud with Metadata```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-metadata --add-metadata --embed-thumbnail -o "%(playlist_title)s/%(title)s.%(ext)s" "SOUNDCLOUD_PLAYLIST_URL"```## Download Multiple Playlists with Metadata```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-metadata --add-metadata --embed-thumbnail -o "SoundCloud/%(playlist_title)s/%(title)s.%(ext)s" "x" "x" "x" "x" "x" "x" "x"```## Download Playlist with Specific Range```bashyt-dlp --playlist-items 1-5 -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "SoundCloud/%(playlist_title)s/%(title)s.%(ext)s" "SOUNDCLOUD_PLAYLIST_URL"```## Download and Embed Album Art```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-thumbnail -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Skip Downloading Already Downloaded SoundCloud Files```bashyt-dlp --download-archive "downloaded_soundcloud.txt" -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Download Multiple Tracks from SoundCloud```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL_1" "SOUNDCLOUD_TRACK_URL_2" "SOUNDCLOUD_TRACK_URL_3"```## Limit Download Speed for SoundCloud```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --rate-limit 1M -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Download from SoundCloud and Split by Chapters (if available)```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --split-chapters -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Download SoundCloud Track and Extract a Specific Portion```bashyt-dlp -f bestaudio --external-downloader ffmpeg --external-downloader-args "ffmpeg_i:-ss 00:01:00 -to 00:05:00" -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Update Metadata of Existing SoundCloud Downloads```bashyt-dlp --download-archive "downloaded_soundcloud.txt" --skip-download --embed-metadata --embed-thumbnail "SOUNDCLOUD_TRACK_URL"```## Auto-Rename Duplicate SoundCloud Files```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --force-overwrites -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s" "SOUNDCLOUD_TRACK_URL"```## Download from SoundCloud URL List File```bashyt-dlp -a "soundcloud_urls.txt" -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "SoundCloud/%(uploader)s - %(title)s.%(ext)s"```---# SpotifyDL Commands## Download Single Song```bashspotdl --audio-quality 320k --embed-metadata --output "{artist}/{title}.{ext}" "SPOTIFY_TRACK_URL"```## Download Entire Playlist```bashspotdl --playlist "SPOTIFY_PLAYLIST_URL" --audio-quality 320k --embed-metadata --output "{playlist}/{title}.{ext}"```## Download Entire Album```bashspotdl --album "SPOTIFY_ALBUM_URL" --audio-quality 320k --embed-metadata --output "{album}/{title}.{ext}"```## Download Multiple Albums & Playlists at Once```bashspotdl --playlist "SPOTIFY_PLAYLIST_URL1" "SPOTIFY_PLAYLIST_URL2" --audio-quality 320k --embed-metadata --output "{playlist}/{title}.{ext}"spotdl --album "SPOTIFY_ALBUM_URL1" "SPOTIFY_ALBUM_URL2" --audio-quality 320k --embed-metadata --output "{album}/{title}.{ext}"```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118---name: music-downloaderdescription: Download audio/music from YouTube, SoundCloud, and 1000+ other platforms using yt-dlp. Use when users request downloading songs, extracting audio from videos, downloading playlists/albums, or converting video to MP3/audio formats.---# Music DownloaderDownloads audio from online platforms using yt-dlp. Works with YouTube, SoundCloud, Vimeo, TikTok, Instagram, Twitter, Facebook, Dailymotion, and 1000+ other sites.## Workflow1. **No URL provided?** → Use `Web_Search` tool (set search type to `videos`, prefer official YouTube links)2. **Determine scope** → Single track, playlist, or batch3. **Run command** → See patterns below4. **Verify download** → Check file exists and has reasonable size## Command PatternAll yt-dlp audio downloads follow this structure:```bashyt-dlp [FLAGS] -o "OUTPUT_TEMPLATE" "URL"```### Core Flags| Flag | Purpose | Recommendation ||------|---------|----------------|| `-f bestaudio` | Select best audio stream | Always include || `--extract-audio` | Extract audio from video | Always include || `--audio-format mp3` | Output format (mp3/opus/m4a/wav) | mp3 for compatibility || `--audio-quality 0` | Quality (0=best, 9=worst) | 0 || `--embed-metadata` | Add title/artist/etc. tags | Recommended || `--embed-thumbnail` | Add album art | Recommended || `--postprocessor-args "-b:a 320k"` | Force specific bitrate | Optional |### Output Templates| Template | Use Case ||----------|----------|| `%(title)s.%(ext)s` | Single track || `%(playlist_title)s/%(title)s.%(ext)s` | Playlist (creates folder) || `%(uploader)s - %(title)s.%(ext)s` | Include artist name |## Common Commands### Standard HQ Download```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s" "URL"```### With Metadata + Album Art```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-metadata --embed-thumbnail -o "%(title)s.%(ext)s" "URL"```### Max Quality (320kbps forced)```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --postprocessor-args "-b:a 320k" -o "%(title)s.%(ext)s" "URL"```### Download Playlist```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-metadata -o "%(playlist_title)s/%(title)s.%(ext)s" "PLAYLIST_URL"```### Playlist (Specific Range)```bashyt-dlp --playlist-items 1-5 -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(playlist_title)s/%(title)s.%(ext)s" "PLAYLIST_URL"```### Multiple Individual URLs```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --embed-metadata --embed-thumbnail -o "%(title)s.%(ext)s" "URL1" "URL2" "URL3"```### From URL List File```bashyt-dlp -a "urls.txt" -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s"```### Split by Chapters (for compilations)```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 --split-chapters -o "%(title)s.%(ext)s" "URL"```### Extract Time Segment```bashyt-dlp -f bestaudio --extract-audio --audio-format mp3 --external-downloader ffmpeg --external-downloader-args "ffmpeg_i:-ss 00:01:00 -to 00:05:00" -o "%(title)s.%(ext)s" "URL"```### Skip Already Downloaded```bashyt-dlp --download-archive "downloaded.txt" -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s" "URL"```## Troubleshooting| Error | Fix ||-------|-----|| `yt-dlp: command not found` | `pip install yt-dlp --break-system-packages` || `ffmpeg not found` | `apt install ffmpeg` || 403 Forbidden / Unable to download | `pip install --upgrade yt-dlp --break-system-packages` || Rate limited (429) | Add `--sleep-interval 5` to command || Geo-restricted | Add `--geo-bypass` to command || File exists | Add `--force-overwrites` or `--no-overwrites` |### Age-Restricted Content```bashyt-dlp --cookies-from-browser chrome -f bestaudio --extract-audio --audio-format mp3 "URL"```### Debug / Check Formats```bashyt-dlp -F "URL" # List available formatsyt-dlp -v "URL" # Verbose outputyt-dlp --version # Check version```
Filesystem/Skills/music-downloader/SKILL.md+60-241