NVENC H.264 encoder initialization failed

hardware :GTX650TI
Drivers :337.12
code :nvenc_3.0_linux_sdk
SDK :nvenc_3.0_linux_sdk/Samples/nvEncodeApp:
toolkit :6.0

sh ./1080p_heavyhand_3sec.sh

error:

GetNumberEncoders() has detected 1 CUDA capable GPU device(s) <<
[ GPU #0 - < GeForce GTX 650 Ti > has Compute SM 3.0, NVENC Available ]

InitCUDA() has detected 1 CUDA capable GPU device(s)<<
[ GPU #0 - < GeForce GTX 650 Ti > has Compute SM 3.0, Available NVENC ]

Select GPU #0 - < GeForce GTX 650 Ti > supports SM 3.0 and NVENC

nvEncoder Error: NVENC H.264 encoder initialization failure! Check input params!

i don’t know input params is invalid,it’s return 8 (NV_ENC_ERR_INVALID_PARAM)

can you help me? thanks!

SUPPORTED NVIDIA GPUS FOR NVENC SDK

Updated

Same problem here; I also receive an 8 (NV_ENC_ERR_INVALID_PARAM)
driver: nvidia-340.29 (x86_64)
hardware: gtx 750 (GM107)
codex sdk: nvenc_4.0.0_linux_sdk
cuda version: 6-5
os: ubuntu 14.04.1 LTS (kernel: 3.13.0-34)

$ ./nvEncoder -outFile=output.264 -infile=…/YUV/1080p/HeavyHandIdiot.3sec.yuv -configfile=config.txt

GetNumberEncoders() has detected 1 CUDA capable GPU device(s) <<
[ GPU #0 - < GeForce GTX 750 > has Compute SM 5.0, NVENC Available ]

InitCUDA() has detected 1 CUDA capable GPU device(s)<<
[ GPU #0 - < GeForce GTX 750 > has Compute SM 5.0, Available NVENC ]

Select GPU #0 - < GeForce GTX 750 > supports SM 5.0 and NVENC
8 0

nvEncoder Error: NVENC H.264 encoder initialization failure! Check input params!

Any suggestions are welcome
nvidia-bug-report.log.gz (135 KB)

boona, What cuda sdk you are using? Plz provide nvidia-bug-report by running nvidia-bug-report.sh script as root user.

Hi, I aslo met the same problem!

Driver Version: 340.29(x86_64)
hardware: GTX 750Ti
codex sdk: nvenc_4.0.0_linux_sdk
Cuda compilation tools, release 6.5, V6.5.12
os: ubuntu 14.04.1 LTS (kernel: 3.13.0-24-generic)

$ ./1080p_heavyhand_3sec.sh

GetNumberEncoders() has detected 1 CUDA capable GPU device(s) <<
[ GPU #0 - < GeForce GTX 750 Ti > has Compute SM 5.0, NVENC Available ]

InitCUDA() has detected 1 CUDA capable GPU device(s)<<
[ GPU #0 - < GeForce GTX 750 Ti > has Compute SM 5.0, Available NVENC ]

Select GPU #0 - < GeForce GTX 750 Ti > supports SM 5.0 and NVENC

nvEncoder Error: NVENC H.264 encoder initialization failure! Check input params!

Any suggestions are welcome to post to my email xulimm94@163.com

thanks very much!

Internally tracking this issue under Bug 200034505 : NVENC H.264 encoder initialization failed with GTX 750Ti / gtx 750 (GM107) / GTX650TI

Extracted nvenc_4.0.0_linux_sdk.zip and found its mentioned inside doc folder in NVENC_DA-06209-001_v04.pdf Page-7 Table-3
“The current SDK package allows 2 NVENC sessions for Low end Quadro and Geforce cards on Windows OS only.”

And in README inside \Samples\nvEncodeApp
"NVENC is officially supported on GPU hardware based on Quadro, Tesla, GeForce GRID, or VGX.

““NVENC on GeForce is not officially supported.””

Hi, sandipt, you mean that GTX 750Ti is not support nvenc with nvenc_4.0.0_linux_sdk.zip on Ubuntu os?

how can I find the Bug 200034505 info?

and when will the Bug 200034505 be solved?

Thank you very much!

Yes! GTX 750Ti is not support nvenc with nvenc_4.0.0_linux_sdk.zip on Linux. This is internal bug.

Hi, I use GTX 750Ti in win8, and get error as belows:

nvEncoder.exe -configFile=HeavyHand_1080p.txt -outfile=HeavyHandIdiot.3sec.264

GetNumberEncoders() - cuInit() failed error:0x64

Driver Version: 344.11-desktop-win8-win7-winvista-64bit-international-whql
hardware: GTX 750Ti
codex sdk: nvenc_4.0.0_windows_sdk
Cuda: cuda_6.5.14_windows_general_64.exe
os: win8 64bit

Thanks!

Hi, sandipt, I have the same error on nVidia Quadro K2100M (GK106).
In README inside \Samples\nvEncodeApp
“NVENC is officially supported on GPU hardware based on Quadro, …”

And from: https://developer.nvidia.com/nvidia-video-codec-sdk
SUPPORTED NVIDIA GPUS FOR NVENC SDK
NVIDIA Quadro K4000 and above – Desktop Workstation
NVIDIA Quadro K2000M and above – Mobile Workstation

Driver Version: 340.29(x86_64)
hardware: Quadro K2100M
codex sdk: nvenc_4.0.0_linux_sdk
Cuda compilation tools, release 6.5, V6.5.12
os: Debian 7 x86_64 (Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3)

GetNumberEncoders() has detected 1 CUDA capable GPU device(s) <<
[ GPU #0 - < Quadro K2100M > has Compute SM 3.0, NVENC Available ]

InitCUDA() has detected 1 CUDA capable GPU device(s)<<
[ GPU #0 - < Quadro K2100M > has Compute SM 3.0, Available NVENC ]

Select GPU #0 - < Quadro K2100M > supports SM 3.0 and NVENC

nvEncoder Error: NVENC H.264 encoder initialization failure! Check input params!

P.S. On Quadro K4000 (GK106) the NVENC works good.
nvidia-bug-report.log.gz (183 KB)

correct me if i’m wrong but i thought 346.16 was required to enable the use the NVENC encoder on the supported GPU’s. I’ve enabled NVENC encoding by using the ffmpeg_libnvenc fork on github.

Well you are kind of right, nvenc was first supported in linux only by couple of quadros and explicit license file were needed. Some driver version cut the need of license file and broadens support to geforce cards, I don’t know though did them really worked before 346.16 driver … but there has problems with newer quadros and geforces before that beta driver. And the error

nvEncoder Error: NVENC H.264 encoder initialization failure! Check input params!

was the error for revealing driver bug that prevent nvenc working. Only way to get it working now, is to use newest beta driver.

so if you’re running 346.16 driver from nvidia, you should be able to get nvenc working is what i’m saying. I’m in the process of trying out the ffmpeg_libnvenc but i’m having issues in Arch.

Thanks a lot, with 346.16 driver NVENC works on Quadro K2100M!

HI

I got this error can you suggest me how to fix it…

[root@localhost ffmpeg]# ffmpeg -i TheWitcher3.mp4 -c:v h264_nvenc output.mp4
ffmpeg version 3.2 Copyright © 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
configuration: --enable-shared --enable-nonfree --enable-gpl --enable-decoder=aac --enable-libx264 --enable-demuxer=mov --enable-x11grab --enable-zlib --enable-protocol=http --enable-filter=aformat --enable-filter=volume --enable-filter=aresample --enable-libx265 --enable-nvenc
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘TheWitcher3.mp4’:
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-08-28T00:33:05.000000Z
Duration: 00:04:18.02, start: 0.000000, bitrate: 1180 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1051 kb/s, 24 fps, 24 tbr, 90k tbn, 48 tbc (default)
Metadata:
creation_time : 2016-08-28T00:33:05.000000Z
handler_name : ISO Media file produced by Google Inc.
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2016-08-28T00:33:05.000000Z
handler_name : ISO Media file produced by Google Inc.
File ‘output.mp4’ already exists. Overwrite ? [y/N] y
[h264_nvenc @ 0x1b35240] Cannot init CUDA
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[root@localhost ffmpeg]# ^C

[h264_nvenc @ 0x1b35240] Cannot init CUDA