$npx -y skills add isjiamu/jiamu-skills --skill video-downloaderDownload videos from 1000+ websites (YouTube, Bilibili, Twitter/X, TikTok, etc.) using yt-dlp. Use this skill when users provide video URLs and want to download videos, extract audio, or need help with video download issues.
| 1 | # Video Downloader |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Download videos from YouTube, Bilibili, Twitter/X, TikTok, and 1000+ other websites using yt-dlp. Supports multiple quality options, audio extraction, and automatic format selection. |
| 6 | |
| 7 | ## When to Use This Skill |
| 8 | |
| 9 | Invoke this skill when users: |
| 10 | - Provide a video URL and want to download it |
| 11 | - Ask to download videos from any website |
| 12 | - Want to extract audio from online videos |
| 13 | - Need to download videos in specific quality (1080p, 4K, etc.) |
| 14 | - Request help with video download issues |
| 15 | |
| 16 | ## Quick Start |
| 17 | |
| 18 | When a user provides a video URL: |
| 19 | |
| 20 | ```bash |
| 21 | # Run the bundled download script |
| 22 | python3 scripts/download.py "VIDEO_URL" |
| 23 | ``` |
| 24 | |
| 25 | Default output: `~/Downloads/Videos/` |
| 26 | |
| 27 | ## Prerequisites |
| 28 | |
| 29 | ### Install yt-dlp |
| 30 | |
| 31 | ```bash |
| 32 | # macOS |
| 33 | brew install yt-dlp |
| 34 | |
| 35 | # Cross-platform (pip) |
| 36 | pip install yt-dlp |
| 37 | |
| 38 | # Update to latest version |
| 39 | brew upgrade yt-dlp # or: pip install --upgrade yt-dlp |
| 40 | ``` |
| 41 | |
| 42 | ### Verify Installation |
| 43 | |
| 44 | ```bash |
| 45 | which yt-dlp && yt-dlp --version |
| 46 | ``` |
| 47 | |
| 48 | ## Common Download Commands |
| 49 | |
| 50 | ### Basic Download (Best Quality) |
| 51 | |
| 52 | ```bash |
| 53 | yt-dlp -P ~/Downloads/Videos "VIDEO_URL" |
| 54 | ``` |
| 55 | |
| 56 | ### Specific Quality |
| 57 | |
| 58 | ```bash |
| 59 | # Best quality up to 1080p |
| 60 | yt-dlp -f "bestvideo[height<=1080]+bestaudio/best" -P ~/Downloads/Videos "VIDEO_URL" |
| 61 | |
| 62 | # Best quality up to 720p |
| 63 | yt-dlp -f "bestvideo[height<=720]+bestaudio/best" -P ~/Downloads/Videos "VIDEO_URL" |
| 64 | |
| 65 | # Best available (including 4K) |
| 66 | yt-dlp -f "bestvideo+bestaudio/best" -P ~/Downloads/Videos "VIDEO_URL" |
| 67 | ``` |
| 68 | |
| 69 | ### Audio Only (MP3) |
| 70 | |
| 71 | ```bash |
| 72 | yt-dlp -x --audio-format mp3 -P ~/Downloads/Videos "VIDEO_URL" |
| 73 | ``` |
| 74 | |
| 75 | ### List Available Formats |
| 76 | |
| 77 | ```bash |
| 78 | yt-dlp -F "VIDEO_URL" |
| 79 | ``` |
| 80 | |
| 81 | ### Download with Subtitles |
| 82 | |
| 83 | ```bash |
| 84 | yt-dlp --write-subs --sub-lang zh,en -P ~/Downloads/Videos "VIDEO_URL" |
| 85 | ``` |
| 86 | |
| 87 | ### Playlist Download |
| 88 | |
| 89 | ```bash |
| 90 | yt-dlp -P ~/Downloads/Videos "PLAYLIST_URL" |
| 91 | ``` |
| 92 | |
| 93 | ## Bundled Script Reference |
| 94 | |
| 95 | ### scripts/download.py |
| 96 | |
| 97 | Convenience wrapper with sensible defaults: |
| 98 | |
| 99 | ```bash |
| 100 | # Basic usage |
| 101 | python3 scripts/download.py "VIDEO_URL" |
| 102 | |
| 103 | # Options |
| 104 | python3 scripts/download.py "VIDEO_URL" -o ~/Desktop # Custom output |
| 105 | python3 scripts/download.py "VIDEO_URL" -f 1080 # Max 1080p |
| 106 | python3 scripts/download.py "VIDEO_URL" -a # Audio only (MP3) |
| 107 | python3 scripts/download.py "VIDEO_URL" -F # List formats |
| 108 | python3 scripts/download.py "VIDEO_URL" --subs # With subtitles |
| 109 | ``` |
| 110 | |
| 111 | ## Supported Websites (Examples) |
| 112 | |
| 113 | | Platform | Example URL Pattern | |
| 114 | |----------|---------------------| |
| 115 | | YouTube | `youtube.com/watch?v=`, `youtu.be/` | |
| 116 | | Bilibili | `bilibili.com/video/` | |
| 117 | | Twitter/X | `twitter.com/*/status/`, `x.com/*/status/` | |
| 118 | | TikTok | `tiktok.com/@*/video/` | |
| 119 | | Vimeo | `vimeo.com/` | |
| 120 | | Twitch | `twitch.tv/videos/` | |
| 121 | | Instagram | `instagram.com/p/`, `instagram.com/reel/` | |
| 122 | | Facebook | `facebook.com/watch/` | |
| 123 | |
| 124 | Full list: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md |
| 125 | |
| 126 | ## Platform-Specific Notes |
| 127 | |
| 128 | ### YouTube |
| 129 | |
| 130 | For high-quality (1080p+) YouTube downloads, you may need: |
| 131 | |
| 132 | 1. **Browser cookies** (recommended): |
| 133 | ```bash |
| 134 | yt-dlp --cookies-from-browser chrome "VIDEO_URL" |
| 135 | ``` |
| 136 | |
| 137 | 2. **PO token provider** (for persistent access): |
| 138 | See `references/platform-tips.md` for setup instructions. |
| 139 | |
| 140 | ### Bilibili |
| 141 | |
| 142 | ```bash |
| 143 | # Download with best quality |
| 144 | yt-dlp --cookies-from-browser chrome "https://www.bilibili.com/video/BV..." |
| 145 | ``` |
| 146 | |
| 147 | ### Twitter/X |
| 148 | |
| 149 | ```bash |
| 150 | # Usually works without authentication |
| 151 | yt-dlp "https://twitter.com/user/status/123456789" |
| 152 | ``` |
| 153 | |
| 154 | ## Troubleshooting |
| 155 | |
| 156 | ### "Video unavailable" or "Sign in required" |
| 157 | |
| 158 | Use browser cookies: |
| 159 | ```bash |
| 160 | yt-dlp --cookies-from-browser chrome "VIDEO_URL" |
| 161 | ``` |
| 162 | |
| 163 | ### Only Low Quality Available |
| 164 | |
| 165 | 1. Update yt-dlp: `brew upgrade yt-dlp` |
| 166 | 2. Use browser cookies for authentication |
| 167 | 3. Check available formats: `yt-dlp -F "VIDEO_URL"` |
| 168 | |
| 169 | ### Download Speed Issues |
| 170 | |
| 171 | ```bash |
| 172 | # Limit concurrent fragments |
| 173 | yt-dlp --concurrent-fragments 3 "VIDEO_URL" |
| 174 | |
| 175 | # Use specific format to avoid merging |
| 176 | yt-dlp -f best "VIDEO_URL" |
| 177 | ``` |
| 178 | |
| 179 | ### Network Errors (China/Proxy) |
| 180 | |
| 181 | ```bash |
| 182 | # Use proxy |
| 183 | yt-dlp --proxy socks5://127.0.0.1:1080 "VIDEO_URL" |
| 184 | |
| 185 | # Or set environment variable |
| 186 | export ALL_PROXY=socks5://127.0.0.1:1080 |
| 187 | yt-dlp "VIDEO_URL" |
| 188 | ``` |
| 189 | |
| 190 | ## Output Format |
| 191 | |
| 192 | Default filename template: `%(title)s [%(id)s].%(ext)s` |
| 193 | |
| 194 | Custom template: |
| 195 | ```bash |
| 196 | yt-dlp -o "%(uploader)s - %(title)s.%(ext)s" "VIDEO_URL" |
| 197 | ``` |
| 198 | |
| 199 | ## Further Reading |
| 200 | |
| 201 | - **Platform Tips**: See `references/platform-tips.md` for site-specific guidance |
| 202 | - **yt-dlp Documentation**: https://github.com/yt-dlp/yt-dlp |
| 203 | - **Supported Sites**: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md |