yt-dlp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseyt-dlp Cheatsheet
yt-dlp 速查表
Command-line tool for downloading videos from YouTube and other sites.
命令行工具,用于从YouTube及其他网站下载视频。
Quick Start
快速开始
bash
undefinedbash
undefinedDownload video
下载视频
yt-dlp https://url
yt-dlp https://url
Download with specific format
按指定格式下载
yt-dlp -f best https://url
yt-dlp -f best https://url
Download with output filename
自定义输出文件名
yt-dlp -o "filename.%(ext)s" https://url
undefinedyt-dlp -o "filename.%(ext)s" https://url
undefinedBasic Download
基础下载
bash
undefinedbash
undefinedDownload video
下载视频
yt-dlp https://url
yt-dlp https://url
Download to current directory
下载到当前目录
yt-dlp https://url
yt-dlp https://url
Download with specific format
按指定格式下载
yt-dlp -f best https://url
undefinedyt-dlp -f best https://url
undefinedFormat Selection
格式选择
bash
undefinedbash
undefinedBest quality
最高画质
yt-dlp -f best https://url
yt-dlp -f best https://url
Best audio
最佳音频
yt-dlp -f bestaudio https://url
yt-dlp -f bestaudio https://url
Best video
最佳视频
yt-dlp -f bestvideo https://url
yt-dlp -f bestvideo https://url
Specific format
指定格式代码
yt-dlp -f 137 https://url
yt-dlp -f 137 https://url
Format list
列出所有可用格式
yt-dlp --list-formats https://url
yt-dlp --list-formats https://url
Format with preference
优先选择指定格式
yt-dlp -f "bestvideo[ext=mp4]+bestaudio/best" https://url
undefinedyt-dlp -f "bestvideo[ext=mp4]+bestaudio/best" https://url
undefinedOutput Options
输出选项
bash
undefinedbash
undefinedCustom output filename
自定义输出文件名
yt-dlp -o "Title.%(ext)s" https://url
yt-dlp -o "Title.%(ext)s" https://url
Output template
使用输出模板
yt-dlp -o "%(title)s.%(ext)s" https://url
yt-dlp -o "%(title)s.%(ext)s" https://url
Keep original filename
保留原始文件名
yt-dlp --keep-filename https://url
yt-dlp --keep-filename https://url
Skip existing files
跳过已下载文件
yt-dlp --continue https://url
yt-dlp --continue https://url
Limit download rate
限制下载速度
yt-dlp --limit 1M https://url
yt-dlp --limit 1M https://url
Retries
设置重试次数
yt-dlp --retries 5 https://url
undefinedyt-dlp --retries 5 https://url
undefinedPlaylist Handling
播放列表处理
bash
undefinedbash
undefinedDownload single video
下载单个视频
yt-dlp https://url
yt-dlp https://url
Download entire playlist
下载整个播放列表
yt-dlp --yes-playlist https://url
yt-dlp --yes-playlist https://url
Download only certain videos
下载播放列表前N个视频
yt-dlp --playlist-end 10 https://url
yt-dlp --playlist-end 10 https://url
Download with start number
从指定序号开始下载
yt-dlp --playlist-start 5 https://url
yt-dlp --playlist-start 5 https://url
Download all except certain videos
忽略错误,下载其余视频
yt-dlp --ignore-errors https://url
undefinedyt-dlp --ignore-errors https://url
undefinedAuthentication
身份验证
bash
undefinedbash
undefinedUsername and password
使用用户名和密码
yt-dlp -u user -p pass https://url
yt-dlp -u user -p pass https://url
API key
使用Cookie文件
yt-dlp --cookies cookies.txt https://url
yt-dlp --cookies cookies.txt https://url
Netflix username/password
Netflix用户名/密码登录
yt-dlp --username user --password pass https://url
undefinedyt-dlp --username user --password pass https://url
undefinedMetadata Extraction
元数据提取
bash
undefinedbash
undefinedExtract info
提取视频信息(JSON格式)
yt-dlp --dump-json https://url
yt-dlp --dump-json https://url
Extract title
提取视频标题
yt-dlp --get-title https://url
yt-dlp --get-title https://url
Extract duration
提取视频时长
yt-dlp --get-duration https://url
yt-dlp --get-duration https://url
Extract description
提取视频描述
yt-dlp --get-description https://url
yt-dlp --get-description https://url
Extract uploader
提取上传者信息
yt-dlp --get-uploader https://url
undefinedyt-dlp --get-uploader https://url
undefinedAdvanced Options
高级选项
bash
undefinedbash
undefinedDownload subtitles
下载字幕
yt-dlp --write-sub https://url
yt-dlp --write-sub https://url
Download all formats
下载所有可用格式
yt-dlp --all-formats https://url
yt-dlp --all-formats https://url
Download best quality only
仅下载单个视频(忽略播放列表)
yt-dlp --no-playlist https://url
yt-dlp --no-playlist https://url
Skip download, only extract info
跳过下载,仅提取信息
yt-dlp --skip-download https://url
yt-dlp --skip-download https://url
Download to specific directory
下载到指定目录
yt-dlp -o "downloads/%(title)s.%(ext)s" https://url
yt-dlp -o "downloads/%(title)s.%(ext)s" https://url
Concurrent downloads
并发下载
yt-dlp --concurrent-connections 10 https://url
undefinedyt-dlp --concurrent-connections 10 https://url
undefinedBatch Processing
批量处理
bash
undefinedbash
undefinedDownload from file
从文件读取链接批量下载
yt-dlp --batch-file urls.txt
yt-dlp --batch-file urls.txt
Download all in directory
使用归档文件避免重复下载
yt-dlp --download-archive archive.txt https://url
undefinedyt-dlp --download-archive archive.txt https://url
undefinedTips
提示
- Use for maximum quality
-f best - Use for custom naming
-o "filename.%(ext)s" - Use to skip already downloaded files
--continue - Use to see available formats
--list-formats - Use to extract metadata without downloading
--skip-download - Use to avoid re-downloading
--download-archive
- 使用 获取最高画质
-f best - 使用 自定义文件名
-o "filename.%(ext)s" - 使用 跳过已下载文件
--continue - 使用 查看可用格式
--list-formats - 使用 仅提取元数据而不下载视频
--skip-download - 使用 避免重复下载
--download-archive
Related Skills
相关技能
- tmux: Run yt-dlp in background with watch mode
- tmux: 在后台运行yt-dlp并监控进程