public class SubtitleTemplate extends AbstractModel
header, skipSign
Constructor and Description |
---|
SubtitleTemplate() |
SubtitleTemplate(SubtitleTemplate 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 |
---|---|
Float |
getBoardAlpha()
Get Subtitle background transparency.
|
String |
getBoardColor()
Get Board color.
|
Long |
getBoardHeight()
Get Board height.
|
Long |
getBoardWidth()
Get Board width.
|
String |
getBoardY()
Get Subtitle background position on the Y-axis.
|
Float |
getFontAlpha()
Get The text transparency.
|
String |
getFontColor()
Get Font color.
|
String |
getFontSize()
Get Font size.
|
String |
getFontType()
Get Font type.
|
String |
getPath()
Get The URL of the subtitles to add to the video.
|
Long |
getStreamIndex()
Get Specifies the subtitle track for embedding subtitles into the video.
|
String |
getYPos()
Get Subtitle position on the Y-axis.
|
void |
setBoardAlpha(Float BoardAlpha)
Set Subtitle background transparency.
|
void |
setBoardColor(String BoardColor)
Set Board color.
|
void |
setBoardHeight(Long BoardHeight)
Set Board height.
|
void |
setBoardWidth(Long BoardWidth)
Set Board width.
|
void |
setBoardY(String BoardY)
Set Subtitle background position on the Y-axis.
|
void |
setFontAlpha(Float FontAlpha)
Set The text transparency.
|
void |
setFontColor(String FontColor)
Set Font color.
|
void |
setFontSize(String FontSize)
Set Font size.
|
void |
setFontType(String FontType)
Set Font type.
|
void |
setPath(String Path)
Set The URL of the subtitles to add to the video.
|
void |
setStreamIndex(Long StreamIndex)
Set Specifies the subtitle track for embedding subtitles into the video.
|
void |
setYPos(String YPos)
Set Subtitle position on the Y-axis.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public SubtitleTemplate()
public SubtitleTemplate(SubtitleTemplate source)
public String getPath()
public void setPath(String Path)
Path
- The URL of the subtitles to add to the video.
Note: This field may return null, indicating that no valid values can be obtained.public Long getStreamIndex()
public void setStreamIndex(Long StreamIndex)
StreamIndex
- Specifies the subtitle track for embedding subtitles into the video. the Streamindex parameter takes value starting from 0, where 0 indicates usage of the first subtitle track in the source video. if Path is specified, use Path preferentially. either Path or Streamindex should be specified.
-Note: StreamIndex must match the subtitle track index in the source file. for example, if the subtitle track in the source file is stream#0:3, StreamIndex should be 3. otherwise, task processing failed.
Note: This field may return null, indicating that no valid value can be obtained.public String getFontType()
public void setFontType(String FontType)
FontType
- Font type. valid values:.
public String getFontSize()
public void setFontSize(String FontSize)
FontSize
- Font size. Format: Npx, where N is a numerical value. If it is not specified, the font size of the subtitle file applies.
It is 5% of the source video height by default.
Note: This field may return null, indicating that no valid value can be obtained.public String getFontColor()
public void setFontColor(String FontColor)
FontColor
- Font color. Format: 0xRRGGBB. Default value: 0xFFFFFF (white).
Note: This field may return null, indicating that no valid value can be obtained.public Float getFontAlpha()
public void setFontAlpha(Float FontAlpha)
FontAlpha
- The text transparency. Value range: 0-1.
public String getYPos()
public void setYPos(String YPos)
YPos
- Subtitle position on the Y-axis. If this parameter is specified, the built-in coordinates in the subtitle file will be ignored. The pixel and percentage formats are supported.
- Pixel: Npx. Value range of N: [0,4096].
- Percentage: N%. Value range of N: [0,100]. For example, 10% indicates that the subtitle position on the Y-axis is 10% of the video height.
By default, the position is 4% of the source video height.
Note: The origin of the coordinate axes is at the bottom of the central axis of the source video, and the subtitle reference position is at the bottom of the central axis of the subtitles, as shown in the figure below.

Note: This field may return null, indicating that no valid value can be obtained.public String getBoardY()
public void setBoardY(String BoardY)
BoardY
- Subtitle background position on the Y-axis. Pixel and percentage formats are supported.
- Pixel: Npx. Value range of N: [0,4096].
- Percentage: N%. Value range of N: [0,100]. For example, 10% indicates that the subtitle background position on the Y-axis is 10% of the video height.
If this parameter is not specified, the subtitle background is disabled.
Note: The origin of the coordinate axes is at the bottom of the central axis of the source video, and the reference position of the subtitle background is at the bottom of the central axis of the source video, as shown in the figure below.

Note: This field may return null, indicating that no valid value can be obtained.public Long getBoardWidth()
public void setBoardWidth(Long BoardWidth)
BoardWidth
- Board width. Unit: pixels. Value range: [0,4096].
It is 90% of the source video width by default.
Note: This field may return null, indicating that no valid value can be obtained.public Long getBoardHeight()
public void setBoardHeight(Long BoardHeight)
BoardHeight
- Board height. Unit: pixels. Value range: [0,4096].
It is 15% of the source video height by default.
Note: This field may return null, indicating that no valid value can be obtained.public String getBoardColor()
public void setBoardColor(String BoardColor)
BoardColor
- Board color. Format: 0xRRGGBB.
Default value: 0x000000 (black).
Note: This field may return null, indicating that no valid value can be obtained.public Float getBoardAlpha()
public void setBoardAlpha(Float BoardAlpha)
BoardAlpha
- Subtitle background transparency. Value range: [0, 1].
Copyright © 2025. All rights reserved.