This topic describes the production parameters for highlight montages.
Note: When you use this API, the region specified in the Object Storage Service (OSS) URL for all media assets must match the region of the OpenAPI endpoint that you call.
Supported regions: China (Shanghai), China (Beijing), China (Hangzhou), China (Shenzhen), US (West), and Singapore. The action label detection feature (corresponding to the EnableActionRecog and CustomActions parameters) is supported only in the China (Shanghai) region.
This version does not support video materials without human voices. Ensure that your video materials meet this requirement.
When you use the service, replace parameters such as [your-bucket], [your-region-id], [your-file-name], [your-file-path], and media asset IDs (for example, "****9d46c8b4548681030f6e****") in the examples with your actual values.
Usage notes
To create a highlight montage from multiple video materials and batch-produce videos with a single click, see SubmitScreenMediaHighlightsJob - Submit a highlight montage job. For more information about the key API parameters, see the InputConfig, EditingConfig, and OutputConfig parameter sections below.
To retrieve the details of a batch smart video production job, see GetBatchMediaProducingJob - Get information about a batch smart video production job.
InputConfig parameters
Configure InputConfig to specify the parameters for basic materials such as video footage, voiceovers, background music, and stickers.
Parameter | Type | Description | Example | Required |
MediaArray | List<String> |
| See Parameter examples. | Yes |
HighlightStrategy | The highlight montage policy. | See Parameter examples. | No | |
OpeningArray | List<Media> |
| See Parameter examples. | No |
EndingArray | List<Media> |
| See Parameter examples. | No |
TitleArray | List<String> | Titles. A maximum of 50 titles are supported. One title is randomly selected for each production. Each title can contain up to 50 characters. | ["Hema Fresh in Huilongguan is now open","Hema Fresh is now open"] | No |
SubHeadingArray | List<SubHeading> | Subheadings. Up to five levels of subheadings are supported. | See Parameter examples. | No |
StickerArray | List<Sticker> |
| See Parameter examples. | No |
BackgroundMusicArray | List<String> |
| See Parameter examples. | No |
BackgroundImageArray | List<String> |
| See Parameter examples. | No |
HighlightStrategy parameters
Parameter | Data type | Description | Example | Required |
IntroConfig | JSON | Configuration for the beginning of the highlight section.
| {"Mode":"Disabled"} | No |
TargetDurationConfig | Configuration for the output video duration. | {"TargetDuration": 180, "SpeedRange": [0.95, 1]} | No | |
PlotPacingType | String |
| Slow | No. Default value: Normal. |
ThemeConfig | Configuration related to the editing theme. | {"ThemeType":"JumpHighlight" } | No | |
HighlightDescription | String | A description of the highlight extraction policy. This parameter takes effect only when ThemeConfig.ThemeType is set to SmoothHighlight. | Prioritize scenes with the following features. Obvious externalized emotions: The male protagonist directly expresses strong emotions through actions, such as anger, protection, or comeback (for example, the 'rivalry' between the male protagonist and his older brother). Strong contrast: Convey internal conflicts through contrasting behaviors or identities (such as power struggles or emotional tension). Concentrated plot conflicts: Focus on the protagonist's core conflicts, such as family feuds or disguised identities, to enhance viewer engagement. Prominent dramatic plots: Include bizarre dialogues or plot twists (such as 'a woman disguised as a man is recognized') to increase appeal and create buzz. | No |
FaceInfo |
| {"ImageInfoList":[{"Name":"Ning X","ImageURL":"http://[your-cdn-domain]/[your-file-path]/face1.png"}]} | No | |
EnableActionRecog | Boolean | Specifies whether to enable action detection. If enabled, highlight clips are selected based on action detection results. Note Action detection is supported only in the China (Shanghai) region. | true | No. Default value: false. |
CustomActions | List<String> | Custom action labels. The system prioritizes mapping based on the provided label names. Example: ["fighting","crying"]. The array can contain up to 50 labels. Each label can contain up to 5 characters. Note Action detection is supported only in the China (Shanghai) region. | ["fighting","crying"] | No |
ThemeConfig parameters
Parameter | Data type | Description | Example | Required |
ThemeType | String |
| SmoothHighlight | No. Default value: JumpHighlight. |
TargetDurationConfig parameters
Parameter | Data type | Description | Example | Required |
TargetDuration | Float |
| 180 | No |
SpeedRange | List<String> | The speed adjustment range. If you want the output video to have a fixed speed, set the start and end values of the speed range to be the same. For example, [1.2, 1.2] sets the speed to 1.2x. If you want the actual duration of the output video to be as close as possible to TargetDuration, you can set an acceptable speed range. For example:
| [0.95, 1] | No |
FaceInfo parameters
Parameter | Type | Description | Required |
ImageInfoList | List<ImageInfo> | A list of photos of the characters (faces). The list can contain up to 200 photos. | No |
ImageInfo parameters
Parameter | Type | Description | Example | Required |
Name | String | The name of the character (face). | Daniel | Yes |
ImageURL | String | The storage address of the character's (face) photo. The URL must be accessible over the Internet. Make sure that the face image contains only one person, and the face is clear, without significant obstructions or missing parts. | http://[your-cdn-domain]/[your-file-path]/face1.png | Yes, one is required. |
ImageId | String | The media asset ID of the image. | ****9d46c886b45481030f6e**** |
Media parameters
Parameter | Data type | Description | Example | Required |
MediaId | String | The media asset ID. | ****b4549dfvc88681030f6e**** | You must specify one of the two. If both are specified, MediaId is used. |
MediaURL | String | The URL of the media asset. Only self-managed OSS is supported. | Rule: http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-path]/[your-file-name]_{index}.mp4 Example: http://example.oss-cn-shanghai.aliyuncs.com/example/example_{index}.mp4 | |
In | Float | When the material is a video, this is the in-point of the material, in seconds. | 0 | No |
Out | Float | When the material is a video, this is the out-point of the material, in seconds. | 5 | No |
Duration | Float | When the material is an image, this is the display duration of the material, in seconds. | 2 | No |
DyncFrames | Integer | When the material is a GIF, this is the number of frames in the animated image. | 25 | No |
Parameter examples
Smooth-cut editing
{
"MediaArray": [
"****9d46c8b42f4581030f6e****",
"****9d46c8b4frtf81030f6e****",
"****9d46c8b4asdf81030f6e****",
"****9d46c8b43d3481030f6e****"
],
"HighlightStrategy": {
"IntroConfig": {
"Mode": "Disabled"
},
"TargetDurationConfig": {
"TargetDuration": 300
},
"ThemeConfig": {
"ThemeType": "SmoothHighlight"
},
"HighlightDescription":"Prioritize scenes with the following features. Obvious externalized emotions: The male protagonist directly expresses strong emotions through actions, such as anger, protection, or comeback (for example, the 'rivalry' between the male protagonist and his older brother). Strong contrast: Convey internal conflicts through contrasting behaviors or identities (such as power struggles or emotional tension). Concentrated plot conflicts: Focus on the protagonist's core conflicts, such as family feuds or disguised identities, to enhance viewer engagement. Prominent dramatic plots: Include bizarre dialogues or plot twists (such as 'a woman disguised as a man is recognized') to increase appeal and create buzz.",
"FaceInfo":{"ImageInfoList":[{"Name":"Ning X","ImageURL":"http://[your-cdn-domain]/[your-file-path]/face1.png"}]},
"EnableActionRecog": true,
"CustomActions": ["fighting","crying"]
},
"OpeningArray": [
{
"MediaId": "****9d46c8b4548681030f6e****",
"In": 0,
"Out": 5
},
{
"MediaId": "****9d46c8b4548661030f6e****",
"In": 0,
"Out": 5
}
],
"EndingArray": [
{
"MediaId": "****9d46c8b4548681030f6e****",
"In": 0,
"Out": 5
},
{
"MediaId": "****9d46c8b4548661030f6e****",
"In": 0,
"Out": 5
}
],
"TitleArray": [
"Hema Fresh in Huilongguan is now open",
"Hema Fresh is now open"
],
"SubHeadingArray": [
{
"Level": 1,
"TitleArray": [
"Subheading 1",
"Subheading 2"
]
},
{
"Level": 3,
"TitleArray": [
"Level 3 subheading"
]
}
],
"StickerArray": [
{
"MediaId": "****9d46c8b4548681030f6e****",
"X": 10,
"Y": 100,
"Width": 300,
"Height": 300,
"Opacity": 0.6
},
{
"MediaURL": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-name].png",
"X": 10,
"Y": 100,
"Width": 300,
"Height": 300
}
],
"BackgroundMusicArray": [
"****b4549d46c88681030f6e****",
"****549d46c88b4681030f6e****",
"http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-name].mp3"
],
"BackgroundImageArray": [
"****6c886b4549d481030f6e****",
"****9d46c8548b4681030f6e****",
"http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-name].png"
]
}Jump-cut editing
{
"MediaArray": [
"****9d46c8b42f4581030f6e****",
"****9d46c8b4frtf81030f6e****",
"****9d46c8b4asdf81030f6e****",
"****9d46c8b43d3481030f6e****"
],
"HighlightStrategy": {
"IntroConfig": {
"Mode": "Disabled"
},
"ThemeConfig": {
"ThemeType": "JumpHighlight"
},
"EnableActionRecog": true,
"CustomActions": ["fighting","crying"]
},
"OpeningArray": [
{
"MediaId": "****9d46c8b4548681030f6e****",
"In": 0,
"Out": 5
},
{
"MediaId": "****9d46c8b4548661030f6e****",
"In": 0,
"Out": 5
}
],
"EndingArray": [
{
"MediaId": "****9d46c8b4548681030f6e****",
"In": 0,
"Out": 5
},
{
"MediaId": "****9d46c8b4548661030f6e****",
"In": 0,
"Out": 5
}
],
"TitleArray": [
"Hema Fresh in Huilongguan is now open",
"Hema Fresh is now open"
],
"SubHeadingArray": [
{
"Level": 1,
"TitleArray": [
"Subheading 1",
"Subheading 2"
]
},
{
"Level": 3,
"TitleArray": [
"Level 3 subheading"
]
}
],
"StickerArray": [
{
"MediaId": "****9d46c8b4548681030f6e****",
"X": 10,
"Y": 100,
"Width": 300,
"Height": 300,
"Opacity": 0.6
},
{
"MediaURL": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-name].png",
"X": 10,
"Y": 100,
"Width": 300,
"Height": 300
}
],
"BackgroundMusicArray": [
"****b4549d46c88681030f6e****",
"****549d46c88b4681030f6e****",
"http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-name].mp3"
],
"BackgroundImageArray": [
"****6c886b4549d481030f6e****",
"****9d46c8548b4681030f6e****",
"http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-name].png"
]
}EditingConfig parameters
Configure EditingConfig to specify parameters such as volume, position, and other production settings for the output video.
Parameter | Type | Description | Example | Required |
JSON | Configuration for the input video materials. | See Parameter example. | No | |
JSON | Configuration for titles. You can configure caption parameters. | See Parameter example. | No | |
SubHeadingConfig | JSON | Configuration for multi-level subheadings. You can set caption parameters. JSON field description:
| See Parameter example. | No |
JSON | Configuration for background music. | See Parameter example. | No | |
JSON | Configuration for the background image. If a background image is already configured in InputConfig, this field does not take effect. | See Parameter example. | No | |
JSON | Configuration for montage processing. | See Parameter example. | ||
FECanvas | JSON | Canvas configuration for frontend page previews. | {"Width": 1080,"Height": 1920} | No |
ProduceConfig | JSON | Configuration for standard video editing and production. For more information about the fields, see: EditingProduceConfig | {"AutoRegisterInputVodMedia":true,"OutputWebmTransparentChannel":true,"CoverConfig":{"StartTime":3.3},"AudioChannelCopy":"left","PipelineId":"xxxd54a97cff4108b555b01166d4bxxx","MaxBitrate":5000,"KeepOriginMaxBitrate":false,"KeepOriginVideoMaxFps":false} | No |
ProcessConfig parameters
Parameter | Type | Description | Example | Required |
AllowVfxEffect | Boolean | Specifies whether to allow special effects. | true | No. Default value: false. |
VfxEffectProbability | Float | The probability of applying a special effect to each video clip. Value range: 0.0 to 1.0. Supports up to two decimal places. | 0.6 | No. Default value: 0.5. |
VfxFirstClipEffectList | List<String> |
| ["slightshow","starfieldshinee"] | No |
VfxNotFirstClipEffectList | List<String> |
| ["zoomslight","zoom"] | No |
AllowTransition | Boolean | Specifies whether to allow transitions. | true | No. Default value: false. |
TransitionDuration | Float | The duration of the transition, in seconds. If the transition duration is greater than the clip duration minus 1, the transition effect for that clip does not take effect. | 0.5 | No. Default value: 0.5 seconds. |
TransitionList | List<String> | A list of custom transition effects. When AllowTransition is true, a transition effect is randomly selected from this list for production. For the available transition effects, see Transition effect library. If this parameter is empty, a transition is randomly selected from the following: "linearblur", "colordistance", "crosshatch", "dreamyzoom", and "doomscreentransition_up". | ["directional", "linearblur"] | No |
UseUniformTransition | Boolean | Specifies whether to use the same transition effect throughout a single output video. | true | No. Default value: true. |
AllowFilter | Boolean | Specifies whether to allow custom filters. | false | No. Default value: false. |
FilterList | List<String> | A list of custom filter effects. When AllowFilter is true, a filter is randomly selected from this list for production. For available filter effects, see Filter effect examples. If this parameter is empty, no filter effect is added. | ["m1", "m2"] | No |
Parameter example
{
"MediaConfig": {
"Volume": 0 // Mute the source video material by default.
},
"TitleConfig": {
"Alignment": "TopCenter",
"AdaptMode": "AutoWrap",
"Font": "Alibaba PuHuiTi 2.0 95 ExtraBold",
"SizeRequestType": "Nominal",
"Y": 0.1, // The Y-coordinate of the title when the output video is in portrait mode.
"Y": 0.05, // The Y-coordinate of the title when the output video is in landscape mode.
"Y": 0.08 // The Y-coordinate of the title when the output video is in square mode.
},
"SubHeadingConfig": {
"1": {
"Y": 0.3,
"FontSize": 40
},
"3": {
"Y": 0.5,
"FontSize": 30
}
},
"BackgroundMusicConfig": {
"Volume": 0.2, // Set the background music volume to 20% by default.
"Style": null
},
"ProcessConfig": {
"AllowVfxEffect": false, // Specifies whether to add special effects.
"AllowTransition": false, // Specifies whether to add transitions.
}
}TemplateConfig parameters
TemplateConfig contains common parameters for one-click video production and is used to configure a video production template. For detailed parameter descriptions and usage examples, see TemplateConfig parameters.
OutputConfig parameters
Configure OutputConfig to specify production parameters such as the output address, naming rules, width and height, and the number of output videos.
Parameter | Type | Description | Example | Required |
MediaURL | String | The output video address. It must contain the placeholder {index}. | Rule: http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-path]/[your-file-name]_{index}.mp4 Example: http://example.oss-cn-shanghai.aliyuncs.com/example/example_{index}.mp4 | Required when GeneratePreviewOnly is false and the output video is delivered to OSS. |
StorageLocation | String | Specifies the storage address for the media asset file to be output to VOD. | Rule: [your-vod-bucket].oss-[your-region-id].aliyuncs.com Example: outin-****6c886b4549d481030f6e****.oss-cn-shanghai.aliyuncs.com | Required when GeneratePreviewOnly is false and the output video is delivered to VOD. |
FileName | String | The output file name. It must contain the placeholder {index}. | Rule: [your-file-name]__{index}.mp4 Example: example_{index}.mp4 | Required when GeneratePreviewOnly is false and the output video is delivered to VOD. |
GeneratePreviewOnly | Boolean |
| false | No. Default value: false. |
Count | Integer |
| 1 | No. Default value: 1. |
Width | Integer | The width of the output video, in px. | 1080 | Yes |
Height | Integer | The height of the output video, in px. | 1920 | Yes |
JSONObject | Configuration for the output video stream, such as Crf and Codec. | {"Crf": 27} | No |
Parameter example
{
"MediaURL": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/[your-file-name]_{index}.mp4",
"Count": 1,
"Width": 1080,
"Height": 1920,
"Video": {"Crf": 27},
"GeneratePreviewOnly":false
}Processing logic
Configure the editing materials using MediaArray. The materials are analyzed and processed in the order they are provided.
Configure the opening and ending of the highlight reel section using HighlightStrategy.
Configure the fixed opening (pre-roll) before the highlight reel section and the fixed ending (post-roll) after it using OpeningArray and EndingArray.
Parameters in the one-click video production API call take precedence over parameters set in a template. If you configure TemplateConfig, the system first reads non-empty parameters from the API call. For any empty parameters, the system reads the values from the template.