Skip to content
Agentmart
Submit a tool

video-editing

Automated video editing skill for talk/vlog/standup videos.

Skill by LeoYeAI

IndexedMIT★ 2,168
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/leoyeai-video-editing

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Automated video editing skill for talk/vlog/standup videos. Use when: cutting video, splitting video into sentences, merging video clips, extracting audio, transcribing speech, auto-editing oral presentation videos, combining selected sentence clips into a final video, generating video cover/thumbnail with title. Requires ffmpeg and whisper.

Use cases: presentations, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/video-editing

What's inside

Skill name
video-editing
Description
Automated video editing skill for talk/vlog/standup videos. Use when: cutting video, splitting video into sentences, merging video clips, extracting audio, transcribing speech, auto-editing oral presentation videos, combining selected sentence clips into a final video, generating video cover/thumbnail with title. Requires ffmpeg and whisper.
License
MIT
Instructions
363 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: "video-editing" does not match folder "auto-video-editing"

Files (12)

  • README.md
  • SKILL.md
  • _meta.json
  • add_chapter_bar.py · scripts/
  • burn_subtitles.py · scripts/
  • extract_audio.py · scripts/
  • extract_audio.sh · scripts/
  • generate_cover.py · scripts/
  • merge_clips.py · scripts/
  • split_video.py · scripts/
  • transcribe.py · scripts/
  • utils.py · scripts/

SKILL.md (first lines)

# Auto Video Editing(自动视频剪辑)

根据语音内容,将口播/脱口秀类视频按句子自动切分,然后按用户选择合成带字幕的最终视频。

## Prerequisites(前置要求)

在执行任何操作之前,先运行环境检测:

```bash
python3 scripts/utils.py
```

这会自动检测平台(macOS/Linux/WSL/Windows)、GPU 类型、可用编码器、Whisper 引擎,并给出诊断报告。

如果缺少依赖,提示用户安装:
- **ffmpeg**: `brew install ffmpeg`(macOS)或 `apt install ffmpeg`(Linux/WSL)或下载 Windows 版本
- **whisper**: `pip install faster-whisper`(推荐,速度快 4 倍)或 `pip install openai-whisper`
- **中国用户**加速安装:`pip install faster-whisper -i https://pypi.tuna.tsinghua.edu.cn/simple`

如果项目根目录有 `.venv` 虚拟环境,运行 Python 脚本前先激活:
```bash
source .venv/bin/activate  # macOS/Linux/WSL
# Windows: .venv\Scripts\activate
```

### 平台说明

- **macOS (Apple Silicon)**: 自动使用 VideoToolbox 硬件编码加速,Whisper 推荐 large-v3-turbo 模型
- **macOS (Intel)**: 使用 VideoToolbox 编码,Whisper 使用 CPU 模式
- **Linux**: 自动检测 NVIDIA GPU (NVENC)、Intel QSV、AMD AMF
- **WSL**: 支持,自动检测 Windows 字体路径 (`/mnt/c/Windows/Fonts/`)
- **Windows**: 建议使用 WSL2 环境运行;支持 QSV/AMF 硬件编码
- **无独显 (集成显卡)**: Intel iGPU 使用 QSV 编码,AMD iGPU 使用 AMF 编码;Whisper 建议 medium 模型(而非 large)
- **中国用户**: 自动检测中国区域,使用清华 pip 镜像和 HuggingFace 镜像下载模型,也可通过 `--mirror` 参数强制启用

## Workflow(工作流程)

### Phase 1: Audio Extraction(音频提取)

对每个输入视频文件,使用 [extract_audio.py](./scripts/extract_audio.py) 提取音频:

```bash
python3 scripts/extract_audio.py "<video_path>"
```

输出:与视频同目录下的 `<video_name>_audio.wav` 文件。

### Phase 2: Speech Recognition(语音识别)

使用 [transcribe.py](./scripts/transcribe.py) 对音频进行语音识别,生成带时间戳的逐句文本:

```bash
python3 scripts/transcribe.py "<audio_path>" --model auto --language zh
```

- `--model auto`:根据硬件自动选择最佳模型(NVIDIA GPU → large-v3,Apple Silicon → large-v3-turbo,集成显卡 → medium,纯 CPU → small)
- 也可手动指定:`tiny`, `base`, `small`, `medium`, `large-v3`, `large-v3-turbo`
- `--engine auto`:自动检测 faster-whisper(推荐)或 openai-whisper
- `--mirror`:中国用户使用镜像源下载模型
- `--language`:`zh`(中文),`en`(英文),`ja`(日文)等,也可省略让 whisper 自动检测

输出:与音频同目录下的 `<video_name>_transcript.json` 文件,格式如下:

```json
{
  "segments": [
    {"id": 1, "start": 0.0, "end": 2.5, "text": "大家好"},
    {"id": 2, "start": 2.5, "end": 5.1, "text": "今天我们来聊一个话题"}
  ]
}
```

**转录后检查**:如果文本中有明显的识别错误(如产品名、专有名词),应修正 transcript.json 中的文字后再进行后续步骤。

### Phase 3: Video Splitting(视频切分)

使用 [split_video.py](./scripts/split_video.py) 根据转录结果将视频切分为独立片段:

```bash
python3 scripts/split_video.py "<video_path>" "<transcript_json_path>"
```

输出:在视频同目录下创建 `<video_name>_clips/` 文件夹,包含按句子编号命名的片段文件,如 `clip_001.mp4`, `clip_002.mp4` 等。

**注意**:
- 默认 padding 为 0(片段间无重叠),避免合成时出现重复音频。
- 使用精确重编码切割(`-ss` 后置 + re-encode),确保音频在句子边界精确切断。

### Phase 3.5: Subtitle Burning(字幕烧录)

使用 [burn_subtitles.py](./scripts/burn_subtitles.py) 为每个片段烧录字幕:

```bash
python3 scripts/burn_subtitles.py "<clips_dir>" "<transcript_json_path>"
```

字幕行为:
- **自动检测语言**:中文内容自动使用中文字幕,英文内容使用英文字幕。
- **自动折行**:长字幕自动分成两行,不会超出屏幕边界。
- **竖屏优化**:字体大小按短边(宽度)缩放,字幕位置在画面 72% 高度处,适配小红书等竖屏平台。
- **中文字体优先级**:
  1. 首先尝试从 Google Fonts 下载 **Noto Sans SC**(会缓存到 skill 的 `fonts/` 目录)
  2. 如果下载失败,macOS 使用 **PingFang SC**(苹方);Windows 使用 **Microsoft YaHei**(微软雅黑)
- 可用 `--font-path` 指定自定义字体文件
- 可用 `--font-size` 调整字号(默认 48,基于 1080p 自动缩放)

输出:`<video_name>_clips_subtitled/` 目录,包含带字幕的片段。

**注意**:此步骤完成后,Phase 4-5 中应使用 `_clips_subtitled/` 目录而非 `_clips/` 目录。

### Phase 4: User Interaction(用户交互)

**展示片段列表给用户**,格式如下:

```
视频片段列表:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  #   | 时间区间          | 内容
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

From LeoYeAI/openclaw-master-skills, MIT.

More from LeoYeAI/openclaw-master-skills

Signals

Stars
2,168
Forks
325
Open issues
13
Last commit (this folder)
Jul 20, 2026 (3 months ago)
Last release
Jul 20, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
Website
myclaw.ai
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from LeoYeAI

Cite this page

video-editing skill. Agent Mart. https://agentmart.dev/skills/leoyeai-video-editing (last updated 2026-10-24)