A timeline is created when you add materials and configure effects to create a video. A timeline consists of tracks, materials, and effects. For more information about sample timelines, see Use Cases.
Parameter | Type | Required | Description |
VideoTracks | No (If no video tracks exist, audio tracks are required.) | The video tracks. The video tracks are overlaid based on the sequence of MediaId array elements. For example, the track that corresponds to the first MediaId array element is placed below the track that corresponds to the second MediaId array element. | |
AudioTracks | No (If no audio tracks exist, video tracks are required.) | The audio tracks. | |
ImageTracks (The image track capability is merged into the video track capability and no longer iterated or maintained.) | No (If image tracks exist, video tracks are required.) | The image tracks. Note: 1. Image tracks must be placed above video tracks. If an image is to be mixed with a video as a material in image and video production scenarios, use video tracks. 2. The image tracks are overlaid based on the sequence of MediaId array elements. For example, the track that corresponds to the first MediaId array element is placed below the track that corresponds to the second MediaId array element. | |
SubtitleTracks | No | The subtitle tracks. | |
EffectTracks | No | The effect tracks. |
VideoTrack
VideoTrack is used to arrange video and image materials.
Parameter | Type | Required | Description |
Type | String | No | The type of the video track. By default, a regular video track is used. If you set Type to Effect, the video track can be used for effects. In this case, you can specify EffectTrackItem objects in VideoTrackClips. |
MainTrack | Boolean | No | Specifies whether the current video track is the main track. Default value: False. For more information, see Set a main track. |
TrackShortenMode | String | No | If the duration of the current video track is longer than the duration of the main track, the duration of the current track is adaptively shortened to align with the duration of the main track. This parameter specifies the mode in which the track is shortened. Valid value:
|
TrackExpandMode | String | No | If the duration of the current video track is shorter than the duration of the main track, the duration of the current track is adaptively extended to align with the duration of the main track. This parameter specifies the mode in which the track is extended. Valid value:
|
VideoTrackClips | Yes | The materials in the video track. |
AudioTrack
AudioTrack is used to arrange audio-only materials and video materials that contain audio streams.
Parameter | Type | Required | Description |
MainTrack | Boolean | No | Specifies whether the current audio track is the main track. Default value: False. For more information, see Set a main track. |
TrackShortenMode | String | No | If the duration of the current audio track is longer than the duration of the main track, the duration of the current track is adaptively shortened to align with the duration of the main track. This parameter specifies the mode in which the track is shortened. Valid value:
|
TrackExpandMode | String | No | If the duration of the current audio track is shorter than the duration of the main track, the duration of the current track is adaptively extended to align with the duration of the main track. This parameter specifies the mode in which the track is extended. Valid value:
|
AudioTrackClips | Yes | The materials in the audio track. |
ImageTrack
The image track capability is merged into the video track capability and no longer iterated or maintained.
ImageTrack is used to arrange image materials.
Parameter | Type | Required | Description |
ImageTrackClips (The image track capability is merged into the video track capability and no longer iterated or maintained.) | Yes | The materials in the image track. |
SubtitleTrack
SubtitleTrack is used to arrange subtitles, including banner text and external subtitles.
Parameter | Type | Required | Description |
SubtitleTrackClips | Yes | The materials in the subtitle track. |
EffectTrack
EffectTrack is used to add effects to a video. You can add filters and visual effects to an effect track.
Parameter | Type | Required | Description |
EffectTrackItems | Yes | The filters and effects that are added to the effect track. |
VideoTrackClip
You can add video or image materials to a video track.
You can use the In, Out, TimelineIn, and TimelineOut parameters to specify the position from which a material is cut and added to the timeline. For example, if you set In to 5, Out to 10, TimelineIn to 15, and TimelineOut to 20, the material from the 5th to 10th second is cut and played from the 15th to 20th second in the timeline.
Parameter | Type | Required | Description |
MediaId | String | No | The ID of the Intelligent Media Services (IMS) or ApsaraVideo VOD media asset to which the material in the video track corresponds. Note: You must specify only one of MediaId and MediaURL. |
MediaURL | String | No | The Object Storage Service (OSS) URL of the material in the video track. The OSS URL is in the following format: https://your-bucket.oss-cn-shanghai.aliyuncs.com/your-object.mp4. Note:
For more information, see Edit images and videos. |
Type | String | No | The type of the material. Default value: Video. Valid values:
|
X | Float | No | The horizontal distance between the upper-left corner of the material and the upper-left corner of the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Y | Float | No | The vertical distance between the upper-left corner of the material and the upper-left corner of the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Width | Float | No | The width of the material in the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Height | Float | No | The height of the material in the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
AdaptMode | String | No | The mode in which the material is automatically resized. This parameter takes effect only if you specify the width and height of the view. The material is scaled based on the width and height of the view. Valid values:
|
In | Float | No | The start time of the material in the source file. The source file must be an audio or video file. Unit: seconds. The value is accurate to four decimal places. If you do not specify In, 0 is used. |
Out | Float | No | The end time of the material in the source file. The source file must be an audio or video file. Unit: seconds. The value is accurate to four decimal places. If you do not specify Out, the material ends when the source file ends. |
MaxOut | Float | No | The maximum end time of the material. If you specify this parameter, the end time of the material is the smaller value between the duration of the source file and the value of MaxOut. This parameter takes effect only if the source file is an audio or video file. Unit: seconds. The value is accurate to four decimal places. If you specify Out, MaxOut becomes invalid. For more information, see Extract and merge multiple video clips. |
Duration | Float | No | The duration of the material. In most cases, this parameter is used for images. Unit: seconds. The value is accurate to four decimal places. |
DyncFrames | Int | No | The number of frames of the animated sticker. This parameter takes effect only if the source file is an animated image. For more information, see Add a watermark, sticker, or GIF sticker. |
TimelineIn | Float | No | The start time of the material in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineIn, the material starts to be played when the playback of the previous material in the timeline ends. |
TimelineOut | Float | No | The end time of the material in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineOut, the material stops being played when the playback of the next material in the timeline starts. |
Speed | Float | No | The playback speed of the material. Valid values: 0.1 to 100. For example, if you set this parameter to 2, the material is played at twice the original speed in the output video. In this case, the duration of the material is reduced to half. For more information, see Configure speed ramping. |
Opacity | Float | No | The opacity of the video. Valid values: 0 to 1. A value of 0 indicates that the video is completely transparent. A value of 1 indicates that the video is completely opaque. |
MaskVideoUrl | String | No | The URL of the mask file. In most cases, the mask file is a video that contains alpha channels. You can use alpha channels to add transparency information to the original video.
|
ClipId | String | No | The track alignment value. If the same value of ReferenceClipId is set for materials in other audio or video tracks, the start time and end time of the materials in other tracks in the timeline are aligned with the start time and end time of the current material. For more information, see Automatically align materials and the material lengt. |
ReferenceClipId | String | No | The track alignment value. If the same value of ClipId is set for materials in other audio or video tracks, the start time and end time of the current material in the timeline are aligned with the start time and end time of the materials in other tracks. For more information, see https://icms.alibaba-inc.com/content/ice/ims?l=1&m=65087&n=4406040. |
Effects | Effect[] | No | The effects that are used on the material. |
Digital human video
You can set Type to AI_Avatar in VideoTrackClip to directly generate a digital human video for editing. For more information, see Process intelligent timeline tasks in parallel.
This feature is available only in the China (Beijing), China (Shanghai), and China (Hangzhou) regions.
Parameter | Type | Required | Description | Remarks |
Type | String | Yes | The type of the material. |
|
MediaId | String | No | The ID of the audio that is used to render a digital human. |
|
MediaURL | String | No | The URL of the audio file that is used to render a digital human. |
|
Content | String | No | The text content that is used to render a digital human. |
|
AvatarId | String | No | The ID of the digital human image. |
|
Voice | String | No | The type of the voice. |
|
CustomizedVoice | String | No | The personalized human voice. |
|
LoopMotion | Boolean | No | Specifies whether the first and last frames of the video are the same. |
|
SpeechRate | Integer | No | The speech tempo. |
Note The following examples show how the speech tempo is calculated:
If the speed is less than 1x, use the coefficient of 0.002. If the speed is greater than 1x, use the coefficient of 0.001. The actual calculation result is rounded to the nearest integer. |
PitchRate | Integer | No | The intonation. |
|
Other timeline parameters for a digital human video are the same as the timeline parameters of VideoTrackClip. For more information, see the VideoTrackClip section of this topic.
AudioTrackClip
You can add the following materials to an audio track: audio-only materials, video materials that contain audio streams, and audio materials that are converted from text.
You can use the In, Out, TimelineIn, and TimelineOut parameters to specify the position from which a material is cut and added to the timeline. For example, if you set In to 5, Out to 10, TimelineIn to 15, and TimelineOut to 20, the material from the 5th to 10th second is cut and played from the 15th to 20th second in the timeline.
The playback time of the audio materials in the same audio track cannot overlap in the timeline. Otherwise, an audio error may occur.
Audio-only material or video material that contains audio streams
Parameter | Type | Required | Description |
MediaId | String | No | The ID of the IMS or ApsaraVideo VOD media asset to which the material in the audio track corresponds. Note: You must specify only one of MediaId and MediaURL. |
MediaURL | String | No | The OSS URL of the material in the audio track. The OSS URL is in the following format: https://your-bucket.oss-cn-shanghai.aliyuncs.com/your-object.mp4 Note:
For more information, see Edit images and videos. |
In | Float | No | The start time of the material in the source file. Unit: seconds. The value is accurate to four decimal places. If you do not specify In, 0 is used. |
Out | Float | No | The end time of the material in the source file. Unit: seconds. The value is accurate to four decimal places. If you do not specify Out, the material ends when the source file ends. |
TimelineIn | Float | No | The start time of the material in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineIn, the material starts to be played when the playback of the previous material in the timeline ends. |
TimelineOut | Float | No | The end time of the material in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineOut, the material stops being played when the playback of the next material in the timeline starts. |
Speed | Float | No | The playback speed of the material. Valid values: 0.1 to 100. For example, if you set this parameter to 2, the material is played at twice the original speed in the output audio. In this case, the duration of the material is reduced to half. For more information, see Configure speed ramping. |
Effects | Effect[] | No | The effects that are used on the material. |
LoopMode | Boolean | No | Specifies whether to enable loop playback for the material in the timeline. True: enables loop playback. False (default): disables loop playback. For more information, see Configure audio loop playback. |
ClipId | String | No | The track alignment value. If the same value of ReferenceClipId is set for materials in other audio or video tracks, the start time and end time of the materials in other tracks in the timeline are aligned with the start time and end time of the current material. For more information, see Automatically align materials and the material duration. |
ReferenceClipId | String | No | The track alignment value. If the same value of ClipId is set for materials in other audio or video tracks, the start time and end time of the current material in the timeline are aligned with the start time and end time of the materials in other tracks. For more information, see Automatically align materials and the material duration. |
Audio material converted from text
For more information about sample timelines, see Convert text into audio and add the audio to a video. This feature is available only in the China (Beijing), China (Shanghai), and China (Hangzhou) regions.
Parameter | Type | Required | Description |
Type | String | Yes | The type of the material. Set the value to AI_TTS. |
Content | String | Yes | The text content. |
Voice | String | No | The type of the voice. For more information, see Intelligent voice samples. |
CustomizedVoice | String | No |
|
Format | String | No | The format of the file. Valid values: pcm, wav, and mp3. Default value: mp3.
|
SpeechRate | Int | No | The speech tempo. Valid values: -500 to 500. Default value: 0.
Note The following examples show how the speech tempo is calculated:
If the speed is less than 1x, use the coefficient of 0.002. If the speed is greater than 1x, use the coefficient of 0.001. The actual calculation result is rounded to the nearest integer. |
PitchRate | Int | No | The intonation. Valid values: -500 to 500. Default value: 0. |
TimelineIn | Float | No | The start time of the material in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineIn, the material starts to be played when the playback of the previous material in the timeline ends. |
TimelineOut | Float | No | The end time of the material in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineOut, the material stops being played when the playback of the next material in the timeline starts. |
Effects | Effect[] | No | The effects that are used on the material. |
ClipId | String | No | The track alignment value. If the same value of ReferenceClipId is set for materials in other audio or video tracks, the start time and end time of the materials in other tracks in the timeline are aligned with the start time and end time of the current material. For more information, see Automatically align materials and the material duration. |
ReferenceClipId | String | No | The track alignment value. If the same value of ClipId is set for materials in other audio or video tracks, the start time and end time of the current material in the timeline are aligned with the start time and end time of the materials in other tracks. For more information, see Automatically align materials and the material duration. |
ImageTrackClip
The image track capability is merged into the video track capability and no longer iterated or maintained.
You can add image materials to an image track.
Parameter | Type | Required | Description |
MediaId | String | No | The ID of the IMS or ApsaraVideo VOD media asset to which the material in the image track corresponds. Note: You must specify only one of MediaId and MediaURL. |
MediaURL | String | No | The OSS URL of the material in the image track. The OSS URL is in the following format: https://your-bucket.oss-cn-shanghai.aliyuncs.com/your-object.mp4. Note:
For more information, see Configure speed ramping. |
X | Float | No | The horizontal distance between the upper-left corner of the material and the upper-left corner of the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Y | Float | No | The vertical distance between the upper-left corner of the material and the upper-left corner of the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Width | Float | No | The width of the material in the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Height | Float | No | The height of the material in the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
TimelineIn | Float | No | The start time of the image in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineIn, 0 is used. |
TimelineOut | Float | No | The end time of the image in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineOut, the maximum duration of the video track is used. |
DyncFrames | Int | No | The number of frames of the animated sticker. This parameter is required if the source file is an animated image. For more information, see Add a watermark, sticker, or GIF sticker. |
Effects | Effect[] | No | The effects that are used on the material. |
SubtitleTrackClip
You can add subtitle materials to a subtitle track.
The playback time of the subtitle materials in the same subtitle track cannot overlap in the timeline. Otherwise, issues such as a subtitle error may occur.
Parameter | Type | Required | Description |
Type | String | Yes | The type of the subtitle material. Valid values:
|
SubType | String | No | The subtype of the subtitle material. Valid values:
Ignore this parameter if you set Type to Text. |
FileURL | String | No | The OSS URL of the subtitle file. This parameter is required if you set Type to Subtitle. The OSS URL is in the following format: https://your-bucket.oss-cn-shanghai.aliyuncs.com/your-object.srt. Note:
For more information, see Subtitles and subtitle templates. |
X | Float | No | The horizontal distance between the upper-left corner of the banner text and the upper-left corner of the output video. This parameter takes effect if you set Type to Text. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Y | Float | No | The vertical distance between the upper-left corner of the banner text and the upper-left corner of the output video. This parameter takes effect if you set Type to Text. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
TimelineIn | Float | No | The start time of the banner text in the timeline. This parameter takes effect if you set Type to Text. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineIn, the material starts to be displayed when the display of the previous material in the timeline ends. |
TimelineOut | Float | No | The end time of the banner text in the timeline. This parameter takes effect if you set Type to Text. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineOut, the material stops being displayed when the display of the next material in the timeline starts. |
Content | String | No | The banner text. This parameter is required if you set Type to Text. |
Font | String | No | The font of the banner text. This parameter takes effect if you set Type to Text. Default value: SimSun. For more information about the supported fonts, see Fonts. |
FontSize | Int | No | The font size of the banner text. This parameter takes effect if you set Type to Text. Default value: 0. Maximum value: 5000. |
SizeRequestType | String | No | The calculation method of the size of the rendered font of the banner text. This parameter takes effect if you set Type to Text. Default value: RealDim.
|
FontColor | String | No | The color of the banner text. This parameter takes effect if you set Type to Text. The value is in the format of a number sign (#) and a hexadecimal value. Example: #ffffff. |
FontColorOpacity | String | No | The opacity of the banner text. This parameter takes effect if you set Type to Text. Valid values: 0 to 1. Default value: 1. A value of 1 indicates that the text is completely opaque. A value of 0 indicates that the text is completely transparent. |
FontFace | No | The appearance of the banner text. This parameter takes effect if you set Type to Text. | |
Spacing | Int | No | The word spacing of the banner text. This parameter takes effect if you set Type to Text. Unit: pixel. Default value: 0. |
LineSpacing | Int | No | The line spacing of the banner text. This parameter takes effect if you set Type to Text. Unit: pixel. Default value: 0. |
Angle | Float | No | The rotation angle of the banner text in the counterclockwise direction. This parameter takes effect if you set Type to Text. Unit: degree. Default value: 0. |
BorderStyle | Int | No | The border style of the banner text. Valid values: 1 and 3. A value of 1 indicates that the text has a border and a shadow. A value of 3 indicates that the text has a background. Default value: 1. |
Outline | Int | No | The outline width of the banner text. This parameter takes effect if you set Type to Text. Unit: pixel. Default value: 0. |
OutlineColour | String | No | The outline color of the banner text. This parameter takes effect if you set Type to Text. The value is in the format of a number sign (#) and a hexadecimal value. Example: #ffffff. |
Shadow | Int | No | The shadow size of the banner text. This parameter takes effect if you set Type to Text. Unit: pixel. Default value: 0. |
BackColour | String | No | The shadow color of the banner text. This parameter takes effect if you set Type to Text. The value is in the format of a number sign (#) and a hexadecimal value. Example: #ffffff. |
Alignment | String | No | The text alignment mode. This parameter takes effect if you set Type to Text. Default value: TopLeft. Valid values:
If you want to specify the accurate positions of subtitles in different alignment modes, we recommend that you configure text alignment in the following way:
|
AdaptMode | String | No | Specifies whether to enable automatic line breaking or automatic scaling when the banner text exceeds the video width or the specified text box width. Valid values:
|
TextWidth | Float | No | The width of the text box. This parameter takes effect if you specify AdaptMode. This parameter is used when you enable automatic line breaking or automatic scaling. If you do not specify this parameter, the video width is used for automatic line breaking or automatic scaling. If the value is greater than 0 and less than or equal to 1, the value indicates the percentage of the width of the text box to the width of the output video. If the value is greater than 1, the value indicates the number of pixels. |
FontUrl | String | No | The OSS URL of the font file. This parameter takes effect if you set Type to Text. The following formats of font files are supported: TTF, OTF, and WOFF. Example: https://your-bucket.oss-cn-shanghai.aliyuncs.com/example-font.ttf.
|
EffectColorStyle | String | No | The word art effect of the banner text. This parameter takes effect if you set Type to Text. For more information about word art effects, see Examples of word art effects. |
SubtitleEffects | No | The multilayer effects of the banner text. This parameter takes effect if you set Type to Text. You can configure multilayer outlines, multilayer shadows, Gaussian blurs, and subtitle background effects. Gaussian blurs are supported only if subtitle text is set to have a shadow. Note:
| |
ScrollStartY | Float | No | The y-coordinate value of the start point for scrolling up or down the subtitle. This parameter takes effect if the subtitle scrolling effect is configured. Unit: pixel. If the value is less than 1, the value indicates the percentage of the height of the subtitle to the height of the output video. |
ScrollEndY | Float | No | The y-coordinate value of the end point for scrolling up or down the subtitle. This parameter takes effect if the subtitle scrolling effect is configured. Unit: pixel. If the value is less than 1, the value indicates the percentage of height of the subtitle to the height of the output video. |
ScrollSpeed | Float | No | The speed at which the subtitle is scrolled up or down. This parameter takes effect if the subtitle scrolling effect is configured. Unit: pixel per second. |
AaiMotionInEffect | String | No | The entrance effect of the banner text. This parameter takes effect if you set Type to Text. For more information about entrance effects of subtitles, see Subtitle effect examples. |
AaiMotionIn | Float | No | The duration of the entrance effect of the banner text. This parameter takes effect if you set Type to Text. Unit: seconds. The value is accurate to four decimal places. If you do not specify AaiMotionIn, the default duration of 0.5 seconds is used. If the text is displayed for less than 0.5 seconds, the duration of the entrance effect is the total duration of the text minus the duration of the exit effect. |
AaiMotionOutEffect | String | No | The exit effect of the banner text. This parameter takes effect if you set Type to Text. For more information about exit effects of subtitles, see Subtitle effect examples. |
AaiMotionOut | Float | No | The duration of the exit effect of the banner text. This parameter takes effect if you set Type to Text. Unit: seconds. The value is accurate to four decimal places. If you do not specify AaiMotionOut, the default duration of 0.5 seconds is used. If the text is displayed for less than 0.5 seconds, the duration of the exit effect is the total duration of the text. |
AaiMotionLoopEffect | String | No | The loop effect of the banner text. This parameter takes effect if you set Type to Text. The loop effect cannot take effect together with the entrance effect or the exit effect. For more information about loop effects of text, see Subtitle effect examples. |
Ratio | Float | No | The speed of the loop effect of the banner text. This parameter takes effect if you set Type to Text. The value is accurate to four decimal places. If you do not specify this parameter, 1 is used. A value greater than 1 indicates a higher speed, and a value less than 1 indicates a lower speed. |
TextureURL | String | No | The URL of the texture of the banner text. This parameter takes effect if you set Type to Text. Only OSS objects in the PNG, JPG, JPEG, or BMP format are supported. Example: https://your-bucket.oss-cn-shanghai.aliyuncs.com/your-image.png. |
BubbleStyleId | String | No | The bubble effect ID of the banner text. This parameter takes effect if you set Type to Text. For more information about bubble effects, see Sample bubble effects. |
BubbleWidth | Float | No | The width of the bubble basemap relative to the output video. This parameter takes effect only if bubble subtitles are used. A value greater than 1 indicates a number of pixels. A value less than or equal to 1 indicates a percentage. |
BubbleHeight | Float | No | The height of the bubble basemap relative to the output video. This parameter takes effect only if bubble subtitles are used. A value greater than 1 indicates a number of pixels. A value less than or equal to 1 indicates a percentage. |
EffectTrackItem
You can add visual effects and filters to an effect track.
Parameter | Type | Required | Description |
Type | String | Yes | The type of the effect. Valid values: VFX and Filter. |
SubType | String | Yes | The subtype of the effect. |
TimelineIn | Float | No | The start time of the effect in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineIn, 0 is used. |
TimelineOut | Float | No | The end time of the effect in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify TimelineOut, the effect ends when the video ends. |
Duration | Float | No | The duration of the effect in the timeline. Unit: seconds. The value is accurate to four decimal places. If you do not specify Duration, the duration of the video is used. You cannot specify Duration and TimelineOut at the same time. |
X | Float | No | This parameter takes effect only if you set SubType to mosaic_rect/blur. The horizontal distance between the upper-left corner of the effect area and the upper-left corner of the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Y | Float | No | This parameter takes effect only if you set SubType to mosaic_rect/blur. The vertical distance between the upper-left corner of the effect area and the upper-left corner of the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Width | Float | No | This parameter takes effect only if you set SubType to mosaic_rect/blur. The width of the effect area in the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
Height | Float | No | This parameter takes effect only if you set SubType to mosaic_rect/blur. The height of the effect area in the output video. You can set the value to a percentage or a number of pixels. If the value ranges from 0 to 0.9999, the value indicates a percentage. If the value is an integer greater than or equal to 2, the value indicates a number of pixels. |
SubtitleEffect
You can add outlines or shadows to a subtitle track.
Parameter | Type | Required | Description |
Type | String | Yes | The type of the effect. Valid values: Outline, Shadow, and Box.
|
Bord | Float | No | The width or height of the outline or shadow. A value greater than 1 indicates a number of pixels. A value greater than 0 and less than 1 indicates the width or height relative to the text size. |
XBord | Float | No | The width of the outline or shadow. A value greater than 1 indicates a number of pixels. A value greater than 0 and less than 1 indicates the width relative to the text size. The priority of this parameter is higher than Bord. |
YBord | Float | No | The height of the outline or shadow. A value greater than 1 indicates a number of pixels. A value greater than 0 and less than 1 indicates the height relative to the text size. The priority of this parameter is higher than Bord. |
Shift | Float | No | The horizontal or vertical offset of the outline or shadow. An absolute value greater than 1 indicates a number of pixels. An absolute value greater than 0 and less than 1 indicates the offset relative to the text size. You can set this parameter to a negative number, and the negative number indicates the upward or left offset. |
XShift | Float | No | The horizontal offset of the outline or shadow. An absolute value greater than 1 indicates a number of pixels. An absolute value greater than 0 and less than 1 indicates the horizontal offset relative to the text size. The priority of this parameter is higher than Shift. |
YShift | Float | No | The vertical offset of the outline or shadow. An absolute value greater than 1 indicates a number of pixels. An absolute value greater than 0 and less than 1 indicates the vertical offset relative to the text size. The priority of this parameter is higher than Shift. |
Color | String | No | The RGB color. The value is in the format of a number sign (#) and a hexadecimal value. Example: #ffffff. |
Opacity | String | No | The opacity of the subtitle. A value of 1 indicates that the subtitle is completely opaque. A value of 0 indicates that the subtitle is completely transparent. |
Blur | Float | No | The Gaussian blur range in pixels. This parameter takes effect only if you set Type to Shadow. After you configure this parameter, the subtitle outline glows. |
Radius | Float | No | The border radius of the solid color background of the text. This parameter takes effect only if you set Type to Box. After you configure this parameter, the subtitle background has rounded corners. |
ImageUrl | String | No | The URL of the custom subtitle background image. This parameter takes effect only if you set Type to Box. After you configure this parameter, a custom bubble effect can be implemented. You can use BubbleWidth or BubbleHeight to change the size of the subtitle. Only OSS objects in the PNG, JPG, JPEG, or BMP format are supported. Example: https://your-bucket.oss-cn-shanghai.aliyuncs.com/your-image.png. |
Width | Float | No | The width of the source bubble basemap. This parameter is required if custom bubble subtitles are used. |
Height | Float | No | The height of the source bubble basemap. This parameter is required if custom bubble subtitles are used. |
TextArea | String | No | The text area in the bubble basemap. This parameter is required if custom bubble subtitles are used. The text area contains four floating-point numbers whose values range from 0 to 1, and the floating-point numbers are separated with commas (,). For example, if you specify 0.1,0.2,0.8,0.6, the coordinates of the upper-left corner of the text box relative to the bubble are 0.1 and 0.2, and the width and height of the text box relative to the bubble are 0.8 and 0.6. |
FontFace
The following table describes the font style parameters.
Parameter | Type | Required | Description |
Bold | Boolean | No | Specifies whether the font is bold. |
Italic | Boolean | No | Specifies whether the font is italic. |
Underline | Boolean | No | Specifies whether the font is underlined. |
Effect
Material effects
You can configure different parameters to implement different effects. Specific parameters are used for multiple effects.
For more information about effect parameters, see Effect configurations.
The following table describes the common parameters of effects.
Parameter | Type | Required | Description |
Type | String | Yes | The type of the effect. Valid values:
|
SubType | String | No | The subtype of the effect.
|