add_video_mask
Apply customizable mask effects to video segments in JianYing (CapCut) projects to control visibility and create visual overlays.
Instructions
为视频片段添加蒙版效果
Args:
video_segment_id: 视频片段ID,通过add_video_segment获得
mask_type: 蒙版类型名称,可以使用find_effects_by_type工具,资源类型选择mask_type,从而获取蒙版类型有哪些
center_x: 蒙版中心点X坐标(以素材的像素为单位),默认0.0(素材中心)
center_y: 蒙版中心点Y坐标(以素材的像素为单位),默认0.0(素材中心)
size: 蒙版的主要尺寸,以占素材高度的比例表示,默认0.5
rotation: 蒙版顺时针旋转的角度,默认0.0
feather: 蒙版的羽化参数,取值范围0100,默认0.0
invert: 是否反转蒙版,默认False
rect_width: 矩形蒙版的宽度,仅在蒙版类型为矩形时有效,以占素材宽度的比例表示
round_corner: 矩形蒙版的圆角参数,仅在蒙版类型为矩形时有效,取值范围0100
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| video_segment_id | Yes | ||
| mask_type | Yes | ||
| center_x | No | ||
| center_y | No | ||
| size | No | ||
| rotation | No | ||
| feather | No | ||
| invert | No | ||
| rect_width | No | ||
| round_corner | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| message | Yes | ||
| success | Yes |