为了让方便用户更快速、灵活的配置时间线,智能云剪辑提供了模板工厂,可以大幅简化重复劳动、提升开发效率。本文将向您介绍使用字幕模板配置时间线 Timeline 示例。
字幕模板配置时间线示例
通常在没有模板情况下,对时间线素材 整体静音添加黑色字体字幕特效,需要写如下配置:
{
"VideoTracks": [
{
"VideoTrackClips": [
{
"MediaId" : "****7e05512043f49f697f7425b9****",
"Effects": [
{
"Type": "Volume",
"Gain": "0",
},
{
"Type": "Text",
"X": "10",
"Y": "10",
"TimelineIn": "0",
"Font": "WenQuanYi Zen Hei Mono",
"Content": "测试标题1",
"FontSize": 26,
"FontColorOpacity": 0.2,
"FontColor": "#000000",
}
]
},
{
"MediaId" : "****d22788e810116a45109f2ea8****",
"Effects": [
{
"Type": "Volume",
"Gain": "0",
},
{
"Type": "Text",
"X": "10",
"Y": "10",
"TimelineIn": "0",
"Font": "WenQuanYi Zen Hei Mono",
"Content": "测试标题2",
"FontSize": 26,
"FontColorOpacity": 0.2,
"FontColor": "#000000",
}
]
},
{
"MediaId" : "****f167f44f4964e6c998dee827****",
"Effects": [
{
"Type": "Volume",
"Gain": "0",
},
{
"Type": "Text",
"X": "10",
"Y": "10",
"TimelineIn": "0",
"Font": "WenQuanYi Zen Hei Mono",
"Content": "测试标题3",
"FontSize": 26,
"FontColorOpacity": 0.2,
"FontColor": "#000000",
}
]
}
]
}
]
}
当使用了模板后,配置简化如下:
{
"VideoTracks": [
{
"VideoTrackClips": [
{
"Sys_Type" : "Array",
"Sys_ArrayObject" : "$VideoArray",
"Sys_Template" : {
"MediaId" : "$MediaId",
"Effects": [
{
"Type": "Volume",
"Gain": "0"
},
{
Sys_Type : "Template",
Sys_TemplateID : "IceSysDemo_BlackColorTitle",
Sys_Params: {
Title : "$Title",
}
}
]
}
}
]
}
]
}
其中此部分是引用了 黑色字体字幕特效 模板:
{
Sys_Type : "Template",
Sys_TemplateID : "IceSysDemo_BlackColorTitle",
Sys_Params : {
Title : "$Title",
}
}
参数说明:
参数 | 说明 |
---|---|
Sys_Type | 表示为模板,默认值:Template |
Sys_TemplateID | 模板ID |
Sys_Params | 模板参数 |
在文档使用中是否遇到以下问题
更多建议
匿名提交