json-to-jianying-description
将特定的JSON视频素材格式(包含oralBroadcastingList、materialList、bgmInfo等字段)转换为剪映API可用的自然语言视频描述。用于根据素材JSON生成视频制作指令,包括素材匹配、时间轴计算、字幕时间同步、特殊效果处理等。当用户发送包含oralBroadcastingList和materialList的JSON数据,并要求生成视频或视频描述时触发此skill。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/2719040953/json-to-jianying-descriptionJSON 转剪映视频描述
输入格式
用户会发送一个包含以下关键字段的 JSON:
{
"oralBroadcastingList": [
{
"oralText": "文案内容",
"materialDesc": "素材描述",
"materialKey": "desc_material_xxx.jpg",
"ttsResult": {
"text": "实际朗读文本",
"duration": 2.28,
"audioOssBucket": "np-vediooss-material",
"audioOssKey": "volc_tts_xxx.mp3",
"captionStartEnds": [
{ "caption": "字幕1", "startSecond": 0.0, "endSecond": 1.12, "duration": 1.12 },
{ "caption": "字幕2", "startSecond": 1.12, "endSecond": 2.28, "duration": 1.16 }
]
}
}
],
"materialList": [
{
"ossBucket": "np-vediooss-material",
"ossKey": "desc_material_xxx.jpg",
"url": "https://...",
"desc": "素材描述"
}
],
"bgmInfo": {
"ossBucket": "np-vediooss-material",
"ossKey": "desc_material_xxx.mp3",
"url": "https://...",
"title": "背景音乐标题",
"duration": 193000
}
}
输出格式
转换为自然语言描述,格式如下:
视频总时长:X秒
0-X秒是 {materialKey} 这个素材,对应的字幕:
- 0.0-1.21 秒是 "字幕1"
- 1.21-1.91 秒是 "字幕2"
...
X-Y秒是 {materialKey} 这个素材,对应的字幕:
...
背景图:{ossKey}
特殊需求:
- 在某某时间段插入图片:{ossKey}
- 给某素材添加某某特效
转换步骤
1. 解析 oralBroadcastingList
- 遍历
oralBroadcastingList数组 - 每个元素代表一个视频片段
- 使用
ttsResult.captionStartEnds计算该片段的起止时间
2. 计算时间轴
- 起始时间:累加前面所有片段的 duration
- 结束时间:起始时间 + 当前片段的 ttsResult.duration
- 每个字幕的绝对时间 = 片段起始时间 + captionStartEnds 中的相对时间
3. 匹配素材
- 从
materialList中查找ossKey与oralBroadcastingList[].materialKey匹配的素材 - 使用
url字段作为素材地址
4. 处理背景图
- 默认使用
materialList中的第一张图片作为背景图 - 或使用用户指定的背景图
5. 处理 BGM
- 提取
bgmInfo.url作为背景音乐
6. 特殊需求识别
用户可能会指定额外需求,如:
- 在某时间段插入额外图片
- 给某素材添加特效(如"放映滚动")
- 调整素材顺序
素材地址拼接
图片/视频/音频素材地址拼接:
- 基础URL:
http://np-newsmgr-uat.emapd.com/videomake/api/resource/download/bucket - 拼接方式:
${baseUrl}?filename=${ossKey}&bucket=${ossBucket}
示例:
- ossKey:
深色质感背景图3.png,bucket:np-vediooss-material - 完整地址:
http://np-newsmgr-uat.emapd.com/videomake/api/resource/download/bucket?filename=深色质感背景图3.png&bucket=np-vediooss-material
完整示例
输入 JSON(用户提供的例子)
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-2719040953-json-to-jianying-description": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
process-output
DEFAULT OUTPUT MODE: Always emit machine-parseable `openclaw-process` fenced JSON blocks in your assistant reply so a custom web client can render a live progress panel. Use when: any user message. Skip ONLY when the user explicitly requests no intermediate process (e.g. '只给最终答案'). Keep it lightweight for simple Q&A.
jianying-video-compose
剪映API视频合成自动化。通过剪映代理API完成视频全流程制作,包括草稿创建、素材添加(图片/视频/音频)、文本字幕编辑、特效处理、云渲染导出。适用于需要批量生成视频、自动合成短视频、动态字幕视频等场景。