All Products
Search
Document Center

ApsaraVideo VOD:Effect configurations

Last Updated:Jul 05, 2023

The structure of the Effect parameter varies based on effect types. This topic describes the structure of the Effect parameter.

Banner text

For more information about the timeline example, see Text overlay.

Parameter

Type

Required

Description

X

Float

No

The horizontal distance between the upper-left corner of the text 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. Default value: 0. The coordinates are scaled based on the size of the material and the output video.

Y

Float

No

The vertical distance between the upper-left corner of the text 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. Default value: 0. The coordinates are scaled based on the size of the material and the output video.

TimelineIn

Float

No

The time when the text is displayed in the timeline. Unit: seconds. The value is accurate to four decimal places. If this parameter is not specified, the TimelineIn value of the clip is used.

TimelineOut

Float

No

The time when the text stops to be displayed in the timeline. Unit: seconds. The value is accurate to four decimal places. If this parameter is not specified, the TimelineOut value of the clip is used.

Content

String

Yes

The content of the banner text.

Font

String

No

The font of the banner text. Default value: SimSun.

For more information about the supported fonts, see Fonts.

FontSize

Int

Yes

The font size of the banner text. The font size is scaled based on the size of the material and the output video.

Note

You can specify either FontSize or FixedFontSize. If you specify FontSize and FixedFontSize, FontSize takes effect.

FixedFontSize

Int

Yes

The font size of the banner text. The font size is not scaled based on the size of the material and the output video.

Note

You can specify either FontSize or FixedFontSize. If you specify FontSize and FixedFontSize, FontSize takes effect.

FixedX

Float

No

The horizontal distance between the upper-left corner of the text 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. Default value: 0. The coordinates are not scaled based on the size of the material and the output video.

FixedY

Float

No

The horizontal distance between the upper-left corner of the text 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. Default value: 0. The coordinates are not scaled based on the size of the material and the output video.

FontColor

String

No

The color of the text in the hexadecimal format. The value starts with a number sign (#).

Example: #ffffff.

FontColorOpacity

String

No

The transparency of the banner text. Valid values: 0 to 1. 1 indicates that the text is not transparent and 0 indicates that the text is completely transparent. Default value: 1.

FontFace

FontFace

No

The appearance of the banner text.

Spacing

Integer

No

The word spacing of the banner text. Unit: pixels. Default value: 0.

Angle

Float

No

The rotation angle of the banner text in the counterclockwise direction. Unit: degrees. Default value: 0.

BorderStyle

Int

No

The border style of the banner text. Valid values: 1 and 3. 1 indicates that the text has a border and a shadow and 3 indicates that the text has a background. Default value: 1.

Outline

Int

No

The stroke width of the banner text. Unit: pixels. Default value: 0.

OutlineColour

String

No

The stroke color of the banner text in the hexadecimal format. The value starts with a number sign (#). Example: #ffffff.

Shadow

Int

No

The shadow size of the banner text. Unit: pixels. Default value: 0.

BackColour

String

No

The shadow color of the banner text in the hexadecimal format. The value starts with a number sign (#). Example: #ffffff.

Alignment

String

No

The location of the banner text. Default value: TopLeft. Valid values:

  • TopLeft

  • TopCenter

  • TopRight

  • CenterLeft

  • CenterCenter

  • CenterRight

  • BottomLeft

  • BottomCenter

  • BottomRight

AdaptMode

String

No

Indicates whether to enable automatic line breaking or automatic scaling when the banner text exceeds the video width or the specified TextWidth. Valid values:

  • AutoWrap: enables automatic line breaking

  • AutoScale: enables automatic scaling

  • AutoWrapAtSpaces: automatically wraps text by using the white space only when the text is displayed in English.

TextWidth

String

No

The width of the text box. This parameter takes effect when AdaptMode is specified. This parameter is used when you enable automatic line breaking or automatic scaling. If this parameter is not specified, the video width is used for automatic line breaking or automatic scaling. Unit: pixels.

FontUrl

String

No

The URL of the font file in Object Storage Service (OSS). 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.

For more information about the word art effects, see Word art effect examples.

AaiMotionInEffect

String

No

The entrance effect of the banner text.

For more information about the entrance effects, see Entrance effects.

AaiMotionIn

Float

No

The duration of entrance effect. Unit: seconds. The value is accurate to four decimal places. If AaiMotionIn is not specified, the default value of this parameter is 0.5 seconds. If the banner text is displayed for less than 0.5 seconds, the duration of the entrance effect is the total duration of the banner text minus the duration of the exit effect.

AaiMotionOutEffect

String

No

The exit effect of the banner text.

For more information about the exit effects, see Exit effects.

AaiMotionOut

Float

No

The duration of the exit effect. Unit: seconds. The value is accurate to four decimal places. If AaiMotionOut is not specified, the default value of this parameter is 0.5 seconds. If the banner text is displayed for less than 0.5 seconds, the duration of the exit effect is the total duration of the banner text.

AaiMotionLoopEffect

String

No

The loop effect of the banner text. The loop effect cannot take effect together with the entrance effect or the exit effect.

For more information about the loop effects, see Loop effects.

Ratio

Float

No

The speed of the loop effect. The value is accurate to four decimal places. If this parameter is not specified, 1 is used by default. A value greater than 1 indicates a higher loop speed and a value less than 1 indicates a slower loop speed.

Cropping

For more information about the timeline example, see Remove black bars.

Parameter

Type

Required

Description

X

Float

No

The horizontal distance between the upper-left corner of the video image after cropping 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. Default value: 0.

Y

Float

No

The vertical distance between the upper-left corner of the video image after cropping 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. Default value: 0.

Width

Float

Yes

The width of the video image in the output video after cropping.

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

Yes

The height of the video image in the output video after cropping.

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.

Scaling

For more information about the timeline example, see Configure picture-in-picture.

Note

If the width or height of the material is different from those of the output video and scaling is not configured, the system automatically scales the material width or height to the width or height of the video, centers the material, and adds black bars to fill the view.

Parameter

Type

Required

Description

Width

Float

Yes

The width of the video image in the output video after scaling.

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 1, the value indicates a number of pixels.

Height

Float

Yes

The height of the video image in the output video after scaling.

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 1, the value indicates a number of pixels.

Padding

For more information about the timeline example, see Rotate a video from the landscape mode to the portrait mode and blur the blank area.

Note

If the aspect ratio of the material is different from that of the output video and padding is not configured, the system automatically scales the material width or height to the width or height of the video, centers the material, and adds paddings to fill the view.

Parameter

Type

Required

Description

Left

Float

No

The distance between the left side of the material and the left side 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 1, the value indicates a number of pixels.

Right

Float

No

The distance between the right side of the material and the right side 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 1, the value indicates a number of pixels.

Top

Float

No

The distance between the top of the material and the top 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 1, the value indicates a number of pixels.

Bottom

Float

No

The distance between the bottom of the material and the bottom 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 1, the value indicates a number of pixels.

Color

String

No

The color of the paddings in the hexadecimal format. The value must start with a number sign (#). Example: #000000. The default color is black.

Background settings

If the size of the material is inconsistent with the size of the output video, you can specify to blur the blank area or fill the blank area with a specified color.

Background settings can be used together with effects such as cropping, scaling, and transition.

For more information about the timeline example, see Rotate a video from the landscape mode to the portrait mode and blur the blank area.

Parameter

Type

Required

Description

SubType

String

Yes

The type of the background setting. Valid values:

Blur

Color

Radius

Float

No

The blur radius. This parameter takes effect only when SubType is set to Blur. Valid values: [0.01,1].

Color

String

No

The RGB color value in the hexadecimal format. This parameter takes effect only when SubType is set to Color.

Example: #FFFFFF.

Transitions

A transition effect connects two materials. You need to specify the transition duration only for the previous material. Then, the transition effect connects the end of the previous material and the beginning of the next material by overlaying the video images. After you add a transition effect between two materials, the total duration of the materials is shortened by the duration of the transition effect.

For example, a video track has two materials Clip 1 and Clip 2, and the duration of Clip 1 is 10 seconds, the duration of Clip 2 is 8 seconds. If you add a 4-second transition effect between Clip 1 and Clip 2, the total duration of the video track is reduced from 18 seconds to 14 seconds.

Parameter

Type

Required

Description

SubType

String

Yes

The type of the transition effect. You can specify multiple transition effects and separate them with commas (,). Then the system randomly selects one of the transition effects. Alternatively, you can specify random to let the system randomly select a transition effect from all transition effects. For more information about the valid values and effects, see Transition effect examples.

Example: directional.

Duration

Float

No

The duration of the transition effect. Unit: seconds. The value is accurate to four decimal places. Default value: 1.

Visual effects

Parameter

Type

Required

Description

SubType

String

Yes

The type of the visual effect. You can specify multiple visual effects and separate them with commas (,). Then the system randomly selects one of the visual effects. Alternatively, you can specify random to let the system randomly select a visual effect from all visual effects. For more information about the valid values and effects, see Special effect examples.

Example: colorfulradial.

X

Float

No

This parameter takes effect only when SubType is set to mosaic_rect/blur. The horizontal distance between the upper-left corner of the visual 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 when SubType is set to mosaic_rect/blur.

The vertical distance between the upper-left corner of the visual 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 when SubType is set to mosaic_rect/blur. The width of the visual 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 when SubType is set to mosaic_rect/blur. The height of the visual 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.

Filters

Parameter

Type

Required

Description

SubType

String

Yes

The type of the filter. You can specify multiple filters and separate them with commas (,). Then the system randomly selects one of the filters. Alternatively, you can specify random to let the system randomly select a filter from all filters. For more information about the valid values and effects, see Filter effect examples.

Example: M1.

TimelineIn

Float

No

The time when the filter is applied in the timeline. Unit: seconds. The value is accurate to four decimal places. If this parameter is not specified, the TimelineIn value of the clip is used.

TimelineOut

Float

No

The time when the filter is lifted in the timeline. Unit: seconds. The value is accurate to four decimal places. If this parameter is not specified, the TimelineOut value of the clip is used.

ExtParams

String

No

The parameters related to filters. This parameter takes effect only when SubType is set to color. In this case, a color toning filter is applied. For more information about the configuration of ExtParams, see ExtParams.

ExtParams

For more information about the timeline example, see Use rendering filters.

Parameter

Type

Valid value

Description

Default value

brightness

int

[-255,255]

Brightness

0

contrast

int

[-100,100]

Contrast

0

saturation

int

[-100,100]

Saturation

0

kelvin_temperature

int

[1000,40000]

The color temperature. This parameter takes effect when temperature_ratio is specified.

6000

temperature_ratio

int

[0,100]

The color temperature ratio.

0

tint

int

[-100,100]

Hue

0

dark_corner_ratio

int

[0,100]

Vignetting

0

Volume tuning

For more information about timeline examples, see Example of muting an entire video and Example of adjusting the volume of a video and dubbing the video with an audio resource whose volume is also adjusted.

Parameter

Type

Required

Description

Gain

Float

No

The volume. Valid values: 0 to 10. A smaller value indicates a lower volume. 0 indicates mute, 1 indicates the original volume. Default value: 1.

Audio fade-in and fade-out

For more information about timeline examples, see Example of configuring audio fade-in and fade-out for a video and Example of configuring audio fade-in and fade-out.

Parameter

Type

Required

Description

SubType

String

Yes

The type of audio fading. Valid values:

  • In

  • Out

Duration

Float

No

The duration of audio fading. Audio fade-in is applied at the beginning of a material and audio fade-out is applied at the end of a material. Default value: 0. 0 indicates that no audio fading is applied.

Curve

String

No

The volume curve of audio fading. Default value: exp.

Valid values:

  • exp: exponential curve

  • tri: linear curve

Rotation

You can rotate a material by 90, 180, or 270 degrees. You can specify a rotation angle in the video track or image track.

For more information about the timeline example, see Configure material rotation.

Parameter

Type

Required

Description

Degree

Integer

Yes

The rotation angle in the clockwise direction. You can rotate a material only by 90, 180, or 270 degrees.

Random clip capture

You can randomly capture a clip from the original material and add the clip to the timeline.

For more information about the timeline example, see Use a random effect.

Parameter

Type

Required

Description

SubType

String

Yes

The type of the capture. Valid value: RandomClip.

ClipDuration

Float

Yes

The duration of the video track clip.

Flipping

You can flip videos or images in a video track along the x-axis or y-axis.

For more information about the timeline example, see Flip a video horizontally or vertically.

Parameter

Type

Required

Description

Direction

String

Yes

  • horizontal: flips videos or images along the x-axis

  • vertical: flips videos or images along the y-axis