Before you specify the TemplateId parameter to submit an editing and production job, you must configure the Config field to create a template based on your business requirements. This topic describes how to configure basic templates.
Usage notes
For more information about how to create and use a basic template by using the Config field, see Create and use a basic template.
Examples
Merge videos
{
"VideoTracks": [
{
"VideoTrackClips": [
{
"Sys_Type" : "ArrayItems",
"Sys_ArrayObject" : "$VideoArray",
"Sys_Template" : {
"MediaId" : "$MediaId"
}
}
]
}
]
}
Add opening or ending parts
{
"VideoTracks": [
{
"VideoTrackClips": [
{
"MediaId": "******be49ef6b7f9f663a8a97******"
},
{
"Sys_Type" : "ArrayItems",
"Sys_ArrayObject" : "$VideoArray",
"Sys_Template" : {
"MediaId" : "$MediaId"
}
},
{
"MediaId": "******9956582a68a59e244a59******"
}
]
}
]
}
Add watermarks
{
"VideoTracks": [
{
"VideoTrackClips": [
{
"Sys_Type" : "ArrayItems",
"Sys_ArrayObject" : "$VideoArray",
"Sys_Template" : {
"MediaId" : "$MediaId"
}
}
]
}
],
"ImageTracks": [
{
"ImageTrackClips": [
{
"ImageId": "******e01cb05d417c3dbcd1b9******",
"Width" : 200,
"Height" : 60,
"X" : 40,
"Y" : 40
}
]
}
]
}
Mute a video track
{
"VideoTracks": [
{
"VideoTrackClips": [
{
"Sys_Type" : "ArrayItems",
"Sys_ArrayObject" : "$VideoArray",
"Sys_Template" : {
"MediaId" : "$MediaId",
"Effects": [
{
"Type": "Volume",
"Gain": "0"
}
]
}
}
]
}
]
}
Mute a video and dub the video with a full audio resource
This template mutes a video and dubs the video with a full audio resource to generate a new video.
{
"VideoTracks": [
{
"VideoTrackClips": {
"Sys_Type" : "Array",
"Sys_ArrayObject" : "$VideoArray",
"Sys_Template" : {
"MediaId" : "$MediaId",
"Effects": [
{
"Type": "Volume",
"Gain": "0",
}
]
}
}
}
],
"AudioTracks": [
{
"AudioTrackClips": {
"Sys_Type" : "Array",
"Sys_ArrayObject" : "$AudioArray",
"Sys_Template" : {
"MediaId" : "$MediaId",
}
}
}
]
}
Note If the audio is longer than the video, the audio is truncated. The total duration of the video is the duration of the merged video.