Video Post-Production
Use this skill when the user gives you one raw video and wants a finished
short video with:
- - readable subtitles
- highlighted key phrases
- basic SFX emphasis
- optional BGM
- a rendered export
The default workflow is single-input automation: the user provides the
video, and you handle the rest.
Inputs
Required:
- - one raw video file with spoken audio
Optional:
- - preferred subtitle color/style
- preferred BGM mood
- preferred SFX intensity
- existing BGM file
- existing SFX directory
If optional inputs are missing, proceed with defaults.
Outputs
Create a working directory next to the input video:
Expected output files:
- - INLINECODE1
- INLINECODE2
- INLINECODE3
- INLINECODE4
Default behavior
If the user does not specify a style:
- - subtitles: bold, high-contrast, mobile-readable
- highlights: only on high-value phrases
- SFX: light to medium density
- BGM: optional, low-volume, ducked under speech
Do not block on missing BGM or SFX. A valid delivery can still be:
- - subtitles only
- subtitles + generated simple SFX
- subtitles + BGM
Workflow
1. Check prerequisites
Confirm these are available:
- - INLINECODE5
- INLINECODE6
- INLINECODE7
- INLINECODE8 if transcription is needed
- a Chinese-capable font for ASS rendering
Use:
CODEBLOCK0
If faster-whisper is missing:
CODEBLOCK1
2. Transcribe the video
Run:
CODEBLOCK2
This produces word-level timing and segment-level timing.
3. Build a post-production plan
Read alignment.json and produce production_plan.json.
The plan must contain:
- - INLINECODE12
- INLINECODE13
- INLINECODE14
Minimum shape:
CODEBLOCK3
Planning rules
Subtitle grouping:
- - group into natural spoken phrases
- do not split a phrase awkwardly
- prefer 3-8 Chinese characters per phrase
- prefer 0.5s or longer readable display windows
- keep within mobile reading comfort
Keyword highlighting:
- - highlight emotional, contrastive, numeric, warning, CTA, and payoff phrases
- do not over-highlight
- default target: 1-3 highlighted phrases per 10 seconds
SFX placement:
- - opening transitions
- key claims
- warnings
- CTA moments
- major topic pivots
Do not place SFX on every subtitle. Keep it sparse enough to feel intentional.
BGM choice:
- - educational / explainer -> uplifting / neutral
- warning / risk -> tense / restrained
- positive / benefit-driven -> hopeful / energetic
4. Generate ASS subtitles
Run:
CODEBLOCK4
If you need deeper ASS styling guidance, read:
5. Prepare audio
BGM
Preferred order:
- 1. user-provided BGM
- existing local BGM in workspace
- proceed without BGM
If BGM exists, prepare it:
CODEBLOCK5
SFX
Preferred order:
- 1. user-provided SFX directory
- existing local SFX directory
- generate simple fallback tones/noise
If no SFX files are available, read:
6. Render final video
Run:
CODEBLOCK6
If no BGM exists, omit --bgm.
If no SFX directory exists, omit --sfx-dir.
Quality bar
The result should feel like a polished short-form knowledge video:
- - subtitles are easy to read on mobile
- highlighted words are meaningful, not noisy
- SFX emphasize real rhetorical beats
- BGM stays below speech and never masks intelligibility
- final export is usable without extra manual cleanup
Fallback rules
If the raw video is usable but supporting resources are missing:
- - still deliver subtitles and a rendered video
- note what was skipped
- do not block the whole workflow waiting for perfect assets
If transcription quality is poor:
- - keep subtitle grouping conservative
- prefer fewer highlights
- avoid aggressive SFX timing
Bundled resources
Scripts:
- - INLINECODE19
- INLINECODE20
- INLINECODE21
References:
- - INLINECODE22
- INLINECODE23
Final delivery checklist
Before finishing, ensure:
- -
alignment.json exists - INLINECODE25 exists
- INLINECODE26 exists
- final video renders successfully
- subtitles are visible
- speech remains clear
- SFX and BGM are not overpowering
视频后期制作
当用户向您提供一段原始视频并希望获得以下内容的成品短视频时,请使用此技能:
- - 可读的字幕
- 高亮的关键短语
- 基础音效强调
- 可选背景音乐
- 渲染导出
默认工作流程为单输入自动化:用户提供视频,您处理其余部分。
输入
必需:
可选:
- - 偏好的字幕颜色/样式
- 偏好的背景音乐情绪
- 偏好的音效强度
- 现有的背景音乐文件
- 现有的音效目录
如果缺少可选输入,则使用默认值。
输出
在输入视频旁创建一个工作目录:
预期输出文件:
- - alignment.json
- production_plan.json
- subtitles.ass
- final.mp4
默认行为
如果用户未指定样式:
- - 字幕:粗体、高对比度、移动端可读
- 高亮:仅针对高价值短语
- 音效:轻度至中度密度
- 背景音乐:可选、低音量、在语音下方闪避
不要因缺少背景音乐或音效而阻塞流程。有效的交付仍可以是:
- - 仅字幕
- 字幕 + 生成的简单音效
- 字幕 + 背景音乐
工作流程
1. 检查先决条件
确认以下工具可用:
- - ffmpeg
- ffprobe
- python3
- faster-whisper(如需转录)
- 用于ASS渲染的中文字体
使用:
bash
ffmpeg -version | head -1
ffprobe -version | head -1
python3 -c from fasterwhisper import WhisperModel; print(fasterwhisper OK) 2>/dev/null || echo 需要:pip3 install faster-whisper
如果缺少 faster-whisper:
bash
pip3 install faster-whisper
2. 转录视频
运行:
bash
python3 <技能路径>/scripts/align_speech.py \
--video <输入视频> \
--output <工作目录>/alignment.json \
--model medium \
--language zh
这将生成单词级时间戳和片段级时间戳。
3. 构建后期制作计划
读取 alignment.json 并生成 production_plan.json。
计划必须包含:
最小结构:
json
{
subtitle_groups: [],
sfx: [],
bgm: {
mood: 鼓舞人心的,
tempo: 中等,
volume: -18
}
}
规划规则
字幕分组:
- - 按自然口语短语分组
- 不要生硬地拆分短语
- 每个短语优选3-8个中文字符
- 优选0.5秒或更长的可读显示窗口
- 保持在移动端阅读舒适范围内
关键词高亮:
- - 高亮情感性、对比性、数字、警告、行动号召和关键结论短语
- 不要过度高亮
- 默认目标:每10秒1-3个高亮短语
音效放置:
- - 开场过渡
- 关键声明
- 警告
- 行动号召时刻
- 主要话题转折点
不要在每条字幕上都放置音效。保持稀疏以显得有意图。
背景音乐选择:
- - 教育/解说类 -> 振奋/中性
- 警告/风险类 -> 紧张/克制
- 积极/利益驱动类 -> 充满希望/充满活力
4. 生成ASS字幕
运行:
bash
python3 <技能路径>/scripts/generate_subtitles.py \
--plan <工作目录>/production_plan.json \
--output <工作目录>/subtitles.ass \
--video-width 720 \
--video-height 1280 \
--font 黑体 SC \
--font-size 48
如需更深入的ASS样式指导,请阅读:
- - <技能路径>/references/ass_effects.md
5. 准备音频
背景音乐
优先级顺序:
- 1. 用户提供的背景音乐
- 工作区中现有的本地背景音乐
- 不使用背景音乐继续
如果存在背景音乐,准备它:
bash
ffmpeg -stream_loop -1 -i <背景音乐文件> -t <视频时长> \
-af volume=-18dB,afade=t=in:d=2,afade=t=out:st=<时长-3>:d=3 \
-y <工作目录>/bgm_prepared.wav
音效
优先级顺序:
- 1. 用户提供的音效目录
- 现有的本地音效目录
- 生成简单的备用音调/噪声
如果没有可用的音效文件,请阅读:
- - <技能路径>/references/audio_resources.md
6. 渲染最终视频
运行:
bash
python3 <技能路径>/scripts/render_video.py \
--input <输入视频> \
--subtitles <工作目录>/subtitles.ass \
--plan <工作目录>/production_plan.json \
--bgm <工作目录>/bgm_prepared.wav \
--sfx-dir <工作目录>/sfx \
--output <工作目录>/final.mp4 \
--resolution 720x1280
如果没有背景音乐,省略 --bgm。
如果没有音效目录,省略 --sfx-dir。
质量标准
结果应感觉像精良的短视频知识类内容:
- - 字幕在移动端易于阅读
- 高亮词语有意义,不杂乱
- 音效强调真实的修辞节奏
- 背景音乐保持在语音下方,不掩盖可懂度
- 最终导出无需额外手动清理即可使用
备用规则
如果原始视频可用但缺少支持资源:
- - 仍然交付字幕和渲染视频
- 注明跳过的内容
- 不要为了等待完美素材而阻塞整个工作流程
如果转录质量较差:
- - 保持字幕分组保守
- 减少高亮数量
- 避免激进音效时间安排
捆绑资源
脚本:
- - scripts/alignspeech.py
- scripts/generatesubtitles.py
- scripts/render_video.py
参考资料:
- - references/asseffects.md
- references/audioresources.md
最终交付检查清单
完成前,确保:
- - alignment.json 存在
- production_plan.json 存在
- subtitles.ass 存在
- 最终视频成功渲染
- 字幕可见
- 语音保持清晰
- 音效和背景音乐不过度