video-downloader

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- Adapted from: awesome-claude-skills/video-downloader -->
<!-- 改编自:awesome-claude-skills/video-downloader -->

Video Downloader Guide

视频下载工具指南

Download videos with customizable quality and format options using yt-dlp.
使用yt-dlp下载视频,支持自定义质量和格式选项。

When to Use

使用场景

  • Downloading videos from YouTube and other sites
  • Saving videos for offline viewing
  • Extracting audio as MP3
  • Choosing specific quality settings
  • Converting between video formats
  • 从YouTube及其他平台下载视频
  • 保存视频以便离线观看
  • 提取音频并保存为MP3格式
  • 选择特定的视频质量设置
  • 在不同视频格式之间转换

Quick Start

快速开始

bash
undefined
bash
undefined

Basic download (best quality)

基础下载(最佳质量)

Specify quality

指定视频质量

yt-dlp -f "bestvideo[height<=1080]+bestaudio" "URL"
yt-dlp -f "bestvideo[height<=1080]+bestaudio" "URL"

Audio only as MP3

仅提取音频为MP3格式

yt-dlp -x --audio-format mp3 "URL"
undefined
yt-dlp -x --audio-format mp3 "URL"
undefined

Quality Options

质量选项

QualityCommand Flag
Best
-f best
(default)
1080p
-f "bestvideo[height<=1080]+bestaudio"
720p
-f "bestvideo[height<=720]+bestaudio"
480p
-f "bestvideo[height<=480]+bestaudio"
360p
-f "bestvideo[height<=360]+bestaudio"
Worst
-f worst
质量等级命令参数
最佳
-f best
(默认)
1080p
-f "bestvideo[height<=1080]+bestaudio"
720p
-f "bestvideo[height<=720]+bestaudio"
480p
-f "bestvideo[height<=480]+bestaudio"
360p
-f "bestvideo[height<=360]+bestaudio"
最差
-f worst

Format Options

格式选项

FormatCommand
MP4
--merge-output-format mp4
WebM
--merge-output-format webm
MKV
--merge-output-format mkv
格式命令
MP4
--merge-output-format mp4
WebM
--merge-output-format webm
MKV
--merge-output-format mkv

Audio Extraction

音频提取

bash
undefined
bash
undefined

Extract as MP3

提取为MP3格式

yt-dlp -x --audio-format mp3 "URL"
yt-dlp -x --audio-format mp3 "URL"

Extract as M4A (better quality)

提取为M4A格式(更高质量)

yt-dlp -x --audio-format m4a "URL"
yt-dlp -x --audio-format m4a "URL"

Best audio quality

最佳音频质量

yt-dlp -x --audio-quality 0 "URL"
undefined
yt-dlp -x --audio-quality 0 "URL"
undefined

Custom Output

自定义输出

bash
undefined
bash
undefined

Custom output directory

自定义输出目录

yt-dlp -o "/path/to/dir/%(title)s.%(ext)s" "URL"
yt-dlp -o "/path/to/dir/%(title)s.%(ext)s" "URL"

Custom filename template

自定义文件名模板

yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" "URL"
undefined
yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" "URL"
undefined

Playlist Handling

播放列表处理

bash
undefined
bash
undefined

Download entire playlist

下载整个播放列表

yt-dlp "PLAYLIST_URL"
yt-dlp "PLAYLIST_URL"

Skip playlists (single video only)

跳过播放列表(仅下载单个视频)

yt-dlp --no-playlist "URL"
yt-dlp --no-playlist "URL"

Download specific items from playlist

下载播放列表中的特定条目

yt-dlp --playlist-items 1-5 "PLAYLIST_URL"
undefined
yt-dlp --playlist-items 1-5 "PLAYLIST_URL"
undefined

Installation

安装方法

bash
undefined
bash
undefined

macOS

macOS系统

brew install yt-dlp
brew install yt-dlp

pip

pip安装

pip install yt-dlp
pip install yt-dlp

Update

更新工具

yt-dlp -U
undefined
yt-dlp -U
undefined

Common Examples

常见示例

bash
undefined
bash
undefined

1080p MP4 to specific folder

下载1080p MP4格式视频到指定文件夹

yt-dlp -f "bestvideo[height<=1080]+bestaudio"
--merge-output-format mp4
-o "~/Videos/%(title)s.%(ext)s" "URL"
yt-dlp -f "bestvideo[height<=1080]+bestaudio"
--merge-output-format mp4
-o "~/Videos/%(title)s.%(ext)s" "URL"

Audio only as high-quality MP3

仅提取高质量MP3音频

yt-dlp -x --audio-format mp3 --audio-quality 0 "URL"
yt-dlp -x --audio-format mp3 --audio-quality 0 "URL"

Download with subtitles

下载视频并包含字幕

yt-dlp --write-subs --sub-lang en "URL"
yt-dlp --write-subs --sub-lang en "URL"

List available formats

列出可用的视频格式

yt-dlp -F "URL"
undefined
yt-dlp -F "URL"
undefined

Important Notes

重要注意事项

  • Video filename generated from video title
  • Higher quality = larger file size
  • Some sites may have restrictions
  • Keep yt-dlp updated for best compatibility
  • 视频文件名由视频标题自动生成
  • 视频质量越高,文件体积越大
  • 部分平台可能存在下载限制
  • 保持yt-dlp为最新版本以获得最佳兼容性