
Yt Dlp
- 1.2k installs
- 4 repo stars
- Updated January 22, 2026
- lwmxiaobei/yt-dlp-skill
yt-dlp provides documented workflows for Download videos and extract audio from various platforms using yt-dlp. Use when user provides a video URL, asks to download a video, or when conversation contai
About
The yt-dlp skill download videos and extract audio from various platforms using yt-dlp. Use when user provides a video URL, asks to download a video, or when conversation contains video links from YouTube, Twitter/X, Vimeo, TikTok, Instagram, etc. # yt-dlp Video Downloader Skill This skill provides tools for downloading videos and extracting audio from various platforms using yt-dlp. ## Features - Download videos from multiple platforms (YouTube, Twitter/X, Vimeo, TikTok, Instagram, Facebook, etc.) - Extract audio from videos - Auto-detect video URLs in conversations - Support for different quality settings and formats ## Usage Patterns ### 1. Command-based Download When user explicitly asks to download a video: ``` User: Download this video https://youtube.com/watch?v=... ``` **Action**: Extract URL and call download script ### 2. Auto-detection in Conversations When conversation contains video URLs: ``` User: Check out this video https://twitter.com/... and let me know what you think ``` **Action**: Detect video URL, ask user if they want to download it ### 3.
- Download videos from multiple platforms (YouTube, Twitter/X, Vimeo, TikTok, Instagram, Facebook, etc.)
- Extract audio from videos
- Auto-detect video URLs in conversations
- Support for different quality settings and formats
- YouTube (youtube.com, youtu.be)
Yt Dlp by the numbers
- 1,195 all-time installs (skills.sh)
- +38 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #259 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
yt-dlp capabilities & compatibility
- Capabilities
- download videos from multiple platforms (youtube · extract audio from videos · auto detect video urls in conversations · support for different quality settings and forma · youtube (youtube.com, youtu.be)
- Use cases
- documentation
What yt-dlp says it does
# yt-dlp Video Downloader Skill This skill provides tools for downloading videos and extracting audio from various platforms using yt-dlp.
Command-based Download When user explicitly asks to download a video: ``` User: Download this video https://youtube.com/watch?v=...
npx skills add https://github.com/lwmxiaobei/yt-dlp-skill --skill yt-dlpAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.2k |
|---|---|
| repo stars | ★ 4 |
| Security audit | 2 / 3 scanners passed |
| Last updated | January 22, 2026 |
| Repository | lwmxiaobei/yt-dlp-skill ↗ |
How do I use yt-dlp for the task described in its SKILL.md triggers?
Download videos and extract audio from various platforms using yt-dlp. Use when user provides a video URL, asks to download a video, or when conversation contains video links from YouTube, Twitter/X,.
Who is it for?
Teams invoking yt-dlp when the user request matches documented triggers and prerequisites.
Skip if: Skip when cached docs are missing, the request is a negative trigger, or another sibling skill owns the workflow.
When should I use this skill?
Download videos and extract audio from various platforms using yt-dlp. Use when user provides a video URL, asks to download a video, or when conversation contains video links from YouTube, Twitter/X, Vimeo, TikTok, Insta
What you get
Step-by-step guidance grounded in yt-dlp documentation and reference files.
- Downloaded video files
- Extracted audio tracks
Files
yt-dlp Video Downloader Skill
This skill provides tools for downloading videos and extracting audio from various platforms using yt-dlp.
Features
- Download videos from multiple platforms (YouTube, Twitter/X, Vimeo, TikTok, Instagram, Facebook, etc.)
- Extract audio from videos
- Auto-detect video URLs in conversations
- Support for different quality settings and formats
Usage Patterns
1. Command-based Download
When user explicitly asks to download a video:
User: Download this video https://youtube.com/watch?v=...Action: Extract URL and call download script
2. Auto-detection in Conversations
When conversation contains video URLs:
User: Check out this video https://twitter.com/... and let me know what you thinkAction: Detect video URL, ask user if they want to download it
3. Audio Extraction
When user wants to extract audio only:
User: Extract the audio from https://youtu.be/...Action: Use audio extraction script
Available Scripts
Note: Scripts are located in the scripts/ directory
download_video.py
Main video downloader with quality and format options.
Usage:
# Download video
scripts/download_video.py <url> -o <output_dir>
# Download with specific quality
scripts/download_video.py <url> --quality 720p
scripts/download_video.py <url> --quality audio # For audio only
# Custom format selector
scripts/download_video.py <url> --format "bestvideo[height<=1080]+bestaudio/best"
# Extract info only
scripts/download_video.py <url> --info-onlyQuality options: best, 1080p, 720p, 480p, audio
extract_audio.py
Extract audio from videos in various formats.
Usage:
# Extract as MP3 (default)
/scripts/extract_audio.py <url> -o <output_dir>
# Extract as M4A
/scripts/extract_audio.py <url> --format m4a
# Custom quality
/scripts/extract_audio.py <url> --quality 320Formats: mp3, m4a, opus, flac, wav
extract_urls.py
Extract video URLs from text or files.
Usage:
# Extract from text argument
/scripts/extract_urls.py "Check https://youtube.com/watch?v=..."
# Extract from file
/scripts/extract_urls.py <file_path>
# Read from stdin
cat file.txt | /scripts/extract_urls.pyVideo Platform Support
The skill recognizes URLs from:
- YouTube (youtube.com, youtu.be)
- Twitter/X (twitter.com, x.com)
- Vimeo (vimeo.com)
- TikTok (tiktok.com)
- Instagram (instagram.com)
- Facebook (facebook.com, fb.watch)
- Twitch (twitch.tv, clips.twitch.tv)
- Dailymotion (dailymotion.com)
- Reddit (reddit.com)
- Streamable (streamable.com)
- And many more supported by yt-dlp
Workflow
When User Provides Video URL
1. Extract URL from user's input using extract_urls.py 2. Confirm with user what action to take:
- Download video
- Extract audio
- Show video info
3. Execute appropriate script based on user's choice 4. Notify user of success/failure and file location
When Auto-detecting URLs
1. Scan conversation text with extract_urls.py (can process stdin) 2. If video URLs found, ask user: "I found video URLs in this conversation. Would you like me to download them?" 3. If yes, proceed with download workflow 4. If no, continue with conversation
Handling Multiple URLs
- For single URL: Direct download
- For multiple URLs: Ask user if they want to download all or select specific ones
- Provide option to download as playlist if URLs are from the same source
Quality and Format Selection
When user doesn't specify preferences:
- Default to best available quality
- For audio: Default to MP3 at 192kbps
When options needed:
# Ask user for quality preference if not specified
# Options: best (default), 1080p, 720p, 480p, audio
# Ask for format if extracting audio
# Options: mp3 (default), m4a, opus, flac, wavError Handling
Common issues and solutions:
1. yt-dlp not installed:
- Check with
yt-dlp --version - Install with
pip install yt-dlporbrew install yt-dlp
2. ffmpeg not installed (required for format conversion):
- Install with
brew install ffmpeg(macOS) - Or
apt install ffmpeg(Linux)
3. Video not available:
- Check if URL is accessible
- Some videos may require authentication
- Age-restricted content may need cookies
4. Network errors:
- Retry download
- Check internet connection
Dependencies
yt-dlp: Main video downloaderffmpeg: Audio/video processing (required for format conversion)python3with standard library
All scripts are self-contained and use only built-in Python modules.
yt-dlp Skill
这是对 yt-dlp 工具的技能封装,提供视频下载、音频提取、URL 提取等功能。
功能
- 视频下载
- 音频提取
- URL 提取
安装
npx skill add lwmxiaobei/yt-dlp-skill使用示例
直接在各个 agent 里面输入 /yt-dlp <url> 即可。 或者输入帮我下载视频 <url>
yt-dlp Skill Examples
Example 1: Download a YouTube Video
User Input: "Download this video https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Skill Response:
I'll download this video for you at best quality by default.
[Running download_video.py with the URL]
Video downloaded successfully: The_File_Name.mp4
Location: /current/directory/The_File_Name.mp4Example 2: Download at Specific Quality
User Input: "Can you download this in 720p? https://youtu.be/abc123"
Skill Response:
I'll download the video at 720p quality.
[Running download_video.py with --quality 720p]
Video downloaded successfully: Video_Title.mp4Example 3: Extract Audio Only
User Input: "Extract the audio from https://twitter.com/user/status/123456789"
Skill Response:
I'll extract the audio from this tweet in MP3 format.
[Running extract_audio.py with the URL]
Audio extracted successfully: Tweet_Audio_Title.mp3Example 4: Auto-detect Video URLs
Conversation Excerpt:
User: "I found a really interesting talk on Vimeo: https://vimeo.com/123456789. Also, there's a good tutorial on YouTube: https://www.youtube.com/watch?v=def456"
Skill detects two video URLs and asks:
"I found 2 video URLs in this conversation:
1. https://vimeo.com/123456789
2. https://www.youtube.com/watch?v=def456
Would you like me to download them? [Yes/No/Select specific ones]"
If user confirms:
- Download both videos
- Report success with file locationsExample 5: Multiple URLs with Quality Preference
User Input: "Download these videos at 1080p:
- https://youtube.com/watch?v=video1
- https://youtube.com/watch?v=video2"
Skill Response:
I'll download both videos at 1080p quality.
[Running download_video.py for each URL with --quality 1080p]
Videos downloaded:
1. Video1_Title.mp4
2. Video2_Title.mp4Example 6: Download Failed
User Input: "Download https://private-video.com/abc123"
Skill Response:
I encountered an issue downloading the video. The URL may be:
- Private or requiring authentication
- From an unsupported platform
- No longer available
Error: [specific error message from yt-dlp]Example 7: Audio Extraction with Custom Format
User Input: "Extract this video's audio as FLAC: https://www.youtube.com/watch?v=hi-def-audio"
Skill Response:
I'll extract the audio in FLAC format (lossless quality).
[Running extract_audio.py with --format flac]
Audio extracted successfully: The_Title.flacExample 8: URL Extraction from File
User Input: "I have a text file with a bunch of video links. Can you download them?"
Skill Workflow:
1. Ask user for the file path
2. Use extract_urls.py to extract all video URLs from the file
3. List found URLs and ask for confirmation
4. Download confirmed videos
5. Provide status report for each download#!/usr/bin/env python3
"""
Video downloader using yt-dlp.
Supports downloading videos from various platforms.
"""
import sys
import os
import subprocess
import json
import argparse
from pathlib import Path
from urllib.parse import urlparse
VALID_DOMAINS = [
'youtube.com', 'youtu.be', 'twitter.com', 'x.com', 'vimeo.com',
'tiktok.com', 'instagram.com', 'facebook.com', 'fb.watch',
'twitch.tv', 'dailymotion.com', 'nicovideo.jp', 'bilibili.com',
'reddit.com', 'streamable.com', 'clips.twitch.tv', 'video.twimg.com'
]
def is_video_url(url):
"""Check if URL looks like a video URL."""
try:
parsed = urlparse(url)
domain = parsed.netloc.lower()
# Remove www. prefix
if domain.startswith('www.'):
domain = domain[4:]
# Check if it's a valid video domain
for valid_domain in VALID_DOMAINS:
if valid_domain in domain:
return True
return False
except:
return False
def extract_video_info(url):
"""Extract video information using yt-dlp."""
try:
cmd = [
'yt-dlp',
'--no-download',
'--dump-json',
'--flat-playlist',
url
]
result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
if result.returncode != 0:
return None
# Try to parse the first line as JSON
lines = result.stdout.strip().split('\n')
if lines:
data = json.loads(lines[0])
return data
return None
except Exception as e:
print(f"Error extracting video info: {e}", file=sys.stderr)
return None
def download_video(url, output_dir=None, format=None, quality=None):
"""Download video using yt-dlp."""
if output_dir is None:
output_dir = os.getcwd()
# Build yt-dlp command
cmd = ['yt-dlp', url]
# Set output template
cmd.extend(['-o', f'{output_dir}/%(title)s.%(ext)s'])
# Handle format and quality
if format:
cmd.extend(['-f', format])
elif quality:
# Map quality to format selector
quality_map = {
'best': 'best',
'1080p': 'bestvideo[height<=1080]+bestaudio/best',
'720p': 'bestvideo[height<=720]+bestaudio/best',
'480p': 'bestvideo[height<=480]+bestaudio/best',
'audio': 'bestaudio'
}
if quality in quality_map:
cmd.extend(['-f', quality_map[quality]])
# Add some useful options
cmd.extend([
'--no-playlist', # Only download single video
'--write-info-json', # Save metadata
'--write-thumbnail' # Save thumbnail
])
print(f"Downloading video from: {url}", file=sys.stderr)
print(f"Output directory: {output_dir}", file=sys.stderr)
try:
result = subprocess.run(cmd, check=True)
return result.returncode == 0
except subprocess.CalledProcessError as e:
print(f"Download failed: {e}", file=sys.stderr)
return False
except Exception as e:
print(f"Error during download: {e}", file=sys.stderr)
return False
def main():
parser = argparse.ArgumentParser(description='Download video using yt-dlp')
parser.add_argument('url', help='Video URL to download')
parser.add_argument('-o', '--output', help='Output directory', default=os.getcwd())
parser.add_argument('-f', '--format', help='Video format selector')
parser.add_argument('-q', '--quality',
choices=['best', '1080p', '720p', '480p', 'audio'],
help='Video quality')
parser.add_argument('--info-only', action='store_true',
help='Only extract video info, do not download')
args = parser.parse_args()
# Validate URL
if not is_video_url(args.url):
print(f"Warning: URL does not appear to be from a known video platform: {args.url}", file=sys.stderr)
print("Will attempt download anyway.", file=sys.stderr)
if args.info_only:
# Only extract info
info = extract_video_info(args.url)
if info:
print(json.dumps(info, indent=2))
sys.exit(0)
else:
sys.exit(1)
else:
# Download video
success = download_video(args.url, args.output, args.format, args.quality)
sys.exit(0 if success else 1)
if __name__ == '__main__':
main()
#!/usr/bin/env python3
"""
Extract audio from video using yt-dlp and ffmpeg.
"""
import sys
import os
import subprocess
import argparse
from pathlib import Path
def extract_audio(url, output_dir=None, format='mp3', quality='192'):
"""Extract audio from video."""
if output_dir is None:
output_dir = os.getcwd()
# Build yt-dlp command
cmd = ['yt-dlp', url]
# Set output template for audio
cmd.extend(['-o', f'{output_dir}/%(title)s.{format}'])
# Set format to extract audio only
cmd.extend(['-f', 'bestaudio[ext=m4a]/bestaudio'])
# Add post-processing to convert to desired format
cmd.extend([
'--extract-audio',
'--audio-format', format,
'--audio-quality', quality
])
# Add useful metadata options
cmd.extend([
'--write-info-json',
'--write-thumbnail'
])
print(f"Extracting audio from: {url}", file=sys.stderr)
print(f"Output format: {format}", file=sys.stderr)
print(f"Output directory: {output_dir}", file=sys.stderr)
try:
result = subprocess.run(cmd, check=True)
return result.returncode == 0
except subprocess.CalledProcessError as e:
print(f"Audio extraction failed: {e}", file=sys.stderr)
return False
except Exception as e:
print(f"Error during audio extraction: {e}", file=sys.stderr)
return False
def main():
parser = argparse.ArgumentParser(description='Extract audio from video using yt-dlp')
parser.add_argument('url', help='Video URL')
parser.add_argument('-o', '--output', help='Output directory', default=os.getcwd())
parser.add_argument('-f', '--format', help='Audio format', default='mp3',
choices=['mp3', 'm4a', 'opus', 'flac', 'wav'])
parser.add_argument('-q', '--quality', help='Audio quality', default='192')
args = parser.parse_args()
success = extract_audio(args.url, args.output, args.format, args.quality)
sys.exit(0 if success else 1)
if __name__ == '__main__':
main()
#!/usr/bin/env python3
"""
Extract video URLs from text or files.
"""
import sys
import re
import json
from urllib.parse import urlparse
# Video domains to look for
VIDEO_DOMAINS = [
r'youtube\.com',
r'youtu\.be',
r'twitter\.com',
r'x\.com',
r'vimeo\.com',
r'tiktok\.com',
r'instagram\.com',
r'facebook\.com',
r'fb\.watch',
r'twitch\.tv',
r'dailymotion\.com',
r'nicovideo\.jp',
r'bilibili\.com',
r'reddit\.com',
r'streamable\.com',
r'clips\.twitch\.tv',
r'video\.twimg\.com'
]
def extract_urls_from_text(text):
"""Extract all URLs from text and filter video URLs."""
# URL pattern
url_pattern = r'https?://(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*)'
# Find all URLs
all_urls = re.findall(url_pattern, text, re.IGNORECASE)
# Filter video URLs
video_urls = []
for url in all_urls:
parsed = urlparse(url)
domain = parsed.netloc.lower()
# Remove www. prefix
if domain.startswith('www.'):
domain = domain[4:]
# Check if it's a video domain
for video_domain in VIDEO_DOMAINS:
if re.search(video_domain, domain):
video_urls.append(url)
break
return video_urls
def extract_urls_from_file(file_path):
"""Extract URLs from a file."""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
return extract_urls_from_text(content)
except Exception as e:
print(f"Error reading file {file_path}: {e}", file=sys.stderr)
return []
def main():
if len(sys.argv) < 2:
print("Usage: extract_urls.py <text_or_file>", file=sys.stderr)
print(" If the argument is a file path, URLs will be extracted from the file.", file=sys.stderr)
print(" Otherwise, URLs will be extracted from the provided text.", file=sys.stderr)
sys.exit(1)
input_arg = sys.argv[1]
# Check if input is a file path
if len(sys.argv) == 2 and not sys.stdin.isatty():
# Read from stdin
content = sys.stdin.read()
urls = extract_urls_from_text(content)
elif input_arg.startswith('http') or ' ' in input_arg:
# It's likely text with a URL
urls = extract_urls_from_text(input_arg)
else:
# Try as file first
try:
urls = extract_urls_from_file(input_arg)
except:
# Fall back to treating as text
urls = extract_urls_from_text(input_arg)
# Output as JSON
print(json.dumps(urls, indent=2))
if __name__ == '__main__':
main()
#!/usr/bin/env python3
"""
Test script for yt-dlp functionality.
"""
import subprocess
import sys
def test_yt_dlp_installed():
"""Check if yt-dlp is installed."""
try:
result = subprocess.run(['yt-dlp', '--version'], capture_output=True, text=True)
if result.returncode == 0:
print(f"✓ yt-dlp is installed: version {result.stdout.strip()}")
return True
else:
print("✗ yt-dlp command failed")
return False
except FileNotFoundError:
print("✗ yt-dlp is not installed")
print(" Install with: pip install yt-dlp")
return False
def test_ffmpeg_installed():
"""Check if ffmpeg is installed."""
try:
result = subprocess.run(['ffmpeg', '-version'], capture_output=True, text=True)
if result.returncode == 0:
print(f"✓ ffmpeg is installed")
return True
else:
print("✗ ffmpeg command failed")
return False
except FileNotFoundError:
print("✗ ffmpeg is not installed (required for format conversion)")
print(" Install with: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)")
return False
def test_extract_urls():
"""Test URL extraction."""
import extract_urls
test_cases = [
("Check out https://youtube.com/watch?v=test", 1),
("Multiple: https://youtu.be/abc and https://vimeo.com/123", 2),
("No video links here", 0),
]
print("\nTesting URL extraction:")
all_passed = True
for text, expected_count in test_cases:
urls = extract_urls.extract_urls_from_text(text)
if len(urls) == expected_count:
print(f"✓ Found {expected_count} URL(s) in: '{text}'")
else:
print(f"✗ Expected {expected_count} URLs, got {len(urls)} in: '{text}'")
all_passed = False
return all_passed
def test_video_url_detection():
"""Test video URL detection."""
import download_video
test_cases = [
("https://youtube.com/watch?v=abc", True),
("https://youtu.be/xyz", True),
("https://twitter.com/user/status/123", True),
("https://example.com/video.mp4", False),
("https://google.com", False),
]
print("\nTesting video URL detection:")
all_passed = True
for url, expected in test_cases:
result = download_video.is_video_url(url)
if result == expected:
print(f"✓ Correctly identified {url} as {'video' if expected else 'non-video'}")
else:
print(f"✗ Wrong classification for {url}")
all_passed = False
return all_passed
def main():
print("Testing yt-dlp Skill Setup\n")
print("=" * 50)
# Check dependencies
yt_dlp_ok = test_yt_dlp_installed()
ffmpeg_ok = test_ffmpeg_installed()
# Test modules
try:
extract_urls_ok = test_extract_urls()
detection_ok = test_video_url_detection()
except Exception as e:
print(f"\n✗ Module test failed: {e}")
extract_urls_ok = detection_ok = False
print("\n" + "=" * 50)
# Summary
if yt_dlp_ok and ffmpeg_ok:
print("✓ Basic setup looks good!")
print(" The skill is ready to use.")
else:
print("✗ Please install missing dependencies before using the skill.")
sys.exit(1)
if extract_urls_ok and detection_ok:
print("✓ All module tests passed!")
else:
print("✗ Some module tests failed.")
sys.exit(1)
if __name__ == '__main__':
main()
Related skills
How it compares
Use for CLI media fetch inside agent sessions; use official platform APIs when you need licensed streaming playback rather than local file download.
FAQ
What does yt-dlp do?
Download videos and extract audio from various platforms using yt-dlp. Use when user provides a video URL, asks to download a video, or when conversation contains video links from YouTube, Twitter/X, Vimeo, TikTok, Insta
When should I use yt-dlp?
Download videos and extract audio from various platforms using yt-dlp. Use when user provides a video URL, asks to download a video, or when conversation contains video links from YouTube, Twitter/X, Vimeo, TikTok, Insta
What are common prerequisites?
--- name: yt-dlp description: Download videos and extract audio from various platforms using yt-dlp.
Is Yt Dlp safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.