Most properties can be specified on command line like this:
omxh265enc target-bitrate=6000
Other properties must be specified as GStreamer caps:
! video/x-h265, profile=high,
level=\(string\)5.1
The following all properties for the encoder (omxh264enc and omxh265enc) are shown.
| Property | Description |
|---|---|
| Rate Control | |
| control-rate |
Rate Control Mode: available bit rate control modes, Constant Bit Rate (CBR) and Variable Bit Rate (VBR) Encoding. Default: constant
Note: Variable-skip-frames
and constant-skip-frames are not supported, despite the
GStreamer default plugin defining them.
|
| use-out-port-pool | If enabled, use DMA based buffer pool as the encoder’s output pool. Default: false. |
| target-bitrate | Target bitrate in Kbps. |
| max-bitrate |
Maximum bitrate In Kbps, which is used in VBR rate control mode (see control-rate above). This should be set to the maximum transmission bitrate available. On a moving window of CPB size (see cpb-size below), this value should not be exceeded on average. Note for CBR target-bitrate is used for this purpose. |
| cpb-size | Coded Picture Buffer (CPB) size in milliseconds. Not used when control-rate=disable. cpb-size cannot be smaller than initial-delay. Default: 3000. |
| initial-delay |
Initial removal delay in milliseconds, not used when rate-control = disable. If this value is set too low (less than 1 frame period), visual quality might be reduced. Must be less than or equal to cpb-size. Default: 1500 |
| filler-data | Add filler data when control-rate=constant (CBR). Default: true |
| entropy-mode |
Specifies for AVC, the entropy mode as: 1 = CAVLC 2 = CABAC (default) |
| max-quality-target |
When control-rate=capped-variable the quality is capped at a certain high limit, thus keeping the bitrate variable. Default: 14. Range 0-20 (20 = lossless quality). If the encoder cannot reach this quality level due to the video complexity and/or a restricted bitrate, or if the quality target is too high, then the Capped-VBR has no effect compared to VBR. |
| max-picture-size |
For control-rate=cbr or vbr, the encoded frame size is monitored by hardware rate control that adjusts QP values such that the picture size is limited to max-picture-size in Kb. max-picture-size = target-bitrate/framerate * “allowed peak margin” For example, for 100 Mb/s at 60 fps and 10% margin. max-picture-size = 100000/60 * 1.10 = 1834 Kb/frame |
| max-picture-sizes | The maximum picture size in Kb for each of the frame types as array of integers. Format: max-picture-sizes=’<I, P, B>’. When set to 0 it is disabled. |
| xavc-max-picture-sizes-in-bits | The maximum picture size for each of the frame types in bits for XAVCMaximum. Format: xavc-max-picture-sizes-in-bits='<I,P,B>. When set to 0 it is disabled. |
| skip-frame | With skip-frame=true, when a picture exceeds the CPB buffer size, that picture is discarded and replaced by a picture with skip MBs (or CTBs). Only used when control-rate = constant or variable and b-frames < 2. Default: false. |
| max-consecutive-skip | The maximum number of skips in a row is defined by max-consecutive-skip. Default: 4294967295. |
| Profile/level/tier | |
|
profile through caps: video/x-h264 video/x-h265 |
HEVC: main, main-10, main-still-picture, monochrome, monochrome-10, main-422, main-422-10, main-intra, main-10-intra, main-422-intra, main-422-10-intra, monochrome-12, main-12, main-422-12, main-444, main-444-10, main-444-12 AVC: baseline, constrained-baseline, constrained-baseline, main, high, high-10, high-4:2:2, progressive-high, constrained-high, high-10-intra, high-4:2:2-intra, xavc-high-10-intra-cbg, xavc-high-10-intra-vbr, xavc-high-4:2:2-intra-cbg, xavc-high-4:2:2-intra-vbr, xavc-long-gop-main-mp4, xavc-long-gop-high-mp4, xavc-long-gop-high-mxf, xavc-long-gop-high-4:2:2-mxf, high-4:4:4 |
|
level through caps: video/x-h264 video/x-h265 |
HEVC/AVC level, up to 5.2. Note a string is used, not a float: level=\(string\)5.2 level=\(string\ )5.1 |
|
tier through caps: video/x-h265 |
HEVC tiers: main, high tier=main |
| Quantization Parameters | |
| qp-mode |
QP control mode 0 = uniform - use one QP for all coding units of a frame. 1 = roi - Region of Interest has adjusted QPs. ROI metadata must be supplied. 2 = auto (default) - Adjust QP for each coding unit according to its content. 3 = load-qp-absolute - Uses absolute QP values set by user. Must be set to use External QP buffer 4 = load-qp-relative - Uses Relative/Delta QP values set by user. Must be set to use External QP buffer |
|
quant-i-frames quant-p-frames quant-b-frames |
Quantization parameter for I-frames, when control-rate=disable (CONST_QP). For other rate control modes, it is the initial QP. Default = 30. Range 0-51. The settings for min-qp and max-qp further restrict this range. |
|
min-qp max-qp |
Minimum/maximum QP value allowed in the encoding session. Default=10/51. Range 0-51. |
| scaling-list |
Specifies which scaling matrix is used. The default tends to give better subjective quality, while the flat option gives better objective quality (for better PSNR for example) 0 = flat 1 = default |
| default-roi-quality |
The default quality level to apply to each Region of Interest. 0 = high (default) delta QP of -5 1 = medium delta QP of 0 2 = low delta QP of +5 3 = don't care Maximum delta QP value 4 = Region all LCU encoded with intra prediction mode |
| Group of Pictures | |
| gop-mode |
Group of pictures mode. 0 = basic (default) IBBPBBP… or IPPPPP… 1 = basic-b like basic, using B-frame references instead of P-frames. 2 = pyramidal B frames are used as reference by more B frames: IbbBbbP.. 3 = pyramidal-b like pyramidal, using B-frame references instead of P-frames. 4 = adaptive uses an adaptive number of consecutive B-frames. 5 = low-delay-p I picture followed by P-frames only, referencing only previous frame. 6 = low-delay-b I picture followed by B-frames only, referencing only previous frame. |
| gop-length | Distance between two consecutive I-frames. Default: 30. Range 0-1000. (0,1 is intra-only) |
| b-frames |
Number of B-frames between two consecutive P-frames. For basic and pyramidal modes. 0-4 for basic GOP mode. 3,5, or 7 for pyramidal GOP mode. Default: 0. |
|
long-term-ref long-term-freq |
Specify that a long-term reference can be dynamically inserted. Default: false Specify the periodicity in frames; the distance between two consecutive long-term reference pictures. Default: 0. |
| gdr-mode |
Gradual Decoder Refresh scheme used when gop-mode = low-delay-p 0 = disable (default) 1 = vertical a vertical bar moving from left to right. 2 = horizontal a horizontal bar moving from top to bottom. |
| periodicity-idr |
The number of frames between consecutive Instantaneous Decoder Refresh (IDR) pictures. This might be rounded to a multiple of the GOP length. -1 disables IDR insertion. 0 (default) first frame is IDR |
| Low Latency | |
|
alignment through caps: video/x-h264 video/x-h265 |
=au normal mode; access unit alignment (default) =nal low-latency-mode; nal unit alignment (low-latency mode) |
| num-slices |
The number of slices used for each frame. Each slice contains one or more full LCU row or rows and are spread over the frame as regularly as possible. Default: 1. Range [1,256] for AVC or [1,128] for HEVC. Actual maximum range depends on other factors like level conformance and overhead. |
| dependent-slice | For HEVC, specifies whether additional slices/slice segments are dependent on previous ones or not. If it cannot be decoded without decoding the previous slice segment first, it is said to be dependent. Default: false. |
| Deblocking | |
| loop-filter-mode |
Enable or disable the deblocking filter. 0 = enable (default) 1 = disable For AVC: 2 = disable-slice-boundary (excludes slice boundaries from filtering) For HEVC: 2 = disable-cross-slice - Disable deblocking filter on slice boundary 3 = disable-cross-tile - Disable deblocking filter on tile boundary 4 = disable-slice-and-tile - Disable deblocking filter on slice and tile boundary |
| loop-filter-beta-offset |
The beta offset for the deblocking filter is used only when loop-filter-mode = enable. Default: -1. Range: -6 to 6. |
| loop-filter-alpha-c0-offset | For AVC, Alpha C0 offset for the deblocking
filter, used only when loop-filter-mode is enabled. Default: -1. Range: -6 to 6. |
| loop-filter-tc-offset |
For HEVC, TC offset for the deblocking filter, used only when loop-filter-mode is enabled. Integer. Range: -6 - 6 Default: -1 |
| Other | |
| low-bandwidth | Decreases the vertical search range used for P-frame motion estimation, to reduce bandwidth. Default: false |
| aspect-ratio |
Selects the display aspect ratio of the video sequence to be written in SPS/VUI. 0 = auto (default) 4:3 for SD video, 16:9 for HD video, none if format is unknown 1 = 1-1, 1:1 aspect ratio 2 = 4-3, 4:3 aspect ratio 3 = 16-9, 16:9 aspect ratio 4 = none, Aspect ratio information is not present in the stream |
| input-crop |
Sets <x, y, width, height> values for cropping the input YUV. Width and height must be a multiple of 8. Range: x: [96, 4000] for AVC, [128, 3968] for HEVC. (must be multiple of 2) y: [ 0, 8112] for AVC, [ 0, 8936] for HEVC. (must be multiple of 2) |
| output-crop | Cropping parameters for output bitstream as <x, y, width, height> |
| constrained-intra-prediction | If enabled, prediction only uses residual data and decoded samples from neighboring coding blocks that are coded using intra prediction modes. Default: false. |
| scenechg-res | Enables a more conservative rate control to improve quality on scene changes. Overall quality can decrease. |
| sc-nbytes | The number of start code bytes: 0: auto (default), 3: 0x000001, 4: 0x00000001 |
| video-full-range | Using the full range YUV instead of the reduced range (CCIR601) legacy range. Default: false. |
| enable-aud | When enabled Access Unit Delimiters are added to the stream. Default: false. |
| hlg-sdr-compatible | If enabled and input caps contain HLG colorimetry, insert BT2020 EOTF and ATC SEI instead |
| src-sync | Use synchronised source for encoder. Default: false |
| uniform-slice-type | Enable/Disable uniform slice type in slice header |
| interval-intraframes | Interval of coding Intra frames |
|
sei-bp sei-pt sei-rp |
When enabled SEI for BP,PT or RP is added to the stream. Default: false |