Decoding
The list of FFmpeg NETINT command options for decoding can be displayed with this command:
ffmpeg -help decoder=<ni_dec_name>
<ni_dec_name> options are:
h264_ni_quadra_dech265_ni_quadra_decvp9_ni_quadra_decjpeg_ni_quadra_dec
The above names are for NETINTs AVC, HEVC, VP9 and JPEG decoding respectively.
ffmpeg -hide_banner -help decoder=h264_ni_quadra_dec
Example:
Decoder h264_ni_quadra_dec [H.264 NetInt Quadra decoder v---6ADEV]:
General capabilities: delay avoidprobe hardware
Threading capabilities: none
Supported hardware devices: ni_quadra
Supported pixel formats: yuv420p nv12 yuv420p10le p010le ni_quadra
h264_ni_quadra_dec AVOptions:
-xcoder <string> .D.V... Select which XCoder card to use. (default “bestmodelload")
bestmodelload .D.V...... Pick the least model load XCoder/decoder available.
bestload .D.V...... Pick the least real load XCoder/decoder available.
-dec <int> .D.V...... [DEPRECATED] Use ni_dec_idx instead. Select which decoder to use by index.First is 0, second is 1, and so on. (from -1 to INT_MAX) (default -1)
-ni_dec_idx <int> .D.V...... Select which decoder to use by index.First is 0, second is 1, and so on. (from -1 to INT_MAX) (default -1)
-ni_dec_name <string> .D.V...... Select which decoder to use by NVMe block device name, e.g. /dev/nvme0n1.
-decname <string> .D.V...... [DEPRECATED] Use ni_dec_name instead. Select which decoder to use by NVMe block device name, e.g. /dev/nvme0n1.
-user_data_sei_passthru <boolean> .D.V...... Enable user data unregistered SEI passthrough. (default false)
-custom_sei_passthru <int> .D.V...... Specify a custom SEI type to passthrough. (from -1 to 254) (default -1)
-xcoder-params <string> .D.V...... Set the XCoder configuration using a :-separated list of key=value parameters.
-keep_alive_timeout <int> .D.V...... Specify a custom session keep alive timeout in seconds. (from 1 to 100) (default 3)
-timecode_passthru <boolean> .D.V....... Enable passthrough of time code in picture timing / time code SEI if present. (default false)
-low_delay <int> .D.V...... Enable low delay decoding mode for 1 in, 1 out decoding sequence. set 1 to enable low delay mode. Should be used only for streams that are in sequence. (from 0 to 1) (default 0)
Arguments:
| Argument | Description |
|---|---|
| xcoder | specifies type of load used to determine the XCoder card to use, model load or real load Default:bestmodelload instructs the system to use the decoder with the least model load |
| dec | specific decoder index to assign to the decoding instance. Default: -1 instructs the system to use the least loaded decoder |
| decname | NVMe block device name e.g. /dev/nvme0n1 to assign to the decoding instance. When specified this takes precedence over dec. It has no default value and validity check is present. |
| user_data_sei_passthru | enables user data unregistered SEI passthrough. See the SEI passthrough Application Note for more details. |
| custom_sei_passthru | specifies a custom SEI payload to passthrough. See the SEI passthrough Application Note for more details. |
| xcoder-params | specifies the decoding configuration, using a separated list of key=value parameters. See Section 9 Decoder for more details. |
| keep_alive_timeout | specifies a session keep-alive timeout. This is a periodic request/response between libxcoder and the XCoder firmware, when this times out, the decoding instance on the decoder will be terminated by the XCoder firmware. Valid range is from 1-100, inclusive. This option is overwritten if a keepAliveTimeout option is specified in the xcoder-params. |
| timecode_passthru | specifies whether the timecode present in picture timing SEI (for H.264) or time code SEI (for H.265) should be extracted and passed through to the encoder side. Note the following limitations for this feature: - Any value specified for custom_sei_passthru decoder option is ignored when timecode_passthru is enabled. These two options should not be used together - When decoding H.264, only the SPS with sps_id 0 is checked for the purpose of timecode extraction. The input stream must have sps_id 0 for the SPS associated with the stream containing timecode, otherwise no timecode will be extracted - Only the first timecode will be extracted if there are multiple timecodes present in one picture timing / time code SEI |
| low_delay | enables low delay decoding mode for 1 in, 1 out, decoding sequence. This should only be used for streams that are encoded in sequence. If out-of-sequence stream is paired with low delay, longer input buffering may occur and output display order will also be out-of-sequence. |
Example
Decoding command example with decoder index specified as 0:
ffmpeg -y -hide_banner -nostdin -vsync 0 -c:v h264_ni_quadra_dec -dec 0 -i ../libxcoder/test/akiyo_352x288p25.264 -c:v rawvideo output_5.yuv