Opened 2 years ago

#6476 new defect

NVENC: "InitializeEncoder failed" error occurs when level 5.2 is specified

Reported by: alexpigment Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: nvenc, h264, level, 5.2
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

When using h264_nvenc, if -level 5.2 is specified in the command line parameters, the following error is given:

[h264_nvenc @ 0546f2c0] InitializeEncoder failed: invalid param (8)
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

While NVENC via FFMPEG will similarly fail if trying to specify a level that is not valid for the current set of parameters, this case is different because it will fail even when the parameters are valid. Leaving off -level 5.2 in this scenario will produce a file that is Level 5.2.

How to reproduce:

% ffmpeg -f lavfi -i smptebars -c:v h264_nvenc -s 3840x2160 -aspect 16:9 -profile:v high -r 59.94 -level 5.2 -t 5 output.mp4

Confirm that the above code fails. Now do the same encode without specifying -level 5.2:

% ffmpeg -f lavfi -i smptebars -c:v h264_nvenc -s 3840x2160 -aspect 16:9 -profile:v high -r 59.94 -t 5 output.mp4

Notice that this works, and produces a video that is Level 5.2 according to MediaInfo?.

ffmpeg version N-86330-gbd1179e
built on 2017-06-01

Change History (0)

Note: See TracTickets for help on using tickets.