Install
openclaw skills install video-clip-assistant视频自动剪辑助手。基于 FFmpeg 自动提取精彩片段、生成字幕、裁剪时长、制作短视视频,支持多平台导出。当用户需要:自动剪辑视频、提取关键词片段、生成字幕并烧录、导出短视频、提取视频精华、生成视频摘要时使用此技能。
openclaw skills install video-clip-assistant视频自动剪辑助手。基于 FFmpeg,提供视频剪切、字幕生成、短视频导出等功能。
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/
按时间轴剪切视频。
python3 scripts/cut_video.py \
--input <视频文件> \
--start <秒> \
--duration <秒> \
[--segments "0-30,60-90"] \
--output <输出>
将 SRT 字幕烧录到视频。
python3 scripts/burn_subtitles.py \
--input <视频> \
--srt <字幕文件> \
--output <输出>
支持字幕位置、字体大小、颜色自定义。
导出为多平台适配格式。
python3 scripts/export_social.py \
--input <视频> \
--format <vertical|square|horizontal> \
--duration <秒> \
--output <输出目录>
| 格式 | 比例 | 用途 |
|---|---|---|
| vertical | 9:16 | 抖音/快手/小红书 |
| square | 1:1 | |
| horizontal | 16:9 | YouTube/B站 |
从长视频自动提取精华片段。
python3 scripts/extract_highlights.py \
--input <视频> \
--num-clips <片段数> \
--min-duration <最小秒数> \
--output <输出目录>
使用场景检测算法定位精彩切换点。
生成 SRT 字幕文件(需要 ASR 服务)。
python3 scripts/generate_subtitles.py \
--input <视频> \
--provider <whisper|funclip> \
--output <字幕.srt>
# 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
# 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
python3 scripts/export_social.py \
--input long_video.mp4 \
--format vertical \
--duration 60 \
--output ./shorts/
ffmpeg / ffprobe)# 安装 FunClip(推荐)
pip install funclip
# 安装 Whisper
pip install openai-whisper
# FFmpeg(已有)
which ffmpeg # 应返回路径