Encoding Settings

Enumerations for encoding and transcoder settings.

BitrateMode

class avblocks.BitrateMode

Bases: IntEnum

Defines 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

class avblocks.TranscoderStatus

Bases: IntEnum

Defines the status of a transcoder operation.

It is sent with the Transcoder.on_status event.

See Also:

Transcoder.on_status TranscoderStatusEventArgs

Completed = 0

Transcoder.run has completed successfully.

Use

class avblocks.Use

Bases: IntEnum

Specifies whether particular feature should be used.

Auto = 2

The feature usage is automatic.

Off = 0

The feature is OFF.

On = 1

The feature is ON.

HardwareEncoder

class avblocks.HardwareEncoder

Bases: IntEnum

Defines 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

class avblocks.HwApi

Bases: IntEnum

API for using hardware engines

AmdMedia = 4

AMF (AMD Media Framework)

AmdOpenVideo = 3

AMD OpenVideo

IntelMedia = 1

Intel Media SDK

MediaFoundation = 5

Windows Media Foundation

None_ = 0

HwApi not specified

Nvenc = 2

NVENC SDK

H264Profile

class avblocks.H264Profile

Bases: IntEnum

Defines 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

class avblocks.H264EntropyCodingMode

Bases: IntEnum

Defines H.264/AVC entropy coding modes

Notes:

The constants follow the H.264 spec for the element “entropy_coding_mode_flag”

CABAC = 1

Context-Adaptive Binary Arithmetic Coding (CABAC)

CAVLC = 0

Context-Adaptive Variable-Length Coding (CAVLC)

H264DeblockingFilter

class avblocks.H264DeblockingFilter

Bases: IntEnum

Defines 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

class avblocks.H264DirectPredMode

Bases: IntEnum

Defines H.264/AVC direct prediction mode.

Notes:

The constants follow the H.264 spec for the element “direct_spatial_mv_pred_flag”

Spatial = 1

Spatial direct mode prediction

Temporal = 0

Temporal direct mode prediction

H264MeSplitMode

class avblocks.H264MeSplitMode

Bases: IntEnum

Defines 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: IntEnum

Defines 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

class avblocks.H264PicCodingType

Bases: IntEnum

Defines the picture coding type when encoding H.264/AVC

Fields = 1

Video pictures are coded as fields (interlaced video)

Frames = 0

Video pictures are coded as frames (progressive video)

H264RateControlMethod

class avblocks.H264RateControlMethod

Bases: IntEnum

Defines 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.

H265Profile

class avblocks.H265Profile

Bases: IntEnum

H.265 / HEVC Profiles

Main = 1

Main profile

Main10 = 2

Main10 profile

None_ = 0

None/Auto

H265Level

class avblocks.H265Level

Bases: IntEnum

H.265 / HEVC Levels

L1 = 30

= 30

L2 = 60

= 60

L21 = 63

= 63

L3 = 90

= 90

L31 = 93

= 93

L4 = 120

= 120

L41 = 123

= 123

L5 = 150

= 150

L51 = 153

= 153

L52 = 156

= 156

L6 = 180

= 180

L61 = 183

= 183

L62 = 186

= 186

None_ = 0

None / Auto

H265Tier

class avblocks.H265Tier

Bases: IntEnum

H.265 / HEVC Tiers

High = 1

= 1

Main = 0

= 0