Configuration File Syntax

When you run nvm_iep_sci you must provide a configuration file. A default configuration is available at:

<top>/drive-linux/samples/nvmedia/img_enc/enc_h264_sample.cfg

The configuration file contains parameters with values, groups or sections of parameters, and optional comments.

Parameters

Each parameter must be on a separate line. A parameter line contains the following tokens:

  • The parameter name
  • An equal sign (“=”)
  • A value
  • An optional comment

Here is an example of a parameter with a comment:

InputFile = "configs/input.yuv" # File to encode

An unknown parameter in a configuration file does not cause a failure; the parameter is ignored. An ill-formed parameter line causes the application to fail.

Comments

A comment consists of a pound sign (a ‘#’) and any following text to the end of the line. A comment may appear at the end of any parameter line, or on a line by itself.

Sections

A section is a named group of parameters, containing a specific set of parameters. For example, the group RC_Params contains rate control parameters.

Note:

Available section types include:

  • EncodePic_Params: per-frame parameters
  • EncodePicH264_Params: specific H.264 per-frame parameters
  • Payload: different arrays of SEI payloads can be used for every picture in H.264 encoding
  • EncodePicH265_Params: consists of specific H.265 per frame parameters
  • EncodePicAV1_Params: specific AV1 per frame parameters
  • PayloadH265: different arrays of SEI payloads can be used for every picture in H.265 encoding
  • RC_Params: rate control parameters
  • QP_Params: quantization parameters

Each section begins with a line in the form:

[<section name>]

The rest of the section consists of parameter values to be defined in the group. A specific set of parameters may be defined in each group, as shown in Configuration File Parameters.

For example, these lines define a QP_Params group:

[QP_Params]
QPBSlice             = 30    # Quant. parameter for B slices (0-51)  - qpInterB
QPISlice             = 28    # Quant. parameter for I Slices (0-51)  - qpIntra
QPPSlice             = 28    # Quant. parameter for P Slices (0-51)  - qpInterP