原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Youtube-clipper-skill Skill

代码仓库 ↗

作者:op7418★ 2,3411 个 skill

安装

What it does

No summary yet. See the facts below or open the maker’s original description

  • Connects Instruction files the AI reads
  • Account or key Not confirmed (README mentions a key or .env file)
  • Category 其他
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/skill/op7418-youtube-clipper-skill.svg)](https://mcp.popnx.com/en/skills/op7418-youtube-clipper-skill)

相似的 Skill

同类工作,排序与 Skill 列表相同

与相似项目对比
本项
Youtube-clipper-skill
llmfitclaude-videoVideoCaptionerclaude-cookbooks
作者op7418AlexsJonesbradautomatesWEIFENG2333anthropics
Skill 数11114
GitHub 星标2,34139,06421,16816,57054,832
最近代码更新2026年1月22日2026年11月18日2026年9月25日2026年9月12日2026年11月17日
许可证MITMITMITGPL-3.0MIT

op7418 提供的 1 个 Skill(指令集),AI 读取后照做 · 不是 MCP server

Skill 和 MCP 有什么不同

MCP = 手

把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。

Skill = 手册

教 AI 怎么做某项工作的文本文件,不连接任何服务。

有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。

适用的应用

Claude CodeClaude (เว็บ/แอป)

依据开发者 README 和 repo 中的文件夹

安装

Is it safe?

  • Who made it

    GitHub account op7418 (person), 11 years old

  • Use and upkeep

    ★ 2,341 stars · code last changed 2026年1月22日

  • Any scripts?

    11 scripts that can run on a computer: install_as_skill.sh, scripts/__init__.py, scripts/analyze_subtitles.py, scripts/burn_subtitles.py and 7 more

  • Uses the internet?

    No internet calls found in the scripts

  • Changes machine-wide settings?

    Scripts that touch settings folders (~/.claude or settings.json): install_as_skill.sh

Checked automatically from the repo files at commit f31f077 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself

第一步:你用哪个 AI?

选择你用的应用,本页只显示该应用的安装方法

Option 1Upload to claude.ai (web and app)

  • Files are byte-for-byte the same as on GitHub at commit f31f077 · View on GitHub ↗

  • 11 scripts

  • Once uploaded it runs on Claude’s systems, not on your computer. No need to unzip

Look inside before downloading

All 22 files · 134 KB

  • .env.example3 KB
  • FIXES_AND_IMPROVEMENTS.md8 KB
  • LICENSE1 KB
  • README.md8 KB
  • README.zh-CN.md8 KB
  • SKILL.md11 KB
  • TECHNICAL_NOTES.md11 KB
  • install_as_skill.sh7 KB
  • references/ffmpeg-guide.md3 KB
  • references/subtitle-formatting.md8 KB
  • references/yt-dlp-guide.md6 KB
  • scripts/__init__.py1 KB
  • scripts/analyze_subtitles.py7 KB
  • scripts/burn_subtitles.py8 KB
  • scripts/clip_video.py7 KB
  • scripts/download_video.py7 KB
  • scripts/extract_subtitle_clip.py4 KB
  • scripts/generate_summary.py6 KB
  • scripts/merge_bilingual_subtitles.py2 KB
  • scripts/translate_subtitles.py7 KB
  • scripts/utils.py8 KB
  • templates/summary-template.md3 KB
  1. Download youtube-clipper.zip

    134 KB · 22 files · MIT license (license file included in the folder)

    Download youtube-clipper.zip

  2. Open Skills on claude.ai and upload

    +Create skillUpload a skillpick youtube-clipper.zip

    Open claude.ai/customize/skills ↗

  3. No Upload button? Turn on file creation first

    SettingsCapabilitiesCode execution and file creation

    Turn on Code execution and file creation first (newer menus: Create and edit files) · personal plans: Settings → Capabilities · Team/Enterprise: an admin turns it on under Organization settings → Plugins & skills · every plan, including Free

Upload once; it works in claude.ai and Claude Desktop, and in recent Claude Code signed in with a Claude account (not with an API key)

Cowork and cloud sessions use the skills turned on in your claude.ai account, not ~/.claude/skills on your computer (Claude Desktop scheduled tasks run locally and still load it)

Checked against official docs 2026年11月12日 · Source: support.claude.com, support.claude.com, code.claude.com

Option 1让 Claude Code 帮你安装

复制这句话,粘贴到 Claude Code 的对话中

Where to install
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) for all my projects, at ~/.claude/skills/youtube-clipper. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) into the project this chat is open in (at .claude/skills/youtube-clipper). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

重新打开 Claude Code,输入 /Youtube-clipper-skill,或直接提出相关任务,Claude 会自动选用

Checked against official docs 2026年11月12日 · Source: code.claude.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

开发者推荐的方式

安装 Node.js(如果还没有)

已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

node -v
  • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
  • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
怎么打开终端

Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

打开 Node.js 下载页 ↗

装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

安装一次,所有需要 Node.js 的工具都能用

npx skills add https://github.com/op7418/Youtube-clipper-skill

摘自开发者 README,会下载并运行开发者的代码

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.claude/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/op7418/youtube-clipper-skill.git /tmp/popnx-skill-op7418-youtube-clipper-skill-f31f077 && mkdir -p ~/.claude/skills && cp -R '/tmp/popnx-skill-op7418-youtube-clipper-skill-f31f077/.' ~/.claude/skills/youtube-clipper-skill
  3. 重新打开 Claude Code,输入 /Youtube-clipper-skill,或直接提出相关任务,Claude 会自动选用

自己安装的 Skill 可用于 ChatGPT 桌面应用、Codex CLI 和 IDE 中的 Codex 扩展 · 网页版和手机版 ChatGPT 不能使用自己安装的 Skill,只能使用目录中插件自带的 Skill

ChatGPT 桌面应用

ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill

Option 1让 ChatGPT 帮你安装

在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中

Where to install
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) for all my projects, at ~/.agents/skills/youtube-clipper. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) into the project this chat is open in (at .agents/skills/youtube-clipper). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Option 2自己放入文件夹

把 youtube-clipper 文件夹放到 ~/.agents/skills/youtube-clipper

~ 是你的主文件夹($HOME)

不用终端:下载 ZIP,解压后把 youtube-clipper 文件夹移到 ~/.agents/skills

下载 youtube-clipper.zip

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/op7418/youtube-clipper-skill.git /tmp/popnx-skill-op7418-youtube-clipper-skill-f31f077 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-op7418-youtube-clipper-skill-f31f077/.' ~/.agents/skills/youtube-clipper-skill

安装之后

  • ChatGPT 桌面应用:打开侧边栏中的 Skills,确认 Skill 已出现
  • 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
  • Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

网页版和手机版 ChatGPT

不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill

想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

Option 1让 Codex 帮你安装

复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展

Where to install
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) for all my projects, at ~/.agents/skills/youtube-clipper. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) into the project this chat is open in (at .agents/skills/youtube-clipper). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/op7418/youtube-clipper-skill.git /tmp/popnx-skill-op7418-youtube-clipper-skill-f31f077 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-op7418-youtube-clipper-skill-f31f077/.' ~/.agents/skills/youtube-clipper-skill
  3. 重新打开 Codex 并提出相关任务,Codex 会列出这个 skill

Option 1让 Cursor 帮你安装

复制这句话,粘贴到 Cursor 的对话中

Where to install
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) for all my projects, at ~/.cursor/skills/youtube-clipper. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) into the project this chat is open in (at .cursor/skills/youtube-clipper). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

在 Cursor 的 Agent 聊天中输入 / 并选择 Youtube-clipper-skill

Checked against official docs 2026年11月12日 · Source: cursor.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.cursor/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/op7418/youtube-clipper-skill.git /tmp/popnx-skill-op7418-youtube-clipper-skill-f31f077 && mkdir -p ~/.cursor/skills && cp -R '/tmp/popnx-skill-op7418-youtube-clipper-skill-f31f077/.' ~/.cursor/skills/youtube-clipper-skill
  3. 在 Cursor 的 Agent 聊天中输入 / 并选择 Youtube-clipper-skill

Option 1Let the AI install it

适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · Copy this sentence into the app’s chat

Where to install
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) for all my projects, at ~/.claude/skills/youtube-clipper (in Codex use ~/.agents/skills/youtube-clipper, in Cursor ~/.cursor/skills/youtube-clipper). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill youtube-clipper from https://github.com/op7418/youtube-clipper-skill (commit f31f077) into the project this chat is open in (at .claude/skills/youtube-clipper; in Codex use .agents/skills/youtube-clipper, in Cursor .cursor/skills/youtube-clipper). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com

For Terminal users

其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。

在 GitHub 上查看 ↗

已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹

✓ 命令已检查 2026年11月18日

查看原始 SKILL.md

以下文字来自开发者的 repo,不是 PopNx MCP 的指令

6,417 个字符 · 在 GitHub 打开完整文件

---
name: youtube-clipper
description: >
  YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别),
  用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。
  使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。
  关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video
allowed-tools:
  - Read
  - Write
  - Bash
  - Glob
  - AskUserQuestion
model: claude-sonnet-4-5-20250514
---

# YouTube 视频智能剪辑工具

> **Installation**: If you're installing this skill from GitHub, please refer to [README.md](README.md#installation) for installation instructions. The recommended method is `npx skills add https://github.com/op7418/Youtube-clipper-skill`.

## 工作流程

你将按照以下 6 个阶段执行 YouTube 视频剪辑任务:

### 阶段 1: 环境检测

**目标**: 确保所有必需工具和依赖都已安装

1. 检测 yt-dlp 是否可用
   ```bash
   yt-dlp --version
   ```

2. 检测 FFmpeg 版本和 libass 支持
   ```bash
   # 优先检查 ffmpeg-full(macOS)
   /opt/homebrew/opt/ffmpeg-full/bin/ffmpeg -version

   # 检查标准 FFmpeg
   ffmpeg -version

   # 验证 libass 支持(字幕烧录必需)
   ffmpeg -filters 2>&1 | grep subtitles
   ```

3. 检测 Python 依赖
   ```bash
   python3 -c "import yt_dlp; print('✅ yt-dlp available')"
   python3 -c "import pysrt; print('✅ pysrt available')"
   ```

**如果环境检测失败**:
- yt-dlp 未安装: 提示 `brew install yt-dlp` 或 `pip install yt-dlp`
- FFmpeg 无 libass: 提示安装 ffmpeg-full
  ```bash
  brew install ffmpeg-full  # macOS
  ```
- Python 依赖缺失: 提示 `pip install pysrt python-dotenv`

**注意**:
- 标准 Homebrew FFmpeg 不包含 libass,无法烧录字幕
- ffmpeg-full 路径: `/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg` (Apple Silicon)
- 必须先通过环境检测才能继续

---

### 阶段 2: 下载视频

**目标**: 下载 YouTube 视频和英文字幕

1. 询问用户 YouTube URL

2. 调用 download_video.py 脚本
   ```bash
   cd ~/.claude/skills/youtube-clipper
   python3 scripts/download_video.py <youtube_url>
   ```

3. 脚本会:
   - 下载视频(最高 1080p,mp4 格式)
   - 下载英文字幕(VTT 格式,自动字幕作为备选)
   - 输出文件路径和视频信息

4. 向用户展示:
   - 视频标题
   - 视频时长
   - 文件大小
   - 下载路径

**输出**:
- 视频文件: `<id>.mp4`(使用视频 ID 命名,避免特殊字符问题)
- 字幕文件: `<id>.en.vtt`

---

### 阶段 3: 分析章节(核心差异化功能)

**目标**: 使用 Claude AI 分析字幕内容,生成精细章节(2-5 分钟级别)

1. 调用 analyze_subtitles.py 解析 VTT 字幕
   ```bash
   python3 scripts/analyze_subtitles.py <subtitle_path>
   ```

2. 脚本会输出结构化字幕数据:
   - 完整字幕文本(带时间戳)
   - 总时长
   - 字幕条数

3. **你需要执行 AI 分析**(这是最关键的步骤):
   - 阅读完整字幕内容
   - 理解内容语义和主题转换点
   - 识别自然的话题切换位置
   - 生成 2-5 分钟粒度的章节(避免半小时粗粒度切分)

4. 为每个章节生成:
   - **标题**: 精炼的主题概括(10-20 字)
   - **时间范围**: 起始和结束时间(格式: MM:SS 或 HH:MM:SS)
   - **核心摘要**: 1-2 句话说明这段讲了什么(50-100 字)
   - **关键词**: 3-5 个核心概念词

5. **章节生成原则**:
   - 粒度:每个章节 2-5 分钟(避免太短或太长)
   - 完整性:确保所有视频内容都被覆盖,无遗漏
   - 有意义:每个章节是一个相对独立的话题
   - 自然切分:在主题转换点切分,不要机械地按时间切

6. 向用户展示章节列表:
   ```
   📊 分析完成,生成 X 个章节:

   1. [00:00 - 03:15] AGI 不是时间点,是指数曲线
      核心: AI 模型能力每 4-12 月翻倍,工程师已用 Claude 写代码
      关键词: AGI、指数增长、Claude Code

   2. [03:15 - 06:30] 中国在 AI 上的差距
      核心: 芯片禁运卡住中国,DeepSeek benchmark 优化不代表实力
      关键词: 中国、芯片禁运、DeepSeek

   ... (所有章节)

   ✓ 所有内容已覆盖,无遗漏
   ```

---

### 阶段 4: 用户选择

**目标**: 让用户选择要剪辑的章节和处理选项

1. 使用 AskUserQuestion 工具让用户选择章节
   - 提供章节编号供用户选择
   - 支持多选(可以选择多个章节)

2. 询问处理选项:
   - 是否生成双语字幕?(英文 + 中文)
   - 是否烧录字幕到视频?(硬字幕)
   - 是否生成总结文案?

3. 确认用户选择并展示处理计划

---

### 阶段 5: 剪辑处理(核心执行阶段)

**目标**: 并行执行多个处理任务

对于每个用户选择的章节,执行以下步骤:

#### 5.1 剪辑视频片段
```bash
python3 scripts/clip_video.py <video_path> <start_time> <end_time> <output_path>
```
- 使用 FFmpeg 精确剪辑
- 保持原始视频质量
- 输出: `<章节标题>_clip.mp4`

#### 5.2 提取字幕片段
- 从完整字幕中过滤出该时间段的字幕
- 调整时间戳(减去起始时间,从 00:00:00 开始)
- 转换为 SRT 格式
- 输出: `<章节标题>_original.srt`

#### 5.3 翻译字幕(如果用户选择)
```bash
python3 scripts/translate_subtitles.py <subtitle_path>
```
- **批量翻译优化**: 每批 20 条字幕一起翻译(节省 95% API 调用)
- 翻译策略:
  - 保持技术术语的准确性
  - 口语化表达(适合短视频)
  - 简洁流畅(避免冗长)
- 输出: `<章节标题>_translated.srt`

#### 5.4 生成双语字幕文件(如果用户选择)
- 合并英文和中文字幕
- 格式: SRT 双语(每条字幕包含英文和中文)
- 样式: 英文在上,中文在下
- 输出: `<章节标题>_bilingual.srt`

#### 5.5 烧录字幕到视频(如果用户选择)
```bash
python3 scripts/burn_subtitles.py <video_path> <subtitle_path> <output_path>
```
- 使用 ffmpeg-full(libass 支持)
- **使用临时目录解决路径空格问题**(关键!)
- 字幕样式:
  - 字体大小: 24
  - 底部边距: 30
  - 颜色: 白色文字 + 黑色描边
- 输出: `<章节标题>_with_subtitles.mp4`

#### 5.6 生成总结文案(如果用户选择)
```bash
python3 scripts/generate_summary.py <chapter_info>
```
- 基于章节标题、摘要和关键词
- 生成适合社交媒体的文案
- 包含: 标题、核心观点、适合平台(小红书、抖音等)
- 输出: `<章节标题>_summary.md`

**进度展示**:
```
🎬 开始处理章节 1/3: AGI 不是时间点,是指数曲线

1/6 剪辑视频片段... ✅
2/6 提取字幕片段... ✅
3/6 翻译字幕为中文... [=====>    ] 50% (26/52)
4/6 生成双语字幕文件... ✅
5/6 烧录字幕到视频... ✅
6/6 生成总结文案... ✅

✨ 章节 1 处理完成
```

---

### 阶段 6: 输出结果

**目标**: 组织输出文件并展示给用户

1. 创建输出目录
   ```
   ./youtube-clips/<日期时间>/
   ```
   输出目录位于当前工作目录下

2. 组织文件结构:
   ```
   <章节标题>/
   ├── <章节标题>_clip.mp4              # 原始剪辑(无字幕)
   ├── <章节标题>_with_subtitles.mp4   # 烧录字幕版本
   ├── <章节标题>_bilingual.srt        # 双语字幕文件
   └── <章节标题>_summary.md           # 总结文案
   ```

3. 向用户展示:
   - 输出目录路径
   - 文件列表(带文件大小)
   - 快速预览命令

   ```
   ✨ 处理完成!

   📁 输出目录: ./youtube-clips/20260121_143022/

   文件列表:
     🎬 AGI_指数曲线_双语硬字幕.mp4 (14 MB)
     📄 AGI_指数曲线_双语字幕.srt (2.3 KB)
     📝 AGI_指数曲线_总结.md (3.2 KB)

   快速预览:
   open ./youtube-clips/20260121_143022/AGI_指数曲线_双语硬字幕.mp4
   ```

4. 询问是否继续剪辑其他章节
   - 如果是,返回阶段 4(用户选择)
   - 如果否,结束 Skill

---

## 关键技术点

### 1. FFmpeg 路径空格问题
**问题**: FFmpeg subtitles 滤镜无法正确解析包含空格的路径

**解决方案**: burn_subtitles.py 使用临时目录
- 创建无空格临时目录
- 复制文件到临时目录
- 执行 FFmpeg
- 移动输出文件回目标位置

### 2. 批量翻译优化
**问题**: 逐条翻译会产生大量 API 调用

**解决方案**: 每批 20 条字幕一起翻译
- 节省 95% API 调用
- 提高翻译速度
- 保持翻译一致性

### 3. 章节分析精细度
**目标**: 生成 2-5 分钟粒度的章节,避免半小时粗粒度

**方法**:
- 理解字幕语义,识别主题转换
- 寻找自然的话题切换点
- 确保每个章节有完整的论述
- 避免机械按时间切分

### 4. FFmpeg vs ffmpeg-full
**区别**:
- 标准 FFmpeg: 无 libass 支持,无法烧录字幕
- ffmpeg-full: 包含 libass,支持字幕烧录

**路径**:
- 标准: `/opt/homebrew/bin/ffmpeg`
- ffmpeg-full: `/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg` (Apple Silicon)

---

## 错误处理

### 环境问题
- 缺少工具 → 提示安装命令
- FFmpeg 无 libass → 引导安装 ffmpeg-full
- Python 依赖缺失 → 提示 pip install

### 下载问题
- 无效 URL → 提示检查 URL 格式
- 字幕缺失 → 尝试自动字幕
- 网络错误 → 提示重试

### 处理问题
- FFmpeg 执行失败 → 显示详细错误信息
- 翻译失败 → 重试机制(最多 3 次)
- 磁盘空间不足 → 提示清理空间

---

## 输出文件命名规范

- 视频片段: `<章节标题>_clip.mp4`
- 字幕文件: `<章节标题>_bilingual.srt`
- 烧录版本: `<章节标题>_with_subtitles.mp4`
- 总结文案: `<章节标题>_summary.md`

**文件名处理**:
- 移除特殊字符(`/`, `\`, `:`, `*`, `?`, `"`, `<`, `>`, `|`)
- 空格替换为下划线
- 限制长度(最多 100 字符)

---

## 用户体验要点

1. **进度可见**: 每个步骤都展示进度和状态
2. **错误友好**: 清晰的错误信息和解决方案
3. **可控性**: 用户选择要剪辑的章节和处理选项
4. **高质量**: 章节分析有意义,翻译准确流畅
5. **完整性**: 提供原始和处理后的多个版本

---

## 开始执行

当用户触发这个 Skill 时:
1. 立即开始阶段 1(环境检测)
2. 按照 6 个阶段顺序执行
3. 每个阶段完成后自动进入下一阶段
4. 遇到问题时提供清晰的解决方案
5. 最后展示完整的输出结果

记住:这个 Skill 的核心价值在于 **AI 精细章节分析** 和 **无缝的技术处理**,让用户能快速从长视频中提取高质量的短视频片段。

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

来自 GitHub

GitHub 星标
2,341
开发者
op7418
许可证
MIT
最近代码更新
2026年1月22日
repo 中的 SKILL.md 文件(含译本和模板)
1