将自带画面内嵌中文字幕的视频,按真实字幕出现的精确帧裁切并拼成社交平台长图。用户要求保留原视频字幕、原生字幕拼图、字幕帧截图、不要重绘字幕、主画面加字幕条,或要把这种样式做成固定模板时使用;也用于修改既有原生字幕拼图的时间点、字幕区域、比例和画面数量。
npx skills add https://github.com/chengyi-ai/native-subtitle-quote-image --skill native-subtitle-quote-image
只处理画面中已经存在字幕的视频。不要重写、翻译或覆盖字幕;成品中的文字必须来自原视频帧。
<SKILL_DIR> 解析为当前 SKILL.md 所在目录的绝对路径。不要假设 Agent 的工作目录就是 Skill 目录。 python3 -c "from PIL import Image; import imageio_ffmpeg; print(imageio_ffmpeg.get_ffmpeg_exe())"
python3 -m pip install -r "<SKILL_DIR>/requirements.txt"
0.68–0.96;实际位置不符时先预览再调整。$video-quote-image。 python3 "<SKILL_DIR>/scripts/native_subtitle_stitch.py" band VIDEO -t 60 \
--band-top 0.68 --band-bottom 0.96 --out band-preview.jpg
{
"images": [
{"title": "热爱让创作发生", "times": [12, 16, 18, 22, 24]}
]
}
python3 "<SKILL_DIR>/scripts/native_subtitle_stitch.py" render VIDEO \
--manifest manifest.json --out-dir OUTPUT_DIR \
--aspect 3:4 --width 1440 --band-top 0.68 --band-bottom 0.96
final_contact_sheet.jpg。检查字幕完整、无重复、无人脸被异常切断、画面条之间无黑边或空白。0.60–0.97。scripts/native_subtitle_stitch.py:精确取帧、裁切、拼图和总览图生成器。requirements.txt:运行脚本所需的 Python 依赖。向用户提供输出目录、总览图、时间点 manifest 和 ZIP(若用户需要)。直接展示总览图。不得把未经逐张检查的图片报告为完成。
Take chengyi-ai/native-subtitle-quote-image from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.