VideoFormat
Name
VideoFormat provides setters to set different properties which can be used to query for a specific video codec which satisfies all the properties set.
Constructors
new VideoFormat()
new VideoFormat():
VideoFormat
Returns
Accessors
colorFormat
Get Signature
get colorFormat():
string
Returns
string
set by setter.
Set Signature
set colorFormat(
format
):void
Sets the color format.
This color format is associated with the raw buffers which is applicable for decoders output or encoders input. Codec support standard and/or proprietary color formats, where application has to choose based on the usecase.
For example, if the video decoder supports "FLEX_YCbCr_420_888/FLEX_YCbCr_420_101010" which means proprietary color format, is best choice for video decoding when application will not read the buffer and its needed just for rendering on display.
Parameters
format
string
Returns
void
colorMatrix
Get Signature
get colorMatrix():
VideoColorMatrix
Returns
set by the setter
Set Signature
set colorMatrix(
matrix
):void
Sets the color matrix.
Values are taken from Table 4 of ISO/IEC 23001-8:2016
Applicable for decoders input or encoders output.
Parameters
matrix
Returns
void
colorPrimaries
Get Signature
get colorPrimaries():
VideoColorPrimaries
Returns
set by setter.
Set Signature
set colorPrimaries(
primaries
):void
Sets the color primaries.
Color Primaries represent three points(RGB primaries) of the triangle on the CIE 1931 chromaticity diagram, and the space inside the triangle is the gamut.
Applicable for decoders input or encoders output.
Parameters
primaries
Returns
void
colorTransfer
Get Signature
get colorTransfer():
VideoColorTransfer
Returns
set by the setter.
Set Signature
set colorTransfer(
transferFn
):void
Sets the color transfer.
Color Transfer characteristics map the color gamut to the screen signal
Applicable for decoders input or encoders output.
Parameters
transferFn
Returns
void
frameRate
Get Signature
get frameRate():
number
Returns
number
, the frame rate value set using setter.
Set Signature
set frameRate(
rate
):void
Sets the frameRate.
This can also be called for dynamic configuration.
Parameters
rate
number
Returns
void
resolution
Get Signature
get resolution():
Resolution
Returns
set by setter.
Set Signature
set resolution(
resolution
):void
Sets the resolution.
Recomended to provide the max resolution during transform initialization and required resolution for any dynamic resolution switching during encoding in running state.
This method can also be called for dynamic configuration.
Parameters
resolution
Returns
void
Last updated: Sep 30, 2025