|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
object |
The video processing parameter settings. |
||
| DisableVideo |
boolean |
Specifies whether to disable video stream generation. Valid values:
|
false |
| Stream |
array |
The list of video stream index numbers to process from the source file. An empty value (default) indicates that the video stream with the smallest index number (the first video stream) is processed. An index number greater than 100 indicates that all video streams are processed.
Note
Only video streams with existing index numbers are processed. If a video stream corresponding to an index number does not exist, that index number is ignored. |
|
|
integer |
The video stream index number to process. |
0 |
|
| TranscodeVideo |
object |
The video transcoding parameters. An empty value indicates that video processing is disabled and the output file does not contain a video stream. Note
Setting this parameter to an empty value to disable video processing is not recommended. |
|
| Codec |
string |
The video encoding format. Valid values:
|
h264 |
| PixelFormat |
string |
The pixel format. The default value is the same as the source video. Valid values:
Note
yuva420p is available only for the CreateMediaConvert API, and the Codec parameter must be set to vp9. |
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. The default value is the same as the source video. |
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 the format of
Note
If the source video contains rotation information, the width/height and long/short side determination is based on the post-rotation state, which is the playback resolution. |
640x480 |
| AdaptiveResolutionDirection |
boolean |
Specifies whether to enable adaptive long/short side mode. 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 of the video 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 stream bitrate, in bits per second (bit/s). Note
This parameter is mutually exclusive with CRF. If both this parameter and CRF are empty, encoding is performed with a CRF value of 23. |
128000 |
| GOPSize |
integer |
The number of frames between keyframes. Default value: 150. Note
This parameter is not supported for the GenerateVideoPlaylist API. |
60 |
| CRF |
number |
Specifies the constant quality mode. This parameter is mutually exclusive with Bitrate. Valid values: [0,51]. A higher value results in lower quality. Recommended values: [18,38]. |
18 |
| BufferSize |
integer |
The decoding buffer size for variable bitrate, in bits per second (bps). Note
This parameter takes effect only when used together with the CRF parameter. |
4000000 |
| MaxBitrate |
integer |
The maximum bitrate limit for variable bitrate. When using this parameter, you must specify the BufferSize parameter. Note
This parameter takes effect only when used together with the CRF parameter. |
128000 |
| BFrames |
integer |
The number of consecutive B-frames. Default value: 3. |
3 |
| Refs |
integer |
The number of reference frames. Default value: 2. |
2 |
| VideoSlim |
integer |
Enables the Narrowband HD mode. Valid values: 0: Default value. Disabled. 1: Uses the Narrowband HD mode for transcoding. Note
For optimal results, use the officially recommended Bitrate or CRF parameters for video transcoding with Narrowband HD. Important Narrowband HD supports only H.264/H.265 formats, only yuv420p, 8-bit depth, and does not support multi-target video transcoding output or video concatenation. For more information, see Narrowband HD overview. |
0 |
| FilterVideo |
object |
The video filter parameters. This parameter does not take effect when TranscodeVideo is empty or TranscodeVideo.Codec is set to copy. Note
This parameter is not supported for the GenerateVideoPlaylist API. |
|
| Watermarks |
array |
The list of video watermarks. |
|
|
object |
The video watermark information. |
||
| Type |
string |
The watermark type. Valid values:
|
text |
| Dx |
number |
The meaning of this parameter varies depending on whether the value is an integer or a decimal:
|
0 |
| Dy |
number |
The meaning of this parameter varies depending on whether the value is an integer or a decimal:
|
0 |
| StartTime |
number |
The start time for adding the watermark, in seconds (s). By default, the watermark is added from the beginning of the video. |
0 |
| Duration |
number |
The duration for which the watermark is displayed, in seconds (s). By default, the watermark is displayed until the end of the video. |
0 |
| ReferPos |
string |
The reference position for adding the watermark. Valid values:
|
topleft |
| Content |
string |
The content of the text watermark. The default value is empty. Important
This parameter is effective only when the |
example |
| FontName |
string |
The font name for the text watermark. Valid values:
Important
This parameter is effective only when the |
SourceHanSans-Bold |
| FontSize |
integer |
The font size for the text watermark. The default value is 16. The value must be an integer in the range (4, 120). Important
This parameter is effective only when the |
18 |
| FontColor |
string |
The font color of the watermark text. The format is #RRGGBB. The default value is #000000. You can also enter values such as "red" or "green". Important
This parameter is effective only when the |
red |
| FontApha |
number |
The font opacity of the text watermark. The value ranges from (0, 1]. The default value is 1, which means fully opaque. Important
This parameter is effective only when the |
0.8 |
| BorderWidth |
integer |
The outline width for the text watermark, in pixels (px). The value must be an integer from 0 to 4096. The default value is 0. Important
This parameter is effective only when the |
2 |
| BorderColor |
string |
The outline color of the watermark text. The format is #RRGGBB. The default value is #000000. You can also enter values such as "red" or "green". Important
This parameter is effective only when the |
red |
| URI |
string |
The OSS URL of the watermark file. Supported formats are PNG and MOV. The OSS URL must follow the format Important
This parameter is effective only when the |
oss://test-bucket/watermark.jpg |
| Width |
number |
The width of the watermark image. By default, this is the width of the original watermark image. The meaning of this parameter varies depending on whether the value is an integer or a decimal:
|
80 |
| Height |
number |
The height of the watermark image. By default, this is the height of the original watermark image. The meaning of this parameter varies depending on whether the value is an integer or a decimal:
|
40 |
| Delogos |
array |
Applies mosaic processing to a rectangular area of the video to remove logos or station watermarks. |
|
|
object |
The video mosaic processing parameters. |
||
| StartTime |
number |
The start time for adding the mosaic, in seconds (s). By default, the mosaic is added from the beginning of the video. |
0 |
| Duration |
number |
The duration for which the mosaic is displayed, in seconds (s). By default, the mosaic is displayed until the end of the video. |
15 |
| Dx |
number |
The meaning of this parameter varies depending on whether the value is an integer or a decimal:
|
0 |
| Dy |
number |
The default value is 0. The meaning of this parameter varies depending on whether the value is an integer or a decimal:
|
0 |
| Width |
number |
The width of the mosaic. The default value is the decimal 1.0, which means it fills the entire width of the output video. The meaning of this parameter varies depending on whether the value is an integer or a decimal:
|
100 |
| Height |
number |
The height of the mosaic. The default value is the decimal 1.0, which means it fills the entire height of the output video. The meaning of this parameter varies depending on whether the value is an integer or a decimal:
|
40 |
| ReferPos |
string |
The reference position for adding the mosaic. Valid values:
|
topleft |
| Speed |
number |
The video playback speed setting. Valid values: [0.5,1.0]. Default value: 1.0. Note
Important
|
1.0 |
| Desensitization |
object |
The video desensitization configuration. Important
|
|
| Face |
object |
The facial desensitization configuration. Note
This feature is in public preview. If you have any questions, join the DingTalk group for feedback. For the DingTalk group number, see Contact us. |
|
| Confidence |
number |
The confidence threshold for facial recognition. This sets the lower limit for the confidence level. If the confidence level of a detected face is below this threshold, the face is not desensitized.
|
0.4 |
| MinSize |
integer |
The minimum face size threshold. This sets the minimum size for a face to be desensitized. If the width or height of a detected face is smaller than this threshold, the face is not desensitized. The unit is pixels. The default value is 0, which means there is no restriction on face size. |
0.4 |
| ScaleRatio |
number |
||
| BlurRadius |
integer |
||
| Transparency |
number |
||
| LicensePlate |
object |
The license plate desensitization configuration. Note
This feature is in public preview. If you have any questions, join the DingTalk group for feedback. For the DingTalk group number, see Contact us. |
|
| Confidence |
number |
The confidence threshold for license plate recognition. This sets the lower limit for the confidence level. If the confidence level of a detected license plate is below this threshold, the license plate is not desensitized.
|
0.4 |
| MinSize |
integer |
The minimum license plate size threshold. This sets the minimum size for a license plate to be desensitized. If the width or height of a detected license plate is smaller than this threshold, the license plate is not desensitized. The unit is pixels. The default value is 0, which means there is no restriction on license plate size. |
0.4 |
| ScaleRatio |
number |
||
| BlurRadius |
integer |
||
| Transparency |
number |