#include <VideoEncoderProperties.hpp>
Public Types | |
enum | Profile : int { Profile::H264_BASELINE, Profile::H264_HIGH, Profile::H264_MAIN, Profile::H265_MAIN, Profile::MJPEG } |
enum | RateControlMode : int { RateControlMode::CBR, RateControlMode::VBR } |
Public Attributes | |
std::int32_t | bitrate = 0 |
float | frameRate = 30.0f |
std::int32_t | keyframeFrequency = 30 |
bool | lossless = false |
std::int32_t | maxBitrate = 0 |
std::int32_t | numBFrames = 0 |
std::uint32_t | numFramesPool = 0 |
std::int32_t | outputFrameSize = 0 |
Profile | profile = Profile::H264_BASELINE |
std::int32_t | quality = 80 |
RateControlMode | rateCtrlMode = RateControlMode::CBR |
Additional Inherited Members | |
![]() | |
virtual std::unique_ptr< Properties > | clone () const override |
virtual void | serialize (std::vector< std::uint8_t > &data, SerializationType type=SerializationType::LIBNOP) const override |
![]() | |
virtual std::unique_ptr< Properties > | clone () const =0 |
virtual | ~Properties ()=default |
Specify properties for VideoEncoder such as profile, bitrate, ...
Definition at line 12 of file VideoEncoderProperties.hpp.
|
strong |
Encoding profile, H264 (AVC), H265 (HEVC) or MJPEG
Enumerator | |
---|---|
H264_BASELINE | |
H264_HIGH | |
H264_MAIN | |
H265_MAIN | |
MJPEG |
Definition at line 21 of file VideoEncoderProperties.hpp.
|
strong |
Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)
Enumerator | |
---|---|
CBR | |
VBR |
Definition at line 16 of file VideoEncoderProperties.hpp.
std::int32_t dai::VideoEncoderProperties::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
Definition at line 28 of file VideoEncoderProperties.hpp.
float dai::VideoEncoderProperties::frameRate = 30.0f |
Frame rate
Definition at line 74 of file VideoEncoderProperties.hpp.
std::int32_t dai::VideoEncoderProperties::keyframeFrequency = 30 |
Every x number of frames a keyframe will be inserted
Definition at line 32 of file VideoEncoderProperties.hpp.
bool dai::VideoEncoderProperties::lossless = false |
Lossless mode ([M]JPEG only)
Definition at line 66 of file VideoEncoderProperties.hpp.
std::int32_t dai::VideoEncoderProperties::maxBitrate = 0 |
Specifies maximum bitrate (in bit/s) of compressed output bitstream in CBR mode
"0" to follow bitrate
setting
Definition at line 38 of file VideoEncoderProperties.hpp.
std::int32_t dai::VideoEncoderProperties::numBFrames = 0 |
Specifies number of B frames to be inserted
Definition at line 42 of file VideoEncoderProperties.hpp.
std::uint32_t dai::VideoEncoderProperties::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
Definition at line 49 of file VideoEncoderProperties.hpp.
std::int32_t dai::VideoEncoderProperties::outputFrameSize = 0 |
Specifies max output frame size in pool. Value "0" indicates auto
Definition at line 54 of file VideoEncoderProperties.hpp.
Profile dai::VideoEncoderProperties::profile = Profile::H264_BASELINE |
Encoding profile, H264, H265 or MJPEG
Definition at line 58 of file VideoEncoderProperties.hpp.
std::int32_t dai::VideoEncoderProperties::quality = 80 |
Value between 0-100% (approximates quality)
Definition at line 62 of file VideoEncoderProperties.hpp.
RateControlMode dai::VideoEncoderProperties::rateCtrlMode = RateControlMode::CBR |
Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)
Definition at line 70 of file VideoEncoderProperties.hpp.