界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

yt-dlp

yt-dlp

【开发与工程】Download videos and audio from YouTube and thousands of other websites using yt-dlp. Use this skill when the user provides a video URL and wants to download it, extract audio, or asks about downloading videos/audio from websites like YouTube, Bilibili, TikTok, Twitter/X, Vimeo, etc.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: yt-dlp description: Download videos and audio from YouTube and thousands of other websites using yt-dlp. Use this skill when the user provides a video URL and wants to download it, extract audio, or asks about downloading videos/audio from websites like YouTube, Bilibili, TikTok, Twitter/X, Vimeo, etc.

yt-dlp Video Downloader

Download videos and audio from YouTube and 1000+ websites.

Prerequisites

Check if yt-dlp is installed before downloading:

which yt-dlp && yt-dlp --version

If not installed:

# macOS
brew install yt-dlp ffmpeg

# Or via pip
pip install yt-dlp

Quick Start

When user provides a video URL:

# Default: best quality video
yt-dlp "URL"

# Audio only (mp3)
yt-dlp -x --audio-format mp3 "URL"

# Specify output directory
yt-dlp -o "~/Downloads/%(title)s.%(ext)s" "URL"

Common Tasks

Download Video

# Best quality (default)
yt-dlp "URL"

# Limit to 1080p
yt-dlp -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" "URL"

# Limit to 720p
yt-dlp -f "bestvideo[height<=720]+bestaudio/best[height<=720]" "URL"

# List available formats first
yt-dlp -F "URL"

Extract Audio

# Extract as mp3
yt-dlp -x --audio-format mp3 "URL"

# Extract as m4a (better quality)
yt-dlp -x --audio-format m4a "URL"

Download Playlist

# Entire playlist
yt-dlp "PLAYLIST_URL"

# Specific items
yt-dlp --playlist-items 1-5 "PLAYLIST_URL"

# Single video only (ignore playlist)
yt-dlp --no-playlist "URL"

Subtitles

# Download with subtitles
yt-dlp --write-subs --sub-langs en,zh "URL"

# Embed subtitles in video
yt-dlp --embed-subs "URL"

Output Options

# Custom output path
yt-dlp -o "~/Downloads/%(title)s.%(ext)s" "URL"

# Include uploader in filename
yt-dlp -o "%(uploader)s - %(title)s.%(ext)s" "URL"

Workflow

  1. User provides video URL
  2. Ask for preferences if not specified:
    • Video or audio only?
    • Quality preference?
    • Output location? (default: current directory)
  3. Check yt-dlp is installed
  4. Run appropriate command
  5. Report download result

Troubleshooting

# Update yt-dlp
yt-dlp -U

# Use browser cookies for login-required content
yt-dlp --cookies-from-browser chrome "URL"

# Verbose output
yt-dlp -v "URL"
我的收藏