API Parameters
WZ265EncConfig
Re-Open Encoder: if updated, these parameters will cause encoder to reopen itself internally. You can call wz265_encoder_reconfig to reconfigure the parameters during encoding.
- No : not safe or no effect
- Yes : safe to update
The following table lists some important parameters,
| Parameter | Data Type {Value Range} | Definition | Can be modified by wz265_encoder_reconfig | Reopen encoder |
|---|---|---|---|---|
| picWidth | int | Width | Yes | Yes |
| picHeight | int | Height | Yes | Yes |
| frameRate | double | Frame rate | Yes | No |
| inputCsp | int, {1~6} | Input image format | No | |
| inputBitDepth | int, 8 | Library supports 8bit and 10bit | No | |
| preset | int | Encoding speed presets | Yes | Yes |
| tune | int | Optimization parameters for specific content scenarios; default not set, can be combined using initialization settings with a comma (,) and reconfig value or operation combination | Yes | Yes |
| profileId | int, {1~2} | Encoding standard levels: 1: MAIN (default), 2: MAIN_10 | Yes | Yes |
| threads | int | Number of encoding threads | Yes | Yes |
| rc | int, {-1~3} | Rate control modes | No | |
| bitrateInkbps | int | Bitrate, in kbps | Yes | No |
| vbv_max_rate | int | Maximum average bitrate limit, in kbps | Yes | No |
| vbv_buffer_size | int | Rate control buffer size, in kbis | Yes | No |
| keyint_max | int | Maximum key frame interval | No | |
| keyint_min | int | Minimum key frame interval | No | |
| crf | double, {0~51} | Constant quality rate control mode quality parameter, default 30 | Yes | No |
| quality | double, {0~5} | Video encoding quality levels, can take decimals, commonly used quality range 2.0-3.5 | Yes | No |
| qp | int, {0~51} | Constant quantization parameter control mode quantization parameter, default 30 | Yes | No |
| qpmin | int, {0~51} | Minimum quantization parameter for frame-level, default 0 | No | |
| qpmax | int, {1~51} | Maximum quantization parameter for frame-level, default 51 | No | |
| lookahead | int, {0~129} | Number of frames for lookahead analysis, affects latency frame count | No | |
| bframes | int, {0~31} | Number of B-frames between adjacent non-B-frames, default 15 | Yes | Yes |
| enWavefront | int | Whether to enable WPP (Wavefront Parallel Processing) | No | |
| enFrameParallel | int | Whether to enable frame-level parallel processing | No | |
| refnum | int, {1~8} | Number of reference frames for B frame | No | |
| pRefNum | int, {ref~8} | Number of reference frames for P frame | No | |
| opengop | int | Whether to enable open GOP | No | |
| vui_parameters_present_flag | 1, 0 | Equals 1 indicates that VUI (Video Usability Information) is present; if 0, no VUI information | Yes, needs to force a keyframe | No |
| vui.video_signal_type_present_flag | 1, 0 | Equals 1 indicates that video_format/video_full_range_flag/colour_description_present_flag information is present | Yes, needs to force a keyframe | No |
| vui.video_format | {"component", "pal", "ntsc", "secam", "mac", "unknown", 0} | Video format | Yes, needs to force a keyframe | No |
| vui.video_full_range_flag | {"limited", "full", 0} | Indicates the value range of video image pixels, default is 0 (range [16, 235]); setting to 1 means the color range is [0, 255] (i.e., YUV420 or YUVJ420) | Yes, needs to force a keyframe | No |
| vui.colour_description_present_flag | 1, 0 | Equals 1 indicates that color_primaries/color_trc/colorspace information is present | Yes, needs to force a keyframe | No |
| vui.colour_primaries | {"reserved", "bt709", "unknown", "reserved", "bt470m", "bt470bg", "smpte170m", "smpte240m", "film", "bt2020", "smpte428", "smpte431", "smpte432", 0} | RGB conversion color space mapping settings | Yes, needs to force a keyframe | No |
| vui.transfer_characteristics | {"reserved", "bt709", "unknown", "reserved", "bt470m", "bt470bg", "smpte170m", "smpte240m", "linear", "log100", "log316", "iec61966-2-4", "bt1361e", "iec61966-2-1", "bt2020-10", "bt2020-12", "smpte2084", "smpte428", "arib-std-b67", 0} | RGB linear conversion method settings | Yes, needs to force a keyframe | No |
| vui.matrix_coeffs | {"gbr", "bt709", "unknown", "", "fcc", "bt470bg", "smpte170m", "smpte240m", "ycgco", "bt2020nc", "bt2020c", "smpte2085", "chroma-derived-nc", "chroma-derived-c", "ictcp", 0} | RGB transformation brightness and chrominance matrix coefficient settings | Yes, needs to force a keyframe | No |
Notes:
- When
bDynamicPresetSettingsis initialized to 1 andwz265_encoder_reconfigis called to reset the preset, there is no need to reopen the encoder internally.
wz265-params
The following table lists the encoding tools that can be configured on Aurora5 through wz265-params,
| wz265-params | DataType,{Value} | Description |
|---|---|---|
| hbk | int, {0,1} | Set headers before key frames. 0: disable, 1: enable (default) |
| force-cfr | int, {0,1} | Force constant framerate, 0: vfr, 1: cfr (default) |
| rc | int, {0~3} | Rate Control Mode, 0:cqp; 1:crf (default); 2:abr; 3:cbr |
| crf | float, {0~51} | Quality parameter for constant quality coding mode. Default is 30 |
| bitrate | int, >0 | Set target bitrate in kbps |
| qp | int, {0~51} | Quantization parameter (QP) for constant quantization parameter coding mode |
| vbv-maxrate | int | VBV max rate in kbps |
| vbv-bufsize | int | VBV buffer size in kbits |
| vbv-init | float, {0~1.0} | Initial VBV buffer occupancy (fraction of bufsize). Default is 0.9 |
| vbv-end | float, {0~1.0} | Set the remaining buffer size (fraction of bufsize) at the end of encoding. Default is 0 |
| vbv-debt | int, {0~256} | Allowed VBV underflow level. Default is 32 |
| vbv-level | int, {0~2} | Support different rate control levels, 0: frame-level, 1: ctu-row-level, 2: ctu-level. The larger the value is, the more precise the bit rate per-second will be |
| strict-cbr | int, {0,1} | Enable stricter conditions and tolerance for bitrate deviations in cbr mode. Default is 0 |
| pass | int, {1,2} | Multi pass rate control, 1: First pass - creates stats file, 2: Second pass |
| statin | string | Filename for stats file in second pass |
| statout | string | Filename for stats file in first pass |
| intra-refresh | int, {0,1} | Enable intra refresh. Default is 0 |
| hrd | int, {0,1} | Enable HRD. Default is 0 |
| aud | int, {0,1} | Enable AUD. Default is 0 |
| atc | int, {0~18} | Set alternativeTransferCharacteristics |
| dovi | int, {0, 50, 81, 82, 84} | Support Dolby Vision profile: 50 81 82 84. Default is 0 |
| dovi-rpu | string | Filename for Dolby Vision rpu file |
| ave | string | Should be set like Value1,Value2,Value3 |
| sar | string | Should be set like Value1,Value2 |
| video-format | string | Support: "component", "pal", "ntsc", "secam", "mac", "unknown" |
| range | string | Support: "limited", "full" |
| transfer | string | Support: "reserved", "bt709", "unknown", "reserved", "bt470m", "bt470bg", "smpte170m", "smpte240m", "linear", "log100", "log316", "iec61966-2-4", "bt1361e", "iec61966-2-1", "bt2020-10", "bt2020-12", "smpte2084", "smpte428", "arib-std-b67" |
| color-prim | string | Support: "reserved", "bt709", "unknown", "reserved", "bt470m", "bt470bg", "smpte170m", "smpte240m", "film", "bt2020", "smpte428", "smpte431", "smpte432" |
| color-matrix | string | Support: "gbr", "bt709", "unknown", "fcc", "bt470bg", "smpte170m", "smpte240m", "ycgco", "bt2020nc", "bt2020c", "smpte2085", "chroma-derived-nc", "chroma-derived-c", "ictcp" |
| master-display | string | Should be set like G(Value1,Value2)B(Value3,Value4)R(Value5,Value6)WP(Value7,Value8)L(Value9,Value10) |
| max-cll | string | Should be set like Value1,Value2 |
| keyint | int | Maximum key frame interval |
| keyint-min | int | Minimum key frame interval |
| ipratio | float, {0.1~10} | Quantization parameter (QP) factor between I and P |
| pbratio | float, {0.1~10} | Quantization parameter (QP) factor between P and B |
| qpmin-i | int, {0~51} | Frame-level minimum quantization parameter (QP) for key frame |
| qpmin | int, {0~51} | Frame-level minimum quantization parameter (QP) |
| qpmax-i | int, {0~51} | Frame-level maximum quantization parameter (QP) for key frame |
| qpmax | int, {0~51} | Frame-level maximum quantization parameter (QP) |
| scenecut | int, {0~100} | Sensitivity for scenecut detection to insert I-frames. Default is 30. To disable scenecut detection, set it to 0. |
| lookahead / rc-lookahead | int, {0~129} | Number of pre-analyzed frames. This parameter will affect the number of delayed frames |
| bframes | int, {0~31} | Number of B frames between two adjacent non-B frames. Default is 15 |
| wpp | int, {0,1} | Whether to enable wave-front parallelism |
| fpp | int, {0,1} | Whether to enable frame-level parallelism |
| me | int, {0,1,2} | Complexity of the full-pixel motion search algorithm. The larger the value, the more complex |
| subme | int, {0,1,2} | Complexity of the sub-pixel motion search algorithm. The larger the value, the more complex |
| ref | int, {1~8} | Number of reference frames per reference list for B-frames |
| pref | int, {1~8} | Number of reference frames for P-frames |
| open-gop | int, {0,1} | Whether to enable open GOP. Default is 0 |
| psnr | int, {0,1,2} | Calculate PSNR metrics, 0: not enabled (default); 1: print sequence level PSNR values; 2: print frame level PSNR values. Default is 0 |
| ssim | int, {0,1,2} | Calculate SSIM metrics, 0: not enabled (default); 1: print sequence level SSIM values; 2: print frame level SSIM values. Default is 0 |
| time | int, {0,1,2} | Calculate consumed time in milliseconds, 0: not enabled (default); 1: print sequence level values; 2: print frame level values. Default is 0 |
| level | float | Set specific level (as defined by Annex A). Support levels 1/2/2.1/3/3.1/4/4.1/5/5.1/5.2/6/6.1/6.2 |
| profile | int, {0~3} | Set specific profile, 0: NONE, 1: MAIN, 2: MAIN10, 3: MAIN_STILLPICTURE |
| tier | string | Support: "Main", "High" |
| tile-row | int, | Number of uniform tile rows, 0: auto |
| tile-col | int, | Number of uniform tile columns, 0: auto |
| tile-swappable | int, {0,1,2} | 0: disable, 1: swap only the same position, 2: swap arbitrary position |
| tiles-split-height | string | Non-uniform tile height split, should be set like value1,value2,value3,... |
| tiles-split-width | string | Non-uniform tile width split, should be set like value1,value2,value3,... |
| threads | int, {0~128} | Number of threads. Default is 0 |
| pre-threads | int, {0~threads} | Number of threads for pre-analysis. Default is 0 |
| single-pps | int, {0,1} | Force single pps, 0: disable, 1: enable |
| rps-prediction | int, {0~3} | Set rps prediction on SPS and slice header, 0: disable both; 1: sps off, slice on; 2: sps on, slice off; 3: enable both |
| dpb | int, {1~16} | Set decoded picture buffer |
| visual-opt | int, {0~3} | Set visual optimize option, 0: not enabled; 1-3 use various algorithms. Default is 1 |
| detail-opt | int, {0~1} | Set detail-preserving optimization option. |
| detect-opt | int, {0~1} | Set ROI detection option, 0: not enabled; 1: enabled. Default is 0 |
| roi-deltaqp | float, {0~10} | Set the option of the QP adjustment intensity for ROI. Increasing the value enhances quality preservation in ROI |
| dump-src | string | Filename for dumping input info |
| dump-bs | string | Filename for dumping output info |
| log | int, {-1~3} | Output log level, -1: debug; 0: info; 1: warn; 2: err; 3: fatal |
| use-mv-hevc | int, {0~1} | Use the multiview extension of HEVC (MV-HEVC), 0: Disabled, default is zero |
| use-ivp | int, {0~1} | Switches on/off inter-view prediction when using MV-HEVC, default is 1 |
| interlace | int, {0~1} | Support separated fields/interlaced inputs. 0: Disable, 1: TFF, 2: BFF. Default is 0 |
| numa-mask | string | Specify NUMA nodes in binary format, where each bit represents one NUMA node |
| lps-mask | string | Bind threads to logical processors specified by a mask, each bit represents a logical processor. Ignored when numa_mask is used, and default is 0 |
Notes:
-
Please note that if a default value is not specified for certain parameters, the value will be determined automatically.
-
As the encoder continues to develop, certain parameters may change! If you have any questions, please feel free to contact us.