Struct VideoEncoderProperties

Inheritance Relationships

Base Type

Struct Documentation

struct VideoEncoderProperties : public dai::PropertiesSerializable<Properties, VideoEncoderProperties>

Specify properties for VideoEncoder such as profile, bitrate, …

Public Types

enum class RateControlMode : int

Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)

Values:

enumerator CBR
enumerator VBR
enum class Profile : int

Encoding profile, H264 (AVC), H265 (HEVC) or MJPEG

Values:

enumerator H264_BASELINE
enumerator H264_HIGH
enumerator H264_MAIN
enumerator H265_MAIN
enumerator MJPEG

Public Functions

~VideoEncoderProperties() override

Public Members

std::int32_t bitrate = 0

Specifies preferred bitrate (in bit/s) of compressed output bitstream in CBR mode

“0” for automatic computation, based on input resolution and FPS: 720p30: 4Mbps, 1080p30: 8.5Mbps, 1440p30: 14Mbps, 2160p30: 20Mbps

std::int32_t keyframeFrequency = 30

Every x number of frames a keyframe will be inserted

std::int32_t maxBitrate = 0

Specifies maximum bitrate (in bit/s) of compressed output bitstream in CBR mode

“0” to follow bitrate setting

std::int32_t numBFrames = 0

Specifies number of B frames to be inserted

std::uint32_t numFramesPool = 0

This options specifies how many frames are available in this node’s pool. Helps when receiver is slow at consuming.

Value “0” indicates automatic number of frames assignment

std::int32_t outputFrameSize = 0

Specifies max output frame size in pool. Value “0” indicates auto

Profile profile = Profile::H264_BASELINE

Encoding profile, H264, H265 or MJPEG

std::int32_t quality = 80

Value between 0-100% (approximates quality)

bool lossless = false

Lossless mode ([M]JPEG only)

RateControlMode rateCtrlMode = RateControlMode::CBR

Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)

float frameRate = 30.0f

Frame rate