[Solved] Driver does not support the required nvenc API version

Hello everyone
i am trying to install ffmpeg with nvenc and run the following command :

ffmpeg -i /home/verb/Videos/new4/Trains.mp4 -c:v h264_nvenc -profile high444p -crf 28 -c:a aac -b:a 128k output2.mp4

unfortunately it gives me :

Driver does not support the required nvenc API version. Required: 8.0 Found: 7.1
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

i have downloaded and installed cuda_8.0.61_375.26_linux.run also if it’s matter i have nvidia gtx 960 and my os is ubuntu 16.04
this is the output from nvcc

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

and

cat ~/.bashrc 
export CUDA_HOME=/usr/local/cuda-8.0 
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64 
 

export PATH=$PATH:/usr/local/cuda-8.0/bin

Please if you have any idea of what could be wrong and what driver or path to update let me know.

BR

what is the result of running

nvidia-smi

?

Hello thanks for the reply here is the output of nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.26                 Driver Version: 375.26                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 960     Off  | 0000:01:00.0      On |                  N/A |
|  0%   42C    P8    11W / 130W |     85MiB /  1991MiB |      3%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      1084    G   /usr/lib/xorg/Xorg                              83MiB |
+-----------------------------------------------------------------------------+

The latest 8.0 nvenc API appears to want driver 378.13 or newer:

https://developer.nvidia.com/nvidia-video-codec-sdk

Go to www.nvidia.com/drivers

click on “Beta and Older Drivers”

and find a driver for GTX 960 that is 378.13 or higher.

Thank you txbob i have updated with latest 381.22 and that solved my problem.Haven’t noticed the “Beta and Older Drivers” in the site.

BR

I have the same error here! The driver version is 375.66, for a Tesla M60 card (the lastest driver available right now). Cuda Toolkit 8 is installed.

[h264_nvenc @ 0x43b7da0] Driver does not support the required nvenc API version. Required: 8.0 Found: 7.1
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

nvidia-smi

Thu May 18 21:52:23 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.66                 Driver Version: 375.66                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla M60           Off  | A2CC:00:00.0     Off |                  Off |
| N/A   40C    P0    39W / 150W |      0MiB /  8123MiB |      7%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

As txbob said, upgrade your driver. The latest 8.0 nvenc API appears to want driver 378.13 or newer, which you do not have.

The reason for the posting (not stated clearly) is that currently, there is no newer driver posted for that particular GPU.

The options are to wait until NVIDIA gets around to posting a newer driver for that particular GPU (M60), or else use a different GPU that currently has a NVENC 8.0 compatible driver posted.

I experience the exactly same problem, running on Azure VM with a Tesla M60.

How long we usualy have to wait for the new driver?

C:\Program Files\NVIDIA Corporation\NVSMI>nvidia-smi
Wed Jun 07 03:32:53 2017
±----------------------------------------------------------------------------+
| NVIDIA-SMI 377.35 Driver Version: 377.35 |
|-------------------------------±---------------------±---------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla M60 WDDM | B749:00:00.0 Off | Off |
| N/A 31C P8 16W / 150W | 212MiB / 8192MiB | 2% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 92 C+G Insufficient Permissions N/A |
| 0 1000 C+G Insufficient Permissions N/A |
| 0 2524 C+G …x86)\Google\Chrome\Application\chrome.exe N/A |
| 0 3152 C+G …indows.Cortana_cw5n1h2txyewy\SearchUI.exe N/A |
| 0 3760 C+G Insufficient Permissions N/A |
| 0 4412 C+G …ost_cw5n1h2txyewy\ShellExperienceHost.exe N/A |
±----------------------------------------------------------------------------+

Hi Robert, I hope you are doing great. I am running one of the samples in Nvidia SDK 8.2.15 for encoding. I get the following error

" LoadNvEncApi : NvEncodeAPIGetMaxSupportedVersion(&version) returned error 24957824 at …/Video_Codec_SDK_8.2.15/Samples/NvCodec/NvEncoder/NvEncoder.cpp:92"

I have Nvidia 396.26 drivers installed. My GPU is Nvidia 1050 Ti. can you help me with this issue? Thank you.

Mizbauddin, can you please check if the version you mentioned is correct: 396.26? If it is, can you please point out where you might have installed this from?

Also, is this Windows or Linux?

I cannot see this version in drivers posted for either OS.

Thanks!