Encoding Settings¶
Enumerations for encoding and transcoder settings.
BitrateMode¶
- class avblocks.BitrateMode¶
Bases:
IntEnumDefines the bitrate mode of the audio/video stream.
- ABR = 3¶
Average bitrate. Guarantees a predictable audio/video size similar to CBR. The bitrate changes to achieve the best quality within the available bitrate capacity.
- CBR = 1¶
Constant bitrate. For uncompressed audio/video with constant bitrate the quality is also constant. For compressed audio/video with constant bitrate the quality may be constant or variable.
- Unknown = 0¶
The bitrate mode is not specified or unknown.
- VBR = 2¶
Variable bitrate - quality oriented. Constant quality (more or less).
TranscoderStatus¶
Use¶
HardwareEncoder¶
- class avblocks.HardwareEncoder¶
Bases:
IntEnumDefines known hardware encoders.
- AMD = 2¶
AMD Video Coding Engine (VCE)
- Auto = 1¶
The encoder is selected automatically depending on the available hardware. The order of preference is: Intel QuickSync, Nvidia NVENC, AMD VCE. If none of the known encoders are available then a software encoder is used.
- Intel = 3¶
Intel QuickSync Video
- Nvidia = 4¶
Nvidia NVENC
- Off = 0¶
Hardware encoders are disabled.
HwApi¶
H264Profile¶
- class avblocks.H264Profile¶
Bases:
IntEnumDefines H.264/AVC profiles
- Notes:
The constants follow the H.264 spec for the element “profile_idc”
- Baseline = 66¶
Baseline profile
- High = 100¶
High profile
- High10 = 110¶
High 10
- High422 = 122¶
High 4:2:2
- High444 = 144¶
High 4:4:4
- Main = 77¶
Main profile
- None_ = 0¶
None/Auto
H264EntropyCodingMode¶
H264DeblockingFilter¶
- class avblocks.H264DeblockingFilter¶
Bases:
IntEnumDefines H.264/AVC deblocking filter mode.
- Notes:
The constants follow the H.264 spec for the element “disable_deblocking_filter_idc”
- All = 0¶
Deblocking filter is applied on all luma and chroma block edges of the slice.
- InSlice = 2¶
Deblocking filter is applied on all luma and chroma block edges of the slice with exception of the block edges that coincide with slice boundaries.
- Off = 1¶
Deblocking filter is disabled for all block edges of the slice.
H264DirectPredMode¶
H264MeSplitMode¶
- class avblocks.H264MeSplitMode¶
Bases:
IntEnumDefines the block sizes for which motion estimation should be done.
- Notes:
Used when encoding H.264/AVC.
- DownTo4x4 = 2¶
Analyze all blocks down to 4x4 (16x16, 16x8, 8x16, 8x8, 8x4, 4x8, 4x4). This partitioning mode is very slow.
- DownTo8x8 = 1¶
Analyze all blocks down to 8x8 (16x16, 16x8, 8x16, 8x8)
- Only16x16 = 0¶
Analyze only 16x16 blocks for motion estimation
H264MeMethod¶
- class avblocks.H264MeMethod¶
Bases:
IntEnumDefines the motion estimation methods used when encoding H.264/AVC
- ClassicLog = 1¶
TDL (Two Dimensional Logarithmic Search)
- EPZS(Enhanced Predictive Zonal Search) = 3¶
EPZS (Enhanced Predictive Zonal Search)
- Full(slowest) = 0¶
Full (slowest)
- FullOrthogonal = 4¶
OSA (Full orthogonal)
- Log = 2¶
Log
- LogOrthogonal = 5¶
Log orthogonal
- UMH(Uneven Multi-Hexagon Search) = 8¶
UMH (Uneven Multi-Hexagon Search)
H264PicCodingType¶
H264RateControlMethod¶
- class avblocks.H264RateControlMethod¶
Bases:
IntEnumDefines methods for bitrate control when encoding H.264/AVC
- ABR = 2¶
Average Bitrate. Ensures that the output stream achieves a predictable long-term average bitrate.
- ConstantQuant = 3¶
Constant Quantization. Encodes the video to a constant quantizer. The encoder uses the specified target quantizer, not a target bitrate. The quantizer is a measure for the amount of data loss: a higher quantizer means that more data will be lost, which results in a better compression, but also delivers worse visual quality. This method could be used when a certain level of quality is required and the final bitrate is not a concern. The bitrate is unpredictable in this mode.