|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
object |
Specifies the parameters for video processing. |
||
| DisableVideo |
boolean |
Specifies whether to disable the generation of the video stream. Valid values:
|
false |
| Stream |
array |
A list of video stream indexes from the source file to process. If left empty (the default), the service processes the video stream with the smallest index (the first video stream). An index greater than 100 indicates that all video streams are processed.
Note
The service ignores indexes that do not correspond to an existing video stream. |
|
|
integer |
The index of the video stream to process. |
0 |
|
| TranscodeVideo |
object |
Specifies the video transcoding parameters. If this parameter is left empty, video processing is disabled, and the output file contains no video stream. Note
Disabling video processing by leaving this parameter empty is not recommended. Use the |
|
| Codec |
string |
The video codec. Valid values:
|
h264 |
| PixelFormat |
string |
The pixel format. Defaults to the source video's pixel format. Valid values:
Note
The |
yuv420p |
| FrameRateOption |
string |
The frame rate option. Valid values:
Default value:
Note
This parameter must be set together with the FrameRate parameter. |
fixed |
| FrameRate |
number |
The video frame rate. By default, the frame rate of the source video is used. |
25 |
| ResolutionOption |
string |
The resolution option. Valid values:
Default value:
Note
This parameter must be set together with the Resolution parameter. |
fixed |
| Resolution |
string |
The resolution of the output video in
Note
If the source video contains rotation metadata, the system determines width, height, and long and short sides based on the rotated video, which corresponds to its playback resolution. |
640x480 |
| AdaptiveResolutionDirection |
boolean |
Specifies whether to enable adaptive sizing for long and short sides. Valid values:
|
true |
| ScaleType |
string |
The scaling mode. Valid values:
Note
This parameter must be set together with the Resolution parameter. |
crop |
| Rotation |
integer |
The clockwise rotation angle in degrees. Valid values:
|
90 |
| BitrateOption |
string |
The video bitrate option. Valid values:
Default value:
Note
This parameter must be set together with the Bitrate parameter. |
fixed |
| Bitrate |
integer |
The video bitrate, in bits per second (bps). Note
This parameter is mutually exclusive with CRF. If both this parameter and the CRF parameter are omitted, the system encodes the video with a default CRF value of 23. |
128000 |
| GOPSize |
integer |
The keyframe interval, in frames. Default: 150. Note
This parameter is not supported for |
60 |
| CRF |
number |
Specifies the Constant Rate Factor (CRF). This parameter is mutually exclusive with Bitrate. The valid range is [0, 51]. A higher value results in lower quality. The recommended range is [18, 38]. |
18 |
| BufferSize |
integer |
The decoding buffer size for variable bitrate encoding, in bits per second (bps). Note
This parameter is effective only when used with the CRF parameter. |
4000000 |
| MaxBitrate |
integer |
Sets the maximum bitrate for variable bitrate encoding. This parameter requires the Note
This parameter is effective only when used with the CRF parameter. |
128000 |
| BFrames |
integer |
The number of consecutive B-frames. Default: 3. |
3 |
| Refs |
integer |
The number of reference frames. Default: 2. |
2 |
| VideoSlim |
integer |
Specifies whether to enable Video Slim mode. Valid values:
Note
For optimal results, use the recommended Important Video Slim supports only the H.264 and H.265 codecs, the yuv420p pixel format, and an 8-bit depth. It does not support transcoding to multiple target video outputs or video stitching. For more information, see Video Slim. |
0 |
| FilterVideo |
object |
Specifies video filtering parameters. The system ignores this parameter if TranscodeVideo is empty or if TranscodeVideo.Codec is Note
This parameter is not supported for |
|
| Watermarks |
array |
A list of video watermarks to apply. |
|
|
object |
The configuration for a video watermark. |
||
| Type |
string |
The type of watermark. Valid values:
|
text |
| Dx |
number |
The horizontal offset. The interpretation of the value depends on its type:
|
0 |
| Dy |
number |
The vertical offset. The interpretation of the value depends on its type:
|
0 |
| StartTime |
number |
The time, in seconds (s), when the watermark first appears. By default, it appears at the start of the video. |
0 |
| Duration |
number |
The duration, in seconds (s), to display the watermark. By default, it remains visible until the end of the video. |
0 |
| ReferPos |
string |
The reference position for the watermark. Valid values:
|
topleft |
| Content |
string |
The content of the text watermark. Default: empty. Important This parameter is effective only when Type is text. |
example |
| FontName |
string |
The font name for the text watermark. Valid values:
Important This parameter is effective only when Type is text. |
SourceHanSans-Bold |
| FontSize |
integer |
The font size for the text watermark. The value must be an integer in the range (4, 120). Default: 16. Important This parameter is effective only when Type is text. |
18 |
| FontColor |
string |
The font color of the text watermark. The value can be in Important This parameter is effective only when Type is text. |
red |
| FontApha |
number |
The font alpha (transparency) for the text watermark. The value must be in the range (0, 1]. A value of 1 (the default) means the text is fully opaque. Important This parameter is effective only when Type is text. |
0.8 |
| BorderWidth |
integer |
The border width for the text watermark, in pixels (px). The value must be an integer in the range [0, 4096]. Default: 0. Important This parameter is effective only when Type is text. |
2 |
| BorderColor |
string |
The border color of the text watermark. The value can be in Important This parameter is effective only when Type is text. |
red |
| URI |
string |
The OSS URI of the watermark file. Supported formats are PNG and MOV. The OSS URI must follow the format Important This parameter is effective only when Type is file. |
oss://test-bucket/watermark.jpg |
| Width |
number |
The width of the watermark image. By default, the original width of the watermark image is used. The interpretation of the value depends on its type:
|
80 |
| Height |
number |
The height of the watermark image. By default, the original height of the watermark image is used. The interpretation of the value depends on its type:
|
40 |
| Delogos |
array |
Applies blurring to rectangular areas of the video, typically to remove logos or on-screen graphics. |
|
|
object |
The parameters for video blurring. |
||
| StartTime |
number |
The start time for applying the blur effect, in seconds (s). By default, the effect is applied from the beginning of the video. |
0 |
| Duration |
number |
The duration for which the blur effect is applied, in seconds (s). By default, the effect lasts until the end of the video. |
15 |
| Dx |
number |
The horizontal offset. The interpretation of the value depends on its type:
|
0 |
| Dy |
number |
The vertical offset. The interpretation of the value depends on its type:
|
0 |
| Width |
number |
The width of the blur area. By default, the value is 1.0 (a decimal), which covers the full width of the output video. The interpretation of the value depends on its type:
|
100 |
| Height |
number |
The height of the blur area. By default, the value is 1.0 (a decimal), which covers the full height of the output video. The interpretation of the value depends on its type:
|
40 |
| ReferPos |
string |
The reference position for the blur area. Valid values:
|
topleft |
| Speed |
number |
The video playback speed multiplier. The valid range is [0.5, 1.0]. Default: 1.0. Note
Important
|
1.0 |
| Desensitization |
object |
Specifies the video desensitization settings. Important
|
|
| Face |
object |
Specifies the face desensitization settings. Note
This feature is in public beta. If you have any questions, join our DingTalk group for feedback. For the group number, see Contact us. |
|
| Confidence |
number |
The confidence threshold for face detection. The system does not desensitize faces with a confidence score below this threshold.
|
0.4 |
| MinSize |
integer |
The minimum face size threshold. The system does not desensitize faces with a width or height smaller than this threshold. Unit: pixels. Default: 0, which means no size limit. |
0.4 |
| LicensePlate |
object |
Specifies the license plate desensitization settings. Note
This feature is in public beta. If you have any questions, join our DingTalk group for feedback. For the group number, see Contact us. |
|
| Confidence |
number |
The confidence threshold for license plate detection. The system does not desensitize license plates with a confidence score below this threshold.
|
0.4 |
| MinSize |
integer |
The minimum license plate size threshold. The system does not desensitize license plates with a width or height smaller than this threshold. Unit: pixels. Default: 0, which means no size limit. |
0.4 |