modelscope.cn

yt-dlp-downloader

下载视频和音频的通用工?

Installation

$ npx skills add https://modelscope.cn

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from modelscope.cn · top by installs.

npx skills add https://modelscope.cn

Browse all from modelscope.cn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,562 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

yt-dlp 视频下载器

功能概述

使用 yt-dlp 下载视频和音频,支持数千个网站:

  • 视频平台: YouTube, Bilibili, 抖音, 快手, Twitter/X, Instagram, TikTok, Vimeo
  • 社交媒体: 微博, 小红书, Facebook, Reddit
  • 其他: TED,Coursera, 各种新闻网站等

默认下载位置

所有下载默认保存到: ~/Downloads/

使用方式

基础视频下载

当用户提供视频链接时,自动下载最佳质量的视频:

yt-dlp -o "~/Downloads/%(title)s.%(ext)s" "<VIDEO_URL>"

下载选项

1. 最佳质量视频(默认)

yt-dlp -f "bestvideo+bestaudio/best" \
  -o "~/Downloads/%(title)s.%(ext)s" \
  "<VIDEO_URL>"

2. 仅下载音频(MP3)

yt-dlp -x --audio-format mp3 \
  -o "~/Downloads/%(title)s.%(ext)s" \
  "<VIDEO_URL>"

3. 下载字幕

yt-dlp --write-subs --write-auto-subs --sub-lang zh-Hans,zh,en \
  -o "~/Downloads/%(title)s.%(ext)s" \
  "<VIDEO_URL>"

4. 下载整个播放列表

yt-dlp -o "~/Downloads/%(playlist_title)s/%(title)s.%(ext)s" \
  "<PLAYLIST_URL>"

5. 查看可用格式

yt-dlp -F "<VIDEO_URL>"

6. 下载特定格式

yt-dlp -f "137+140" \
  -o "~/Downloads/%(title)s.%(ext)s" \
  "<VIDEO_URL>"

常用参数说明

参数 说明
-o 输出文件名模板
-f 格式选择
-F 列出所有可用格式
-x 仅提取音频
--audio-format 音频格式 (mp3, m4a, etc.)
--write-subs 下载字幕
--write-auto-subs 下载自动生成的字幕
--sub-lang 字幕语言
--no-playlist 不下载播放列表
--playlist-items 下载播放列表中的特定项
--limit-rate 限制下载速度
--proxy 使用代理

文件名模板变量

变量 说明
%(title)s 视频标题
%(id)s 视频ID
%(ext)s 文件扩展名
%(uploader)s 上传者
%(upload_date)s 上传日期
%(duration)s 时长(秒)
%(resolution)s 分辨率
%(playlist_title)s 播放列表标题

工作流程

当用户提供视频链接时:

  1. 解析链接: 确认网站类型和视频可用性
  2. 询问需求: 是否需要特定格式或质量
  3. 执行下载: 使用合适的参数下载
  4. 返回结果: 告知下载位置和文件名

示例交互

用户: 下载这个视频 https://www.youtube.com/watch?v=xxxxx

助手: 正在下载视频...

yt-dlp -f "bestvideo+bestaudio/best" \
  -o "~/Downloads/%(title)s.%(ext)s" \
  "https://www.youtube.com/watch?v=xxxxx"

下载完成!文件保存在: ~/Downloads/视频标题.mp4


用户: 只要音频

助手: 正在提取音频...

yt-dlp -x --audio-format mp3 \
  -o "~/Downloads/%(title)s.%(ext)s" \
  "https://www.youtube.com/watch?v=xxxxx"

下载完成!文件保存在: ~/Downloads/视频标题.mp3

注意事项

  1. 某些网站可能需要登录或 cookies
  2. 部分地区可能需要代理
  3. 下载受版权保护的内容请遵守当地法律
  4. Bilibili 等国内网站可能需要额外配置