X264Codec

Parameters for tuning the x264 encoder

Field

Type

Repeated

Description

threads

OptionalInt

bitrateMode

oneOf

⮑abr

uint32

Encode in average bitrate mode, specified in kilobits/sec (note, 1 kilobit is 1000 bits). You can make use of the vbv settings to control the bounds on how much the actual bitrate can fluctuate within the bounds of the average.recommeb

⮑cqp

uint32

Encode in constant quantizer mode. In general, crf will give better results, although cqp can be faster to encode

⮑crf

float

Encode in constant rate factor mode. This will give a constant 'quality' to the encode, but with a variable bitrate

profile

X264Codec.X264Profile

Set the H264 profile of the output

level

OptionalInt

Sets the level flag in the output. Permissible levels are 1, 1.1, 1.2, 1.3, 2, 2.1, 2.2, 3, 3.1, 3.2, 4, 4.1, 4.2, 5, 5.1 - since this field is an integer, you pass in 10 times the required value (e.g., 11, 12 etc)

key_frame_interval_min

OptionalInt

Sets the minimum length between IDR frames

key_frame_interval_max

OptionalInt

Sets the maximum length between IDR frames

bframes

OptionalInt

Sets the maximum number of concurrent B-frames

tune

X264Codec.X264Tune

Tune options to further optimize them for your input content. If you specify a tuning, the changes will be applied after 'preset' but before all other parameters.

preset

X264Codec.X264Preset

Change options to trade off compression efficiency against encoding speed. If you specify a preset, the changes it makes will be applied before all other parameters are applied.

frame_reference

OptionalInt

Maximum number of reference frames, i.e., the number of previous frames each P-frame can use as references

cabac

OptionalBool

Enables CABAC (Context Adaptive Binary Arithmetic Coder) stream compression instead of the less efficient CAVLC (Context Adaptive Variable Length Coder) system. Significantly improves both the compression efficiency (10-20% typically) and the decoding requirements, at the expense of encode CPU requirements

vbv_max_rate

OptionalInt

Sets the maximum rate the VBV buffer should be assumed to refill at (kbit/s)

vbv_buffer_size

OptionalInt

Sets the size of the VBV buffer in kilobits

scene_cut

OptionalInt

Sets the threshold for I/IDR frame placement. Setting sceneCut to zero disables adaptive I-frame decisioning

aud

OptionalBool

Use access unit delimiters in the output

no_deblock

OptionalBool

Disables the loop filter. Not Recommended.

nal_hrd

X264Codec.X264NalHrd

Signal HRD information

Enums defined in this message

Name

Number

Description

X264_PROFILE_UNDEFINED

0

X264_PROFILE_BASELINE

1

X264_PROFILE_MAIN

2

X264_PROFILE_HIGH

4

X264_PROFILE_HIGH10

5

X264_PROFILE_HIGH422

6

X264_PROFILE_HIGH444

7

Name

Number

Description

X264_PRESET_ULTRAFAST

0

X264_PRESET_SUPERFAST

1

X264_PRESET_VERYFAST

2

X264_PRESET_FASTER

3

X264_PRESET_FAST

4

X264_PRESET_MEDIUM

5

X264_PRESET_SLOW

6

X264_PRESET_SLOWER

7

X264_PRESET_VERYSLOW

8

X264_PRESET_PLACEBO

9

Name

Number

Description

X264_TUNE_UNDEFINED

0

X264_TUNE_FILM

1

X264_TUNE_ANIMATION

2

X264_TUNE_GRAIN

3

X264_TUNE_STILLIMAGE

4

X264_TUNE_PSNR

5

X264_TUNE_SSIM

6

X264_TUNE_FASTDECODE

7

X264_TUNE_ZEROLATENCY

8

Name

Number

Description

X264_NAL_HRD_UNDEFINED

0

X264_NAL_HRD_NONE

1

Specify no HRD information

X264_NAL_HRD_VBR

2

Specify HRD information

X264_NAL_HRD_CBR

3

Specify HRD information and pack the bitstream to the bitrate specified

Member of

Message

Description

VideoEncodeStream