← 返回 Skills 市场
xuyongliang-eccom

视频自动剪辑助手

作者 xuyongliang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
457
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install video-clip-assistant
功能描述
视频自动剪辑助手。基于 FFmpeg 自动提取精彩片段、生成字幕、裁剪时长、制作短视视频,支持多平台导出。当用户需要:自动剪辑视频、提取关键词片段、生成字幕并烧录、导出短视频、提取视频精华、生成视频摘要时使用此技能。
使用说明 (SKILL.md)

Video Clip Assistant

视频自动剪辑助手。基于 FFmpeg,提供视频剪切、字幕生成、短视频导出等功能。

核心能力

  1. 时间轴剪切 — 按时间戳提取片段
  2. 关键词切片 — 基于 ASR 字幕找到关键词对应片段
  3. 字幕烧录 — SRT 字幕压制到视频
  4. 短视视频导出 — 裁剪为 9:16/1:1/16:9 多比例
  5. 精华提取 — 自动从长视频提取高光片段

快速开始

按时间剪切

python3 scripts/cut_video.py --input video.mp4 --start 10 --duration 30 --output clip.mp4

提取多段

python3 scripts/cut_video.py --input video.mp4 --segments "0-30,60-90,120-150" --output ./clips/

烧录字幕

python3 scripts/burn_subtitles.py --input video.mp4 --srt subs.srt --output subtitled.mp4

导出短视频

python3 scripts/export_social.py --input video.mp4 --format vertical --duration 60 --output shorts/

脚本说明

scripts/cut_video.py

按时间轴剪切视频。

python3 scripts/cut_video.py \
  --input \x3C视频文件> \
  --start \x3C秒> \
  --duration \x3C秒> \
  [--segments "0-30,60-90"] \
  --output \x3C输出>

scripts/burn_subtitles.py

将 SRT 字幕烧录到视频。

python3 scripts/burn_subtitles.py \
  --input \x3C视频> \
  --srt \x3C字幕文件> \
  --output \x3C输出>

支持字幕位置、字体大小、颜色自定义。

scripts/export_social.py

导出为多平台适配格式。

python3 scripts/export_social.py \
  --input \x3C视频> \
  --format \x3Cvertical|square|horizontal> \
  --duration \x3C秒> \
  --output \x3C输出目录>
格式 比例 用途
vertical 9:16 抖音/快手/小红书
square 1:1 Instagram
horizontal 16:9 YouTube/B站

scripts/extract_highlights.py

从长视频自动提取精华片段。

python3 scripts/extract_highlights.py \
  --input \x3C视频> \
  --num-clips \x3C片段数> \
  --min-duration \x3C最小秒数> \
  --output \x3C输出目录>

使用场景检测算法定位精彩切换点。

scripts/generate_subtitles.py

生成 SRT 字幕文件(需要 ASR 服务)。

python3 scripts/generate_subtitles.py \
  --input \x3C视频> \
  --provider \x3Cwhisper|funclip> \
  --output \x3C字幕.srt>

典型工作流

工作流1:从会议录像提取3个精华片段

# 1. 剪切3个片段
python3 scripts/cut_video.py \
  --input meeting.mp4 \
  --segments "300-360,720-780,1200-1260" \
  --output ./clips/

# 2. 分别导出为抖音格式
for f in ./clips/*.mp4; do
  python3 scripts/export_social.py \
    --input "$f" \
    --format vertical \
    --output ./shorts/
done

工作流2:给视频加上字幕

# 1. 生成字幕
python3 scripts/generate_subtitles.py \
  --input video.mp4 \
  --provider whisper \
  --output video.srt

# 2. 烧录字幕
python3 scripts/burn_subtitles.py \
  --input video.mp4 \
  --srt video.srt \
  --output subtitled.mp4

工作流3:一键生成多个短视频

python3 scripts/export_social.py \
  --input long_video.mp4 \
  --format vertical \
  --duration 60 \
  --output ./shorts/

环境要求

  • 必须:FFmpeg(ffmpeg / ffprobe
  • 可选:FunClip(阿里开源 ASR 视频剪辑)
  • 可选:Whisper(本地或 API 模式)

安装参考

# 安装 FunClip(推荐)
pip install funclip

# 安装 Whisper
pip install openai-whisper

# FFmpeg(已有)
which ffmpeg  # 应返回路径
安全使用建议
这套脚本总体上是本地 FFmpeg 调用工具:在安装前请确认本机已安装并信任 ffmpeg/ffprobe;注意 SKILL.md 中提到的 generate_subtitles.py 未包含于包(如果你需要自动生成字幕,应向作者索取或自行实现),并且文档建议的可选 ASR(whisper/funclip)需要另外安装和配置。脚本通过 subprocess 调用 ffmpeg,执行时会读取/写入你指定的视频和字幕文件——仅对信任的本地文件运行,若担心安全可先在隔离环境或容器中测试。
功能分析
Type: OpenClaw Skill Name: video-clip-assistant Version: 1.0.0 The skill bundle provides a legitimate set of video processing tools using FFmpeg, including scripts for cutting segments (cut_video.py), burning subtitles (burn_subtitles.py), and extracting highlights (extract_highlights.py). The Python scripts use subprocess.run with argument lists to execute FFmpeg commands safely, and the logic is entirely consistent with the stated purpose of video editing. No evidence of data exfiltration, persistence, or malicious prompt injection was found.
能力评估
Purpose & Capability
技能声明为基于 FFmpeg 的自动剪辑/字幕/导出工具;所有包含的脚本都只调用本地 ffmpeg/ffprobe,并与描述的核心功能一致。但 registry 元数据未列出必需的外部二进制(FFmpeg/ffprobe),且 SKILL.md 提到的 generate_subtitles.py(ASR 生成字幕)在包内并不存在——这在功能说明与实际交付物之间造成不一致。
Instruction Scope
SKILL.md 的命令与脚本用法清晰且限定于操作本地视频文件。唯一的范围偏差是文档示例引用生成字幕的脚本 (generate_subtitles.py) 和外部 ASR 提供者(whisper|funclip),但该脚本未包含于文件清单;其它脚本不会读取不相关系统路径或环境变量,也不向外部网络发送数据。
Install Mechanism
这是 instruction-only 加上若干 Python 脚本,没有 install spec、也没有下载远程二进制或执行来自未知 URL 的代码;推荐安装的依赖(funclip、openai-whisper)来自 PyPI,FFmpeg 由系统提供,安装方式合理且无高风险安装步骤。
Credentials
技能不请求任何环境变量或凭据,代码也未读取或要求密钥/令牌;所需的权限与功能(访问本地视频文件和写输出)相称。
Persistence & Privilege
技能未要求常驻(always=false),也没有修改系统或其他技能配置,自治调用为默认且与本技能性质相符。
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install video-clip-assistant
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /video-clip-assistant 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
首发版本:FFmpeg剪切+字幕烧录+多平台导出+精华提取
元数据
Slug video-clip-assistant
版本 1.0.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 1
常见问题

视频自动剪辑助手 是什么?

视频自动剪辑助手。基于 FFmpeg 自动提取精彩片段、生成字幕、裁剪时长、制作短视视频,支持多平台导出。当用户需要:自动剪辑视频、提取关键词片段、生成字幕并烧录、导出短视频、提取视频精华、生成视频摘要时使用此技能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 457 次。

如何安装 视频自动剪辑助手?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install video-clip-assistant」即可一键安装,无需额外配置。

视频自动剪辑助手 是免费的吗?

是的,视频自动剪辑助手 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

视频自动剪辑助手 支持哪些平台?

视频自动剪辑助手 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 视频自动剪辑助手?

由 xuyongliang(@xuyongliang-eccom)开发并维护,当前版本 v1.0.0。

💬 留言讨论