public class VideoTemplateInfo extends AbstractModel
header, skipSign
Constructor and Description |
---|
VideoTemplateInfo() |
VideoTemplateInfo(VideoTemplateInfo source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
Long |
getBframes()
Get Number of B-frames between reference frames.
|
Long |
getBitDepth()
Get Bit: 8/10 is supported.
|
Long |
getBitrate()
Get Bitrate of a video stream, in kbps.
|
String |
getCodec()
Get Encoding format for video streams.
|
Long |
getCompress()
Get Proportional compression bitrate.
|
String |
getCompressType()
Get Transcoding policy.
|
String |
getFillType()
Get Padding method.
|
Long |
getFps()
Get Video frame rate.
|
Long |
getFpsDenominator()
Get Denominator of the frame rate.
|
Long |
getGop()
Get Interval between I-frames (keyframes), which can be customized in frames or seconds.
|
String |
getGopUnit()
Get GOP value unit.
|
Long |
getHeight()
Get Maximum value of the video stream height (or short edge) in px.
|
Long |
getHlsTime()
Get Average segment duration.
|
String |
getMode()
Get Bitrate control mode.
|
Long |
getNoScenecut()
Get Adaptive I-frame decision.
|
Long |
getRawPts()
Get Preservation of original timestamp.
|
String |
getResolutionAdaptive()
Get Resolution adaption.
|
String |
getSar()
Get Display aspect ratio.
|
Long |
getScenarioBased()
Get Whether the template enables scenario-based settings.
|
String |
getSceneType()
Get Video scenario.
|
SegmentSpecificInfo |
getSegmentSpecificInfo()
Get Segment duration at startup.
|
Long |
getSegmentType()
Get HLS segment type.
|
String |
getStereo3dType()
Get 3D video splicing mode, applicable only to mv-hevc and effective for 3d videos.
|
Long |
getVcrf()
Get Specifies the constant bitrate control factor for the video.
|
String |
getVideoLevel()
Get Encoder level.
|
String |
getVideoProfile()
Get Profile, suitable for different scenarios.
|
Long |
getWidth()
Get Maximum value of the video stream width (or long edge) in px.
|
void |
setBframes(Long Bframes)
Set Number of B-frames between reference frames.
|
void |
setBitDepth(Long BitDepth)
Set Bit: 8/10 is supported.
|
void |
setBitrate(Long Bitrate)
Set Bitrate of a video stream, in kbps.
|
void |
setCodec(String Codec)
Set Encoding format for video streams.
|
void |
setCompress(Long Compress)
Set Proportional compression bitrate.
|
void |
setCompressType(String CompressType)
Set Transcoding policy.
|
void |
setFillType(String FillType)
Set Padding method.
|
void |
setFps(Long Fps)
Set Video frame rate.
|
void |
setFpsDenominator(Long FpsDenominator)
Set Denominator of the frame rate.
|
void |
setGop(Long Gop)
Set Interval between I-frames (keyframes), which can be customized in frames or seconds.
|
void |
setGopUnit(String GopUnit)
Set GOP value unit.
|
void |
setHeight(Long Height)
Set Maximum value of the video stream height (or short edge) in px.
|
void |
setHlsTime(Long HlsTime)
Set Average segment duration.
|
void |
setMode(String Mode)
Set Bitrate control mode.
|
void |
setNoScenecut(Long NoScenecut)
Set Adaptive I-frame decision.
|
void |
setRawPts(Long RawPts)
Set Preservation of original timestamp.
|
void |
setResolutionAdaptive(String ResolutionAdaptive)
Set Resolution adaption.
|
void |
setSar(String Sar)
Set Display aspect ratio.
|
void |
setScenarioBased(Long ScenarioBased)
Set Whether the template enables scenario-based settings.
|
void |
setSceneType(String SceneType)
Set Video scenario.
|
void |
setSegmentSpecificInfo(SegmentSpecificInfo SegmentSpecificInfo)
Set Segment duration at startup.
|
void |
setSegmentType(Long SegmentType)
Set HLS segment type.
|
void |
setStereo3dType(String Stereo3dType)
Set 3D video splicing mode, applicable only to mv-hevc and effective for 3d videos.
|
void |
setVcrf(Long Vcrf)
Set Specifies the constant bitrate control factor for the video.
|
void |
setVideoLevel(String VideoLevel)
Set Encoder level.
|
void |
setVideoProfile(String VideoProfile)
Set Profile, suitable for different scenarios.
|
void |
setWidth(Long Width)
Set Maximum value of the video stream width (or long edge) in px.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public VideoTemplateInfo()
public VideoTemplateInfo(VideoTemplateInfo source)
public String getCodec()
public void setCodec(String Codec)
Codec
- Encoding format for video streams. Optional values:
public Long getFps()
public void setFps(Long Fps)
Fps
- Video frame rate. Value range:
When FpsDenominator is empty, the range is [0, 120], in Hz.
When FpsDenominator is not empty, the Fps/FpsDenominator range is [0, 120].
If the value is 0, the frame rate will be the same as that of the source video.public Long getBitrate()
public void setBitrate(Long Bitrate)
Bitrate
- Bitrate of a video stream, in kbps. Value range: 0 and [128, 100000].If the value is 0, the bitrate of the video will be the same as that of the source video.public String getResolutionAdaptive()
public void setResolutionAdaptive(String ResolutionAdaptive)
ResolutionAdaptive
- Resolution adaption. Valid values:
public Long getWidth()
public void setWidth(Long Width)
Width
- Maximum value of the video stream width (or long edge) in px. Value range: 0 and [128, 4096].
public Long getHeight()
public void setHeight(Long Height)
Height
- Maximum value of the video stream height (or short edge) in px. Value range: 0 and [128, 4,096].
public Long getGop()
public void setGop(Long Gop)
Gop
- Interval between I-frames (keyframes), which can be customized in frames or seconds. GOP value range: 0 and [1, 100000].
If this parameter is 0 or left blank, the system will automatically set the GOP length.public String getGopUnit()
public void setGopUnit(String GopUnit)
GopUnit
- GOP value unit. Optional values:
frame: indicates frame
second: indicates second
Default value: frame
Note: This field may return null, indicating that no valid value can be obtained.public String getFillType()
public void setFillType(String FillType)
FillType
- Padding method. When the video stream configuration width and height parameters are inconsistent with the aspect ratio of the original video, the transcoding processing method is "padding". Optional filling method:
public Long getVcrf()
public void setVcrf(Long Vcrf)
Vcrf
- Specifies the constant bitrate control factor for the video. Value range: [0, 51]. Leaving this parameter blank sets it to "Automatic". It is recommended not to specify this parameter unless necessary.
If the Mode parameter is set to VBR and the Vcrf value is also configured, MPS will process the video in VBR mode, considering both Vcrf and Bitrate parameters to balance video quality, bitrate, transcoding efficiency, and file size.
If the Mode parameter is set to CRF, the Bitrate setting will be invalid, and encoding will be based on the Vcrf value.
If the Mode parameter is set to ABR or CBR, the Vcrf value does not need to be configured.
Note: This field may return null, indicating that no valid value can be obtained.public Long getHlsTime()
public void setHlsTime(Long HlsTime)
HlsTime
- Average segment duration. Value range: (0-10], unit: second.
This parameter will be set to automatic if not specified. The segment duration will be automatically selected based on the GOP and other characteristics of the video.
Note: It can be used only in the container format of hls.
Note: This field may return null, indicating that no valid value can be obtained.public Long getSegmentType()
public void setSegmentType(Long SegmentType)
SegmentType
- HLS segment type. Valid values:
public Long getFpsDenominator()
public void setFpsDenominator(Long FpsDenominator)
FpsDenominator
- Denominator of the frame rate.
Note: The value must be greater than 0.
Note: This field may return null, indicating that no valid values can be obtained.public String getStereo3dType()
public void setStereo3dType(String Stereo3dType)
Stereo3dType
- 3D video splicing mode, applicable only to mv-hevc and effective for 3d videos. valid values:.
public String getVideoProfile()
public void setVideoProfile(String VideoProfile)
VideoProfile
- Profile, suitable for different scenarios.
baseline: It only supports I/P-frames and non-interlaced scenarios, and is suitable for scenarios such as video calls and mobile videos.
main: It offers I-frames, P-frames, and B-frames, and supports both interlaced and non-interlaced modes. It is mainly used in mainstream audio and video consumption products such as video players and streaming media transmission devices.
high: the highest encoding level, with 8x8 prediction added to the main profile and support for custom quantification. It is widely used in scenarios such as Blu-ray storage and HDTV.
default: automatic filling along with the original video.
This configuration appears only when the encoding standard is set to H264. baseline/main/high is supported. Default value: default
Note: This field may return null, indicating that no valid value can be obtained.public String getVideoLevel()
public void setVideoLevel(String VideoLevel)
VideoLevel
- Encoder level. Default value: auto ("")
If the encoding standard is set to H264, the following options are supported: "", 1, 1.1, 1.2, 1.3, 2, 2.1, 2.2, 3, 3.1, 3.2, 4, 4.1, 4.2, 5, and 5.1.
If the encoding standard is set to H265, the following options are supported: "", 1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2, and 8.5.
Note: This field may return null, indicating that no valid value can be obtained.public Long getBframes()
public void setBframes(Long Bframes)
Bframes
- Number of B-frames between reference frames. The default is auto, and a range of 0 - 16 is supported.
Note: Leaving it blank means using the auto option.
Note: This field may return null, indicating that no valid value can be obtained.public String getMode()
public void setMode(String Mode)
Mode
- Bitrate control mode. Optional values:
VBR: variable bitrate. The output bitrate is adjusted based on the complexity of the video image, ensuring higher image quality. This mode is suitable for storage scenarios as well as applications with high image quality requirements.
ABR: average bitrate. The average bitrate of the output video is kept stable to the greatest extent, but short-term bitrate fluctuations are allowed. This mode is suitable for scenarios where it is necessary to minimize the overall bitrate while a certain quality is maintained.
CBR: constant bitrate. The output bitrate remains constant during the video encoding process, regardless of changes in image complexity. This mode is suitable for scenarios with strict network bandwidth requirements, such as live streaming.
VCRF: constant rate factor. The video quality is controlled by setting a quality factor, achieving constant quality encoding of videos. The bitrate is automatically adjusted based on the complexity of the content. This mode is suitable for scenarios where maintaining a certain quality is desired.
VBR is selected by default.
Note: This field may return null, indicating that no valid value can be obtained.public String getSar()
public void setSar(String Sar)
Sar
- Display aspect ratio. Optional values: [1:1, 2:1, default]
Default value: default
Note: This field may return null, indicating that no valid value can be obtained.public Long getNoScenecut()
public void setNoScenecut(Long NoScenecut)
NoScenecut
- Adaptive I-frame decision. When it is enabled, Media Processing Service will automatically identify transition points between different scenarios in the video (usually they are visually distinct frames, such as those of switching from one shot to another) and adaptively insert keyframes (I-frames) at these points to improve the random accessibility and encoding efficiency of the video. Optional values:
0: Disable the adaptive I-frame decision
1: Enable the adaptive I-frame decision
Default value: 0
Note: This field may return null, indicating that no valid value can be obtained.public Long getBitDepth()
public void setBitDepth(Long BitDepth)
BitDepth
- Bit: 8/10 is supported. Default value: 8
Note: This field may return null, indicating that no valid value can be obtained.public Long getRawPts()
public void setRawPts(Long RawPts)
RawPts
- Preservation of original timestamp. Optional values:
0: Disabled
1: Enabled
Default value: Disabled
Note: This field may return null, indicating that no valid value can be obtained.public Long getCompress()
public void setCompress(Long Compress)
Compress
- Proportional compression bitrate. When it is enabled, the bitrate of the output video will be adjusted according to the proportion. After the compression ratio is entered, the system will automatically calculate the target output bitrate based on the source video bitrate. Compression ratio range: 0-100
Leaving this value blank means it is not enabled by default.
Note: This field may return null, indicating that no valid value can be obtained.public SegmentSpecificInfo getSegmentSpecificInfo()
public void setSegmentSpecificInfo(SegmentSpecificInfo SegmentSpecificInfo)
SegmentSpecificInfo
- Segment duration at startup.
Note: This field may return null, indicating that no valid value can be obtained.public Long getScenarioBased()
public void setScenarioBased(Long ScenarioBased)
ScenarioBased
- Whether the template enables scenario-based settings.
0: disable.
1: enable
Default value: 0
Note: The values of SceneType and CompressType fields only take effect when this field value is 1.
Note: This field may return null, indicating that no valid value can be obtained.public String getSceneType()
public void setSceneType(String SceneType)
SceneType
- Video scenario. Valid values:
normal: General transcoding scenario: General transcoding and compression scenario.
pgc: PGC HD TV shows and movies: At the time of compression, focus is placed on the viewing experience of TV shows and movies and ROI encoding is performed according to their characteristics, while high-quality contents of videos and audio are retained.
materials_video: HD materials: Scenario involving material resources, where requirements for image quality are extremely high and there are many transparent images, with almost no visual loss during compression.
ugc: UGC content: It is suitable for a wide range of UGC/short video scenarios, with an optimized encoding bitrate for short video characteristics, improved image quality, and enhanced business QOS/QOE metrics.
e-commerce_video: Fashion show/e-commerce: At the time of compression, emphasis is placed on detail clarity and ROI enhancement, with a particular focus on maintaining the image quality of the face region.
educational_video: Education: At the time of compression, emphasis is placed on the clarity and readability of text and images to help students better understand the content, ensuring that the teaching content is clearly conveyed.
Default value: normal.
Note: To use this value, the value of ScenarioBased must be 1; otherwise, this value will not take effect.
Note: This field may return null, indicating that no valid value can be obtained.public String getCompressType()
public void setCompressType(String CompressType)
CompressType
- Transcoding policy. Valid values:
ultra_compress: Extreme compression: Compared to standard compression, this policy can maximize bitrate compression while ensuring a certain level of image quality, thus greatly saving bandwidth and storage costs.
standard_compress: Comprehensively optimal: Balances compression ratio and image quality, compressing files as much as possible without a noticeable reduction in subjective image quality. Only audio and video TSC transcoding fees are charged for this policy.
high_compress: Bitrate priority: Prioritizes reducing file size, which may result in certain image quality loss. Only audio and video TSC transcoding fees are charged for this policy.
low_compress: Image quality priority: Prioritizes ensuring image quality, and the size of compressed files may be relatively large. Only audio and video TSC transcoding fees are charged for this policy.
Default value: standard_compress.
Note: If you need to watch videos on TV, it is recommended not to use the ultra_compress policy. The billing standard for the ultra_compress policy is TSC transcoding + audio and video enhancement - artifacts removal.
Note: To use this value, the value of ScenarioBased must be 1; otherwise, this value will not take effect.
Note: This field may return null, indicating that no valid value can be obtained.Copyright © 2025. All rights reserved.