MainConcept Hybrid HEVC/H.265 Encoder Plug-in 3.2.0
Hybrid HEVC Encoder plug-in usage

The following briefly describes how to use the MainConcept Hybrid HEVC Encoder plug-in for FFmpeg.

The command line format should follow the structure below, depending on which operating system you are using.

On Windows

ffmpeg <ffmpeg-params> \
-c:v omx_enc_hevc\
-omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video \
-omx_param "<mc-general-params>" \
[HEVC Settings] "<mc-codec-params>" \
[HEVC Layer 0000] "<mc-codec-params-layer0>" \
<ffmpeg-output-parameters>

The following is a sample command line:

ffmpeg -r 25 -pix_fmt yuv420p -s 1920x1080 -i 1920x1080p_25p_YV12.yuv -b:v 3500k -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "force_omx_param=1:preset=main: perf_level=10:acc_type=nvenc:acc_mode=hybrid:[HEVC Settings]:time_scale=20000000:num_units_in_tick=1000000:[HEVC Layer 0000]:bit_rate_mode=3:hrd_conformance=2" 1920x1080p_25p_YV12_ffmpeg.hevc -y 

Here is a command-line example using a configuration file:

ffmpeg -r 25 -pix_fmt yuv420p -s 1920x1080 -i 1920x1080p_25p_YV12.yuv -b:v 3500k -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "force_omx_param=0:cfg_file_path=hevc_config.ini" 1920x1080p_25p_YV12_ffmpeg.hevc -y

On Linux

Note
The modified FFmpeg executable is installed in /opt/mainconcept/ffmpeg-omx/bin/. Ensure this folder is in your search path for the following examples.

ffmpeg <ffmpeg-params> \
-c:v omx_enc_hevc\
-omx_core libomxil_core.so -omx_name OMX.MainConcept.enc_hevc.video \
-omx_param "<mc-general-params>" \
[HEVC Settings] "<mc-codec-params>" \
[HEVC Layer 0000] "<mc-codec-params-layer0>" \
<ffmpeg-output-parameters>

The following is a sample command line:

ffmpeg -r 25 -pix_fmt yuv420p -s 1920x1080 -i 1920x1080p_25p_YV12.yuv -b:v 3500k -c:v omx_enc_hevc -omx_core libomxil_core.so -omx_name OMX.MainConcept.enc_hevc.video -omx_param "force_omx_param=1:preset=main: perf_level=10:acc_type=nvenc:acc_mode=hybrid:[HEVC Settings]:time_scale=20000000:num_units_in_tick=1000000:[HEVC Layer 0000]:bit_rate_mode=3:hrd_conformance=2" 1920x1080p_25p_YV12_ffmpeg.hevc -y

Here is a command-line example using a configuration file:

ffmpeg -r 25 -pix_fmt yuv420p -s 1920x1080 -i 1920x1080p_25p_YV12.yuv -b:v 3500k -c:v omx_enc_hevc -omx_core libomxil_core.so -omx_name OMX.MainConcept.enc_hevc.video -omx_param "force_omx_param=0:cfg_file_path=hevc_config.ini" 1920x1080p_25p_YV12_ffmpeg.hevc -y

FFmpeg options mapped to the MainConcept HEVC/H.265 Encoder

The following FFmpeg options are mapped from the command-line to the MainConcept HEVC/H.265 Video Encoder:

FFmpeg option Usage example
bit_rate -b:v 1M -b:a 192k
pix_fmt -pix_fmt yuv420p
gop_size -g 4
max_b_frames -bf 2
interlace_mode -flags +ildct
framerate -r 30 (or 30000/1001)
width; height -s 720x480

Note
We recommend the use of "floating" frame rates on the command line in a format such as 24000/1001, 30000/1001, 60000/1001 etc. If you must define a frame rate with an exact value, such as 29.97, specify it in a format such as 30000/1001.

omx_param parameters (mc-general-params/mc-codec-params)

All settings below are optional parameters for omx_param (mc-general-params/mc-codec-params):

Function Description
force_omx_param Specifies whether to prioritize the FFmpeg generic global options or the MainConcept codec specific settings:

  • 0: The force_omx_param flag is not set (default), i.e. FFmpeg generic global options will overwrite the omx_param settings.
  • 1: The FFmpeg generic global options are ignored, i.e. the MainConcept codec specific settings are exclusively used.
perf_level Specifies the predefined performance level 1 to 31 for encoding. Default is 15. Other predefined values permitted are:

  • "fastest" = 1
  • "faster" = 8
  • "balanced" = 15
  • "better_quality" = 25
  • "best_quality" = 30
acc_type Specifies whether you want to use software ("sw"), Intel Quick Sync Video ("iqsv") or NVIDIA NVENC ("nvenc") encoding. IQSV and NVENC are GPU-encoding modes.
acc_mode Special encoding modes for NVIDIA RTX boards:

  • "full": All encoding is done on the GPU
  • "driven": Software pre-analysis and rate control, hardware encoding (all frames are encoded by the GPU)
  • "hybrid": Software pre-analysis and rate control, hybrid encoding (some frames are encoded by the GPU, others are software encoded)
preset Specifies the built-in encoder presets. Available options are "main", "main10", "main_422_10", "4k", "4k10", "hls1"..."hls12", "dash1"..."dash12". For more details, see Command line examples
cfg_file_path Specifies path to HEVC/H.265 encoder configuration file containing all parameters for encoding.
    -omx_param "cfg_file_path=hevc_config.ini" 
pass 2-pass encoding is an option to achieve better visual quality but with strict target bitrate and HRD compliance. It cannot be used in live encoding. In the first encoding pass, called analysis, intermediate statistics are saved for further use in the second pass where the actual encoding will take place. 2-pass encoding can take up to twice as long as single-pass encoding.

1: Analysis pass.
2: Encoding pass that uses statistics saved in a temporary file during the analysis pass.

For 2-pass encoding, you must run FFmpeg twice; the first pass covers the analyzing step and the second pass the actual encoding step. The following are command-line examples:
    ffmpeg -s 720x576 -pix_fmt yuv420p -i /home/Projects/ffmpeg_omx/test/streams/input.yuv -c:v omx_enc_hevc -omx_core /home/scum/Projects/omx_sdk_battoolbar/bin/libomxil_core.so -omx_name OMX.MainConcept.enc_hevc.video -b:v 500000 -profile main -omx_param "pass=1" mc_ffmpeg_2pass.h265
    ffmpeg -s 720x576 -pix_fmt yuv420p -i /home/Projects/ffmpeg_omx/test/streams/input.yuv -c:v omx_enc_hevc -omx_core /home/scum/Projects/omx_sdk_battoolbar/bin/libomxil_core.so -omx_name OMX.MainConcept.enc_hevc.video -b:v 500000 -profile main -omx_param "pass=2" mc_ffmpeg_2pass.h26
passlogfile Specifies the filename and path where you store the log file that includes the data and statistics from the first analyzing pass. This parameter is optional. If not specified, the file is created using default naming conventions in the current working directory. The following are command-line examples:
    ffmpeg -s 720x576 -pix_fmt yuv420p -i /home/Projects/ffmpeg_omx/test/streams/input.yuv -c:v omx_enc_hevc -omx_core /home/scum/Projects/omx_sdk_battoolbar/bin/libomxil_core.so -omx_name OMX.MainConcept.enc_hevc.video -b:v 500000 -profile main -omx_param "pass=1:passlogfile=mc_mpass_hevc" mc_ffmpeg_2pass.h265
    ffmpeg -s 720x576 -pix_fmt yuv420p -i /home/Projects/ffmpeg_omx/test/streams/input.yuv -c:v omx_enc_hevc -omx_core /home/scum/Projects/omx_sdk_battoolbar/bin/libomxil_core.so -omx_name OMX.MainConcept.enc_hevc.video -b:v 500000 -profile main -omx_param "pass=2:passlogfile=mc_mpass_hevc" mc_ffmpeg_2pass.h265 
[HEVC Settings] Specifies parameters from the HEVC/H.265 encoder configuration on the command line, which can be applied under "[HEVC Settings]". Use : as a separator and = as a value set for the key. They must have the same structure and order as they would appear in an *.ini file, e.g.
    -omx_param "force_omx_param=1:preset=4k:acc_type=nvenc:acc_mode=hybrid:[HEVC Settings]:max_num_reencodings=0:input_filtering=2: ... :[HEVC Layer 0000]:bit_rate_mode=3:hrd_conformance=2: ... : ..."
These arguments match the MainConcept HEVC/H.265 encoder settings (see \ ref [HEVC Settings] as a reference later or a HEVC encoder configuration file as an example).
[HEVC Layer 0000] Specifies parameters from the HEVC/H.265 Encoder configuration on the command line, which can be applied under layer 0 ("[HEVC Layer 0000]"). Use : as a separator and = as a value set for the key. They must have the same structure and order as they would appear in an *.ini file, e.g.
      -omx_param "force_omx_param=1:preset=4k:acc_type=nvenc:acc_mode=hybrid:[HEVC Settings]:max_num_reencodings=0:input_filtering=2: ... :[HEVC Layer 0000]:bit_rate_mode=3:hrd_conformance=2: ... : ..."  
These arguments match the MainConcept HEVC/H.265 encoder settings (see [HEVC Layer 0000] as a reference or an HEVC Encoder configuration file as an example).
Note
The plug-in does not currently support the SABET feature in FFmpeg, so only LAYER0 is used.

Force key frame settings

This plug-in offers an option to force the current frame to become an IDR frame with FFmpeg. This option is essential for adaptive bitrate streaming formats to create segments that only occur at key frames. This will provide smooth and proper playback of the segments.You can use FFmpeg's generic force_key_frames parameter to specify when a new IDR frame should be set. However, you also need to define some MainConcept Encoder parameters via -omx_param. So if -force_key_frames 'expr:gte(t,n_forced*N)' is present (N is the number of seconds) then you should disable fixed_intra_position (by setting it to 0), which means irregular IRAP (Intra Random Access Pictures ) placement.There are currently two typical use cases to set force_key_frames in FFmpeg:

  1. ...-force_key_frames 'expr:gte(t,n_forced*N) ... -omx_param "... :fixed_intra_position=0:vscd_mode= 0:..."
    IDR-frames are only at every framerate*N position.
  2. ...-force_key_frames 'expr:gte(t,n_forced*N) ... -omx_param "... :fixed_intra_position=0:..."
    IDR-frames are at every framerate*N position plus I-frames (CRA) at scene cuts.

Command line examples

Note
The command line examples below are Windows specific. To run examples on Linux, you must slightly modify them. Instead of -omx_core omxil_core.dll, you need to specify -omx_core libomxil_core.so on Linux.

Apple HLS

Note
The command-line examples for Apple HLS do not work out-of-the-box. Depending on your use case, you need to specify the correct parameters for -force_key_frames 'expr:gte(t,n_forced*N)' where N is the number of seconds.
ffmpeg -i source_1920x1080.m2ts-vf scale=416:234-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls1:acc_type=sw:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l1_416x234.mp4  
ffmpeg -i source_1920x1080.m2ts-vf scale=480:270-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls2:acc_type=sw:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l2_480x270.mp4 
ffmpeg -i source_1920x1080.m2ts-vf scale=640:360-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls3:acc_type=sw:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l3_640x360.mp4  
ffmpeg -i source_1920x1080.m2ts-vf scale=768:432-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls4:acc_type=sw:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l4_768x432.mp4  
ffmpeg -i source_1920x1080.m2ts-vf scale=960:540-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls5:acc_type=iqsv:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l5_960x540.mp4 
ffmpeg -i source_1920x1080.m2ts-vf scale=1280:720-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls6:acc_type=sw:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l6_1280x720.mp4  
ffmpeg -i source_1920x1080.m2ts-vf scale=1280:720-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls7:acc_type=nvenc:[HEVC Settings]:acc_mode=full:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l7_1280x720.mp4 
ffmpeg -i source_1920x1080.m2ts-vf scale=1280:960-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls8:acc_type=sw:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l8_1280x960.mp4  
ffmpeg -i source_1920x1080.m2ts-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls9:acc_type=nvenc:acc_mode=hybrid:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l9_1920x1080.mp4  
ffmpeg -i source_1920x1080.m2ts-vf scale=2560:1440-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls10:acc_type=nvenc:acc_mode=driven:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l10_2560x1440.mp4 
ffmpeg -i source_1920x1080.m2ts-vf scale=3840:2160-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls11:acc_type=sw:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l11_3840x2160.mp4  
ffmpeg -i source_1920x1080.m2ts-vf scale=3840:2160-force_key_frames 'expr:gte(t,n_forced*N) -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=hls12:acc_type=iqsv:[HEVC Settings]:fixed_intra_position=0:vscd_mode= 0" output_hls_l12_3840x2160.mp4  

MPEG-DASH

ffmpeg -i source_1920x1080.m2ts -vf scale=768:432 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash1:acc_type=sw" output_dash_l1_768x432.mp4  
ffmpeg -i source_1920x1080.m2ts -vf scale=768:432 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param -preset=dash2:acc_type=sw" output_dash_l2_768x432.mp4  
ffmpeg -i source_1920x1080.m2ts -vf scale=1280:720 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash3:acc_type=sw" output_dash_l3_1280x720.mp4  
ffmpeg -i source_1920x1080.m2ts -vf scale=1280:720 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash4:acc_type=sw" output_dash_l4_1280x720.mp4  
ffmpeg -i source_1920x1080.m2ts -vf scale=1280:720 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash5:acc_type=iqsv" output_dash_l5_1280x720.mp4  
ffmpeg -i source_1920x1080.m2ts -vf scale=1280:720 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash6:acc_type=nvenc:acc_mode=full" output_dash_l6_1280x720.mp4  
ffmpeg -i source_1920x1080.m2ts -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash7:acc_type=sw" output_dash_l7_1920x1080.mp4  
ffmpeg -i source_1920x1080.m2ts -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash8:acc_type=sw" output_dash_l8_1920x1080.mp4  
ffmpeg -i source_1920x1080.m2ts -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash9:acc_type=sw" output_dash_l9_1920x1080.mp4
ffmpeg -i source_1920x1080.m2ts -vf scale=3840:2160 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash10:acc_type=nvenc:acc_mode=hybrid" output_dash_l10_3840x2160.mp4
ffmpeg -i source_1920x1080.m2ts -vf scale=3840:2160 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash11:acc_type=nvenc:acc_mode=driven" output_dash_l11_3840x2160.mp4  
ffmpeg -i source_1920x1080.m2ts -vf scale=3840:2160 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=dash12:acc_type=iqsv" output_dash_l12_3840x2160.mp4

Miscellaneous

ffmpeg -i source_1920x1080.m2ts -vf scale=1280:720 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=main:acc_type=sw" output_main_1280x720.mp4  
ffmpeg -i source_1920x1080.m2ts -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=main10:acc_type:iqsv" output_main10_1920x1080.mp4  
ffmpeg -i source_1920x1080.m2ts -vf scale=3840:2160 -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=4k:acc_type=nvenc:acc_mode=hybrid" output_4k_3840x2160.mp4
ffmpeg -i source_1920x1080.m2ts -c:v omx_enc_hevc -omx_core omxil_core.dll -omx_name OMX.MainConcept.enc_hevc.video -omx_param "preset=4k10:acc_type=nvenc:acc_mode=full" output_4k10_1920x1080.mp4  

Parameters

The MainConcept HEVC/H.265 Encoder plug-in for FFmpeg comes with a sample configuration (*.ini) files that cover the following encoder settings and parameters. You can modify them manually in a normal text editor and pass them to FFmpeg via

-omx_param "cfg_file_path=<...>"

Parameter priority order

There is a specific priority order when passing parameters to FFmpeg on the command-line. It is important to be aware of this as it can have a crucial impact on the expected encoder output:

  • omx_param: This has the highest priority and overrides everything that was previously set via cfg_file or via FFmpeg options
  • cfg_file: This only overrides FFmpeg options
  • FFmpeg options: These have the lowest priority

Parameter priority order example

Method Setting
file.ini
(setting framerate to 24 fps)
[HEVC Settings]
    time_scale=27000000
    num_units_in_tick=1125000 
ffmpeg_cmdline
(Windows)
ffmpeg -r 27 -pix_fmt yuv420p -s 1920x1080 -i file1920x1080.yuv \ 
-c:v omx_enc_hevc -omx_coreomxil_core.dll \ 
-omx_name OMX.MainConcept.enc_hevc.video \ 
-omx_param "force_omx_param=1:cfg_file_path file.ini:[HEVC Settings]:time_scale=20000000:num_units_in_tick=1000000" ffmpeg_res_filename.hevc 
ffmpeg_cmdline
(Linux)
ffmpeg -r 27 -pix_fmt yuv420p -s 1920x1080 -i file1920x1080.yuv \ 
-c:v omx_enc_hevc -omx_core libomxil_core.so \ 
-omx_name OMX.MainConcept.enc_hevc.video \ 
-omx_param "force_omx_param=1:cfg_file_path file.ini:[HEVC Settings]:time_scale=20000000:num_units_in_tick=1000000" ffmpeg_res_filename.hevc  

[HEVC Settings]

HEVC settings are covered under the following:

General parameters

chroma_format

Chroma format of the encoded picture.
  • 1: 4:2:0
  • 2: 4:2:2

bit_depth_chroma

Bit depth of the encoded chrominance samples. Note that bit_depth_chroma and bit_depth_luma must be set to the same value.
  • 8: 8-bit
  • 10: 10-bit

bit_depth_luma

Bit depth of the encoded luminance samples. Note that bit_depth_luma and bit_depth_chroma must be set to the same value.
  • 8: 8-bit
  • 10: 10-bit

max_dec_pic_buffering

Maximum number of pictures in decoded picture buffer. This is restricted by level ID. Value range is [1, 16].

min_src_pic_buffering:

Maximum number of pictures in source picture buffer. Buffering of source pictures is used for preliminary analysis. Increasing of input buffer size will increase memory requirements and latency of pictures encoding, but positively affects visual quality. To achieve the lowest latency of frames in encoder this value must be set to 0. Value range is [0, 500]. Default value is 115.

max_src_pic_buffering

Minimum encoding frames per second. Specifies the minimum encoding frame rate for automatic settings control. Values range is [0, 120], 0 means control is disabled.

time_scale

Timing info used together with num_units_in_tick (frame rate in fps = time_scale/num_units_in_tick). time_scale is the number of time units that pass in one second. By default, time_scale is set to 27000000 (27 MHz clock). These two values are used to calculate the exact frame rate of an encoded stream, where fps = time_scale/num_units_in_tick.

persistent_parsets

Makes SPS and PPS persistent for the whole encoder performance range. In this case, the headers contain all features signaled as "turned on" and do not depend on the encoder settings. Nevertheless, not all the features are used during encoding.
Value is in range [0, 1].

temporal_sub_layers

Number of temporal sub-layers. Specifies number of temporal sub-layers. Value range is [1, 3].

Picture preprocessing options

input_filtering

Input picture filtering. Specifies filtering mode of the incoming frames.
  • 0: Disable input filtering
  • 1: Apply median filter with a 3x3 kernel
  • 2: Apply mean filter with 3x3 kernel
Note
With a 3x3 kernel, the current pixel is in the middle and the closest eight pixels are at the left, right, top, bottom, top-left, top-right, bottom-left and bottom-right.

filter_low_delay_mode

Specifies a zero delay temporal filtering mode.
  • 0: Use forward and backward directions for filtering (input-to-output delay is higher)
  • 1: Use only backward direction for filtering to reduce processing delay

filter_accuracy

Specifies the desired accuracy level of temporal filtering.
  • 0: Use less accurate but faster filtering
  • 1: Use balanced filtering
  • 2: Use more accurate but slower filtering

Picture pre-analysis options

aq_mode

Adaptive quantization mode.
  • 0: Disable adaptive quantization
  • 1: Adaptive quantization according to an external QP map
  • 2: Temporal adaptive quantization
  • 3: Adaptive quantization without additional input, RDO-driven

weighted_refs

Enables weighted picture processing.
  • 0: Disable weighted picture detection
  • 1: Detects pictures with a change in brightness relative to their reference pictures and improves motion search on them

GOP options

min_intra_period

Minimum GOP length. Minimum distance between two consequent I pictures. This parameter is intended for use with enabled Scene change detection feature only. Value range is [1, hevc_v_settings::max_intra_period]. Default value is 1.

max_intra_period

Maximum GOP length. Maximum distance between two consequent I pictures. This parameter is not responsible for IRAP (Intra Random Access Pictures ) placement by itself. There is a dedicated parameter for IRAP control - hevc_v_settings::irap_period. Value range is [1, 360]. Default value is 200.

irap_period

IRAP period in GOP units. Number of GOPs between two consequent IRAP pictures.
  • 0: Only the first picture is IRAP
  • 1: Every GOP begins with IRAP
  • n: Every nth GOP begins with IRAP

irap_period_type

Specifies the IRAP picture type:
  • 0: IDR (default)
  • 1: CRA

fixed_intra_position

Fixed position of I-frames helps to achieve regular IRAP placement when Scene Change Detection is used. The encoder inserts I-frames at positions that is the multiple of hevc_v_settings::max_intra_period. Only these pictures are taken into account for IRAP placement, I-frames inserted by SCD are just ignored. Finally, the encoder places IRAPs at the positions of hevc_v_settings::max_intra_period x hevc_v_settings::irap_period
  • 0: Irregular IRAP placement
  • 1: IRAP placement at every (hevc_v_settings::max_intra_period x hevc_v_settings::irap_period)
Note
If you set the FFmpeg generic force_key_frames parameter, see Force key frame settings.

vscd_mode

Scene Change Detection (SCD) is intended to improve encoded content quality by inserting I picture at the beginning of new scenes. Enabling SCD has side effects, it affects normal I-picture/IRAP placement. Different length of scenes causes a different GOP length. In this case, GOP length is restricted by the range from hevc_v_settings::min_intra_period to hevc_v_settings::max_intra_period. In addition, more frequent I-pictures reduce the distance between two consequent IRAP pictures. To avoid influence of SCD on IRAP placement use hevc_v_settings::fixed_intra_position feature.
Note
If you set the FFmpeg generic force_key_frames parameter, see Force key frame settings.
  • 0: Disable SCD
  • 1: Enable SCD (default)

max_num_ref_pics_p

Maximum number of reference pictures used on P-pictures from list0. Value range is [1,16].

max_num_b_pics

Maximum number of B-pictures between consecutive I and P pictures. If this value is set to 0, there will be no B-pictures generated. Value range is [0, 7].

adaptive_num_b_pics

Adaptive number of B-frames. Reduces distance between two consequent P-frames according to temporal complexity.
  • 0: Disable
  • 1: Enable

max_num_ref_pics_b_l0

Maximum number of reference pictures used on B-pictures from list0.

max_num_ref_pics_b_l1

Maximum number of reference pictures used on B-pictures from list1.

wide_ref_pics_b

Specifies extended reference picture set for referenced B-pictures.
  • 0: Referenced B-pictures have the same number of active references as unreferenced B-pictures. The number of references can be adjusted through max_num_ref_pics_b_l0 and max_num_ref_pics_b_l1 respectively.
  • 1: High priority B-pictures have an extended reference picture set. The number of references is limited by max_num_ref_pics_p.
  • 2: Referenced B-pictures have an extended reference picture set. The number of references is limited by max_num_ref_pics_p.

scene_change_type

Specifies the scene change picture type that is set by vscd_mode.
  • 0: TRAIL_R with I-slices
  • 1: IDR
  • 2: CRA

intra_period_type

Specifies the intra period picture type that is set by max_intra_period.
  • 0: TRAIL_R with I-slices
  • 1: IDR
  • 2: CRA

Performance options

num_threads

Number of threads to be used during encoding. 0 means auto mode (default), 1 means single-threaded encoding, more threads will use more CPUs/cores. Value range is [0, 256].

num_parallel_pics

The number of pictures encoded simultaneously. 0 means auto mode (default), value in range from 1 to 8 to manually set the parallel encoding pictures number.

min_encoding_fps

Specifies the minimal encoding frame rate for automatic settings control. Values range is [0, 120], 0 means control is switched off (default).

max_num_reencodings

The maximum number of re-encoding attempts per picture to achieve rate control goals (e.g. bitrate match or HRD conformance). Value in range from 0 to 10, 0 means that re-encodings are disabled.

hw_acceleration

Hardware acceleration. Choose hardware encoder type. Use hevc_v_settings::hw_acc_idx to specify device if several devices match hw_acceleration. Use hevc_v_settings::hw_acc_mode to specify what is carried out on hardware.
  • 0: Pure software encoding mode
  • 1: Intel Quick Sync Video hardware acceleration
  • 2: NVIDIA NVENC hardware acceleration

hw_acc_indices

Device index for hardware acceleration. hw_acc_indices is used together with hevc_v_settings::hw_acceleration and helps to pick a particular device from the list of compatible hardware.
  • 0: n/a
  • 1: Ignored. Any available device is used
  • 2: Index of NVIDIA CUDA devices

hw_acc_mode

Hardware acceleration mode for supported NVIDIA boards. hw_acc_mode is used together with hevc_v_settings::hw_acceleration to choose what is delegated to hardware.
  • 0: Pure hardware encoding
  • 1: Software analysis, hardware encoding
  • 2: Software analysis, hybrid (HW/SW) encoding

Video signal description

input_colorimetry.signal_range

Specify signal range of input stream. Required if you need to change signal range for encoding:
  • 0: Auto
  • 1: Full (0 - 255)
  • 2: Short (limited) (16 - 235)

output_colorimetry.signal_range

Specify signal range of output stream if you need to change it. You need to set this option to Short (2) as soon as your input is Short (Limited): Default is Full (without auto detection of input):
  • 0: Auto
  • 1: Full (0 - 255) (default)
  • 2: Short (limited) (16 - 235)

input_colorimetry.color_primaries

Specifies the chrominance coordinates of the source primaries.
  • -1: COLOR_PRIMARIES_AUTO
  • 1: COLOR_PRIMARIES_BT709_6
  • 2: COLOR_PRIMARIES_UNSPECIFIED
  • 4: COLOR_PRIMARIES_BT470_6_SYSTEM_M
  • 5: COLOR_PRIMARIES_BT470_6_SYSTEM_B_G
  • 6: COLOR_PRIMARIES_SMPTE_170M
  • 7: COLOR_PRIMARIES_SMPTE_240M
  • 8: COLOR_PRIMARIES_GENERIC_FILM
  • 9: COLOR_PRIMARIES_BT2020
  • 10: COLOR_PRIMARIES_SMPTE_ST_428_1
  • 11: COLOR_PRIMARIES_SMPTE_RP_431_2
  • 12: COLOR_PRIMARIES_SMPTE_EG_432_1
  • 22: COLOR_PRIMARIES_EBU_TECH_3213_E
  • 256: COLOR_PRIMARIES_CUSTOM

input_colorimetry.transfer_characteristics

Specifies the gamma correction function of the source.
  • -1: TRANSFER_CHARACTERISTICS_AUTO
  • 1: TRANSFER_CHARACTERISTICS_BT709_6
  • 2: TRANSFER_CHARACTERISTICS_UNSPECIFIED
  • 4: TRANSFER_CHARACTERISTICS_BT470_6_SYSTEM_M
  • 5: TRANSFER_CHARACTERISTICS_BT470_6_SYSTEM_B_G
  • 6: TRANSFER_CHARACTERISTICS_BT601_6
  • 7: TRANSFER_CHARACTERISTICS_SMPTE_240M
  • 8: TRANSFER_CHARACTERISTICS_LINEAR
  • 9: TRANSFER_CHARACTERISTICS_LOGARITHMIC_1
  • 10: TRANSFER_CHARACTERISTICS_LOGARITHMIC_2
  • 11: TRANSFER_CHARACTERISTICS_IEC_61966_2_4
  • 12: TRANSFER_CHARACTERISTICS_BT_1361_0
  • 13: TRANSFER_CHARACTERISTICS_IEC_61966_2_1
  • 14: TRANSFER_CHARACTERISTICS_BT2020_10BIT
  • 15: TRANSFER_CHARACTERISTICS_BT2020_12BIT
  • 16: TRANSFER_CHARACTERISTICS_SMPTE_ST_2084
  • 17: TRANSFER_CHARACTERISTICS_SMPTE_ST_428_1
  • 18: TRANSFER_CHARACTERISTICS_BT2100_HLG
  • 256: TRANSFER_CHARACTERISTICS_CUSTOM

input_colorimetry.matrix_coefficients

Defines the source's coefficients for converting between YUV and RGB.
  • -1: MATRIX_COEFFICIENTS_AUTO
  • 0: MATRIX_COEFFICIENTS_IDENTITY
  • 1: MATRIX_COEFFICIENTS_BT709_6
  • 2: MATRIX_COEFFICIENTS_UNSPECIFIED
  • 4: MATRIX_COEFFICIENTS_FCC
  • 5: MATRIX_COEFFICIENTS_BT470_6_SYSTEM_B_G
  • 6: MATRIX_COEFFICIENTS_BT601_6
  • 7: MATRIX_COEFFICIENTS_SMPTE_240M
  • 8: MATRIX_COEFFICIENTS_YCGCO
  • 9: MATRIX_COEFFICIENTS_BT2020_NON_CONST
  • 10: MATRIX_COEFFICIENTS_BT2020_CONST
  • 11: MATRIX_COEFFICIENTS_SMPTE_2085
  • 12: MATRIX_COEFFICIENTS_CHROM_DERIVED_NON_CONST
  • 13: MATRIX_COEFFICIENTS_CHROM_DERIVED_CONST
  • 14: MATRIX_COEFFICIENTS_BT_2100_0
  • 256: MATRIX_COEFFICIENTS_CUSTOM

output_colorimetry.color_primaries

Specifies the chrominance coordinates of the output primaries.
  • -1: COLOR_PRIMARIES_AUTO
  • 1: COLOR_PRIMARIES_BT709_6
  • 2: COLOR_PRIMARIES_UNSPECIFIED
  • 4: COLOR_PRIMARIES_BT470_6_SYSTEM_M
  • 5: COLOR_PRIMARIES_BT470_6_SYSTEM_B_G
  • 6: COLOR_PRIMARIES_SMPTE_170M
  • 7: COLOR_PRIMARIES_SMPTE_240M
  • 8: COLOR_PRIMARIES_GENERIC_FILM
  • 9: COLOR_PRIMARIES_BT2020
  • 10: COLOR_PRIMARIES_SMPTE_ST_428_1
  • 11: COLOR_PRIMARIES_SMPTE_RP_431_2
  • 12: COLOR_PRIMARIES_SMPTE_EG_432_1
  • 22: COLOR_PRIMARIES_EBU_TECH_3213_E
  • 256: COLOR_PRIMARIES_CUSTOM

output_colorimetry.transfer_characteristics

Specifies the gamma correction function of the output.
  • -1: TRANSFER_CHARACTERISTICS_AUTO
  • 1: TRANSFER_CHARACTERISTICS_BT709_6
  • 2: TRANSFER_CHARACTERISTICS_UNSPECIFIED
  • 4: TRANSFER_CHARACTERISTICS_BT470_6_SYSTEM_M
  • 5: TRANSFER_CHARACTERISTICS_BT470_6_SYSTEM_B_G
  • 6: TRANSFER_CHARACTERISTICS_BT601_6
  • 7: TRANSFER_CHARACTERISTICS_SMPTE_240M
  • 8: TRANSFER_CHARACTERISTICS_LINEAR
  • 9: TRANSFER_CHARACTERISTICS_LOGARITHMIC_1
  • 10: TRANSFER_CHARACTERISTICS_LOGARITHMIC_2
  • 11: TRANSFER_CHARACTERISTICS_IEC_61966_2_4
  • 12: TRANSFER_CHARACTERISTICS_BT_1361_0
  • 13: TRANSFER_CHARACTERISTICS_IEC_61966_2_1
  • 14: TRANSFER_CHARACTERISTICS_BT2020_10BIT
  • 15: TRANSFER_CHARACTERISTICS_BT2020_12BIT
  • 16: TRANSFER_CHARACTERISTICS_SMPTE_ST_2084
  • 17: TRANSFER_CHARACTERISTICS_SMPTE_ST_428_1
  • 18: TRANSFER_CHARACTERISTICS_BT2100_HLG
  • 256: TRANSFER_CHARACTERISTICS_CUSTOM

output_colorimetry.matrix_coefficients

Defines the output's coefficients for converting between YUV and RGB.
  • -1: MATRIX_COEFFICIENTS_AUTO
  • 0: MATRIX_COEFFICIENTS_IDENTITY
  • 1: MATRIX_COEFFICIENTS_BT709_6
  • 2: MATRIX_COEFFICIENTS_UNSPECIFIED
  • 4: MATRIX_COEFFICIENTS_FCC
  • 5: MATRIX_COEFFICIENTS_BT470_6_SYSTEM_B_G
  • 6: MATRIX_COEFFICIENTS_BT601_6
  • 7: MATRIX_COEFFICIENTS_SMPTE_240M
  • 8: MATRIX_COEFFICIENTS_YCGCO
  • 9: MATRIX_COEFFICIENTS_BT2020_NON_CONST
  • 10: MATRIX_COEFFICIENTS_BT2020_CONST
  • 11: MATRIX_COEFFICIENTS_SMPTE_2085
  • 12: MATRIX_COEFFICIENTS_CHROM_DERIVED_NON_CONST
  • 13: MATRIX_COEFFICIENTS_CHROM_DERIVED_CONST
  • 14: MATRIX_COEFFICIENTS_BT_2100_0
  • 256: MATRIX_COEFFICIENTS_CUSTOM

[HEVC Layer 0000]

HEVC Layer 0000 settings are covered under the following:

Layer parameters

width

Encoded pictures width. Values range is [64, 8192].

height

Encoded pictures height. Values range is [64, 4352].

level

Level ID. This parameter specifies the level to maintain conformance of the encoding layer according to the ITU-T H.265 recommendation.
  • 30: Level 1
  • 60: Level 2
  • 63: Level 2.1
  • 90: Level 3
  • 93: Level 3.1
  • 120: Level 4
  • 123: Level 4.1
  • 150: Level 5
  • 153: Level 5.1
  • 156: Level 5.2
  • 180: Level 6
  • 183: Level 6.1
  • 186: Level 6.2
  • 1000: Auto mode. The encoder detects the level according to the picture size, bitrate, frame rate, etc.

high_tier

This parameter specifies the tier to maintain conformance of layer.
  • 0: Main tier
  • 1: High tier

wavefront_processing

Enables/disables Wavefront Parallel Processing (WPP).
  • 0: Disable WPP
  • 1: Enable WPP

slice_mode

Specifies the slicing mode, i.e. how a picture is partitioned into slices. The option defines the units of slice_data.
  • 0: The slice_data parameter specifies the number of slices per picture. The number of CTU rows per slice is calculated by dividing the total number of CTU rows in a picture by slice_data (i.e. by number of slices).
  • 1: The slice_data parameter specifies the number of CTU rows per slice. The number of CTU rows per slice is explicitly set in slice_data.

slice_data

Specifies the slice dimension. The slice_mode parameter specifies the units.

num_slices

Number of slices per picture. The encoder does not support dependent slice segments, so each slice is represented by a single independent slice segment. The slice borders are always aligned to an integer number of CTU rows. The number of CTU rows in a slice is calculated by division of the total number of rows in a picture by num_slices. Usage of slices in encoding can improve CPU utilization. Values range is [1, height_of_picture_in_ctus].

CTU settings

min_cu_size_increase

Increases the min_cu_size depending on pic_level.
  • 0: Do not increase
  • 1: Increase on B non-referenced
  • 2: increase on B non-referenced and one tier higher
  • 3: Increase on all B-frames
  • 4: Increase on B and P frames

log2_min_cu_size

Specifies the minimum size of a coding block of luma samples.
  • 3: 8x8
  • 4: 16x16
  • 5: 32x32
  • 6: 64x64

log2_max_cu_size

Specifies the maximum size of a coding block of luma samples.
  • 4: 16x16
  • 5: 32x32
  • 6: 64x64

log2_min_tu_size

Specifies the minimum size of a transform block of luma samples.
  • 2: 4x4
  • 3: 8x8
  • 4: 16x16
  • 5: 32x32

log2_max_tu_size

Specifies the maximum size of a transform block of luma samples.
  • 2: 4x4
  • 3: 8x8
  • 4: 16x16
  • 5: 32x32

max_tu_depth_inter

Specifies the maximum hierarchy depth for transform units of coding units coded in inter prediction mode, i.e. the maximum depth of transform unit quadtree for Inter coded CUs. The value range is [1,1 + log2_max_cu_size - log2_min_cu_size].

max_tu_depth_intra

Specifies the maximum hierarchy depth for transform units of coding units coded in intra prediction mode, i.e. the maximum depth of transform unit quadtree for intra coded CUs. Value range is [1, 1 + log2_max_cu_size - log2_min_cu_size].

intra prediction settings

intra_partitioning

Enables intra partitioning.
  • 0: Disable intra partitioning
  • 1: Enable intra partitioning

chroma_mode_search

Enables chroma intra-mode search.
  • 0: Disable chroma intra-mode search
  • 1: Enable chroma intra-mode search

strong_intra_smoothing

Enables strong intra smoothing
  • 0: Disable intra smoothing
  • 1: Enable intra smoothing

intra_at_nonref_pics

Enables intra-processing at non-referenced pictures.
  • 0: Disable intra-processing
  • 1: Enable intra-processing

Motion search settings

motion_search_range

Specifies the search range in quarter pixel units.

motion_search_precision

Specifies sub-pel motion search accuracy.
Value P-pictures Ref. B-pictures Non-ref. B-pictures
0 Up to 1 pix Up to 1 pix Up to 1 pix
1 Up to 1/2 pix Up to 1 pix Up to 1 pix
2 Up to 1/2 pix Up to 1/2 pix Up to 1 pix
3 Up to 1/4 pix Up to 1/2 pix Up to 1 pix
4 Up to 1/4 pix Up to 1/2 pix Up to 1/2 pix
5 Up to 1/4 pix Up to 1/4 pix Up to 1/2 pix
6 Up to 1/4 pix Up to 1/4 pix Up to 1/4 pix

out_of_pic_mvs

Controls using pixels beyond the picture boundaries for motion compensation.
  • 0: Do not use pixels outside the picture boundaries
  • 1: Enables out-of-picture motion vectors.

max_num_merge_cand

Specifies the maximum number of merge candidates. The value range is [1, 5].

inter_partitioning

Specifies the inter partitioning mode.
  • 0: Inter partioning off (2Nx2N)
  • 1: Symmetric partitioning only (2Nx2N, NxN, Nx2N, 2NxN)
  • 2: Symmetric and asymmetric partitioning (2Nx2N, NxN, Nx2N, 2NxN, nLx2N, nRx2N, 2NxnU, 2NxnD)

temporal_mv_prediction

Enables temporal Motion Vector Prediction (MVP).
  • 0: Disable temporal motion vector prediction
  • 1: Enable temporal motion vector prediction

chroma_evaluation

Enables chroma evaluation for merge and MVP candidates.
  • 0: Disable chroma evaluation
  • 1: Enable chroma evaluation

motion_search_pattern

Specifies the motion search pattern.
  • 0: Large diamond-shaped search pattern
  • 1: Flat horizontal hexagon pattern
  • 2: Horizontal hexagon pattern
  • 3: Small diamond shaped search pattern

bi_pred_mode

Enables bi-direction prediction mode.
  • 0: Disable bi-direction prediction mode
  • 1: Enable bi-direction prediction mode

motion_search_refine_cands

Specifies the number of refine candidates for motion estimation.

Deblock and SAO filter settings

deblocking_filter

Indicates whether to use deblocking for smoothing video frames.
  • 0: Do not use deblocking filter
  • 1: Use deblocking filter

beta_offset

Specifies the offset used in accessing beta deblocking filter table for filtering operations controlled by the macroblocks within a slice. The value must be in the range of -6 to +6, inclusive.

tc_offset

Specifies the offset used in accessing tc deblocking filter table for filtering operations controlled by the macroblocks within a slice. The value must be in the range of -6 to +6, inclusive.

sao_filter_luma

Specifies whether the SAO (Sample Adaptive Offset) filter for luma samples should be used or not.
  • 0: Disable SAO filter for luma
  • 1: Enable SAO filter for luma

sao_filter_chroma

Specifies whether the SAO (Sample Adaptive Offset) filter for chroma samples should be used or not.
  • 0: Disable SAO filter for chroma
  • 1: Enable SAO filter for chroma

adaptive_deblocking

Enables the usage of deblocking filter with alternative offsets related to the quantizer or with standard ones. With alternative offsets, encoder applies less deblocking for lower quantizers in order to keep more details in the encoded video).

sao_on_ref_b_pics

Specifies whether the SAO filter should be used on referenced B-pictures or not.
  • 0: Disable SAO filter on referenced B-pictures
  • 1: Enable SAO filter on referenced B-pictures

Rate control settings

bit_rate_mode

Rate control mode.
Value HRD on HRD off
0 Constant bitrate (CBR) Variable bitrate (VBR)
1 N/A Constant quantization (CQT)
2 Variable bitrate (VBR) Average bitrate
3 Average quantization (AQP) Average quantization (AQP)
4 Constant rate factor (CRF) Constant rate factor (CRF)

hrd_conformance

HRD conformance. Maintain NAL-based hypothetical reference decoder model.
  • 0: Do not provide HRD conformance
  • 1: Provide strict HRD conformance, reencode on underflows until hevc_v_layer::max_qp is reached
  • 2: Try to provide HRD conformance, reencode on underflows until hevc_v_layer::max_qp or hevc_v_settings::max_num_reencodings is reached

bit_rate

Target bitrate for rate control in bits per second.

hss_rate

Maximum bitrate of layer for HEVC_VBR and HEVC_CBR modes in bits per second. For constant bitrate this value must match bit_rate.

cpb_size

Coded picture buffer (CPB) size in bits of layer.

Transform settings

sign_data_hiding

Reduces entropy bits usage by keeping the sign of the coefficients similar. It usually improves quality, but slightly slows down the encoder.
  • 0: Disable sign hide quantization
  • 1: Enable sign hide quantization (default)

transform_skip

Enables transform skip.
  • 0: Disable transform skip
  • 1: Enable transform skip

cb_qp_offset

Specifies the chroma Cb QP offset. The value range is [-12, 12].

cr_qp_offset

Specifies the chroma Cr qp offset. The value range is [-12, 12].

rdo_quantization

Specifies the rate-distortion optimized quantization type.
  • 0: Normal quantization
  • 1: RDO quantization

qp_delta_depth

Specifies the QP delta depth. The value range is [0, log2_max_cu_size - log2_min_cu_size].

RDO settings

intra_skip_dist

Enables a fast intra decision.
  • 0: Disable fast intra decision
  • 1: Enable fast intra decision

fast_cu_split_decision

Specifies a fast CU split decision. The value range is [0, 4]. A larger value corresponds to a faster encoding speed at the expense of quality.

st_me_skip_decision

Specifies a fast ME skip decision. The value range is [0, 3]. A larger value corresponds to a faster encoding speed at the expense of quality.

fast_inter_nnz_decision

Specifies a fast number of nonzero (NNZ) inter decision. The value range is [0, 2]. A larger value corresponds to a faster encoding speed at the expense of quality.

pu_pred_pattern_mode

Specifies a fast CU split decision for inter frames. The value range is [0, 3]. A larger value corresponds to a faster encoding speed at the expense of quality.

fast_type_decision

Specifies a fast type decision. The value range is [0, 2]. A higher value corresponds to a faster encoding speed at the expense of quality.

ssd_for_intra_cu

Enables SSD instead of HAD for intra decision.
  • 0: Disable SSD
  • 1: Enable SSD

unref_pic_weak_rdo

Specifies a weak RDO for unreferenced pictures. This parameter controls RDO strength of unreferenced B pictures. By default, the encoder redistributes some bits from unreferenced pictures to referenced ones. To distribute bits more smoothly and prevent quality pulsation, turn this feature on.
  • 0: Disable weak RDO
  • 1: Enable weak RDO

fast_bit_counting

Enable fast bits approximation, i.e. a rough estimation of bits for high bitrates.
  • 0: Disable fast bits approximation
  • 1: Enable fast bits approximation

fast_intra_mode

Enables fast intra mode selection, i.e. it reduces list of intra modes candidates to the few most probable ones.
  • 0: Disable fast intra mode
  • 1: Enable fast intra mode

intra_pattern_mode

Enables fast CU split decision for intra frames, i.e. fast split decision for I-pictures.
  • 0: Disable fast CU split decision
  • 1: Enable fast CU split decision

precise_inter_mode_decision

Specifies a more accurate decision for inter partition/prediction mode. This parameter enables additional RDO decisions for P/B-pictures. A larger value corresponds to better quality at the expense of encoding speed. The value range is [0, 3].

precise_intra_mode_decision

Specifies a more accurate decision for intra PU. A larger value corresponds to better quality at the expense of encoding speed. The value range is [0, 3].

VUI settings

sar_idc

Specifies the sample aspect ratio. For more information, see the ITU-T H.265 recommendation.
Value Meaning
0 Unspecified
1 1:1
2 12:11
3 10:11
4 16:11
5 40:33
6 24:11
7 20:11
8 32:11
9 80:33
10 18:11
11 15:11
12 64:33
13 160:99
14 4:3
15 3:2
16 2:1
255 Extended
300 Auto

sar_width

Specifies the horizontal size of the sample aspect ratio. Use this option only with sar_idc = 255 or 300. The value is used as a factor for width. The real aspect ratio is then given by: (sar_width * width) / (sar_height * height). The value range is [1, 4096].

sar_height

Specifies the vertical size of the sample aspect ratio. Use this option only with sar_idc = 255 or 300. The value is used as factor for height. The real aspect ratio is then given by: (sar_width * width) / (sar_height * height). The value range is [1, 4096].

frame_field_info_present

Output pic_timing SEI message with pic_struct data.
  • 0: Do not output pic_timing SEI message
  • 1: Output pic_timing SEI message
  • 1: Output pic_timing SEI message

chroma_location_present

Output chroma location info for 4:2:0
  • 0: Do not output chroma location
  • 1: Output chroma location

chroma_location_top_field

Sets chroma location for the top field.
  • 0: Do not set chroma location for the top field
  • 1: Set chroma location for the top field

chroma_location_bottom_field

Sets chroma location for the bottom field.
  • 0: Do not set chroma location for the bottom field
  • 1: Set chroma location for the bottom field

File/stream settings

stream_type

Defines the sort of NALU types being written into the stream.
  • 0: Stream Type I. NALUs + filler data
  • 1: Stream Type I SEI. NALUs + filler data + SEI messages
  • 2: Stream Type II. All NALU type
  • 3: Stream Type II, except SEI messages

au_delimiters

Write access unit delimiters. Access unit delimiters may be used to indicate the type of slices present in a primary coded picture and to simplify the detection of the boundary between access units (e.g. frames).

seq_end_code

Write sequence end code. End of sequence code may be used to specify that the next subsequent access unit in the bitstream in decoding order must be an IDR access unit, starting with a new sequence parameter set.
  • 0: Do not write sequence end code
  • 1: Write sequence end code at the end of a stream

single_sei_per_nalu

Encapsulates each SEI message into its own NAL unit.

timing_info

Enables the VUI timing info flag.