ffmpeg/nvenc fails "nvenc API version. Required: 8.2 Found: 8.1"

Questions that occur when trying to compile FFmpeg.
Post Reply
hydra3333
Posts: 179
Joined: Sun Apr 28, 2013 1:03 pm
Contact:

ffmpeg/nvenc fails "nvenc API version. Required: 8.2 Found: 8.1"

Post by hydra3333 » Wed Nov 14, 2018 8:45 am

Hello. Just for interest if you're building ffmpeg yourself :-

I just cross-compiled ffmpeg using a variation of deadsix27's python build system (sort of equivalent to Zeranoe's) which builds against the latest git commit for the NV codec headers built here https://git.videolan.org/?p=ffmpeg/nv-c ... ;a=summary (which is later than the commit used by Zeranoe).

When encoding with nvenc, the resulting ffmpeg.exe aborts with

Code: Select all

nvenc API version. Required: 8.2 Found: 8.1
ffmpeg.exe" -v verbose -init_hw_device opencl=ocl:1.0 -filter_hw_device ocl -i "D:\SCRATCH\TEST.mpg" -map_metadata -1 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex "[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p,setdar=dar=16/9" -r 25 -c:v h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g 50 -refs 3 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder cabac -movflags +faststart -profile:v high -level 4.1 -af loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-24.66:measured_LRA=10.00:measured_TP=-11.20:measured_thresh=-35.07:offset=-1.71:linear=true:print_format=summary -c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000 -y "D:\SCRATCH\TEST.mp4"
Latest NVIDIA driver 416.94 (2018.11.13) installed as noted:

Code: Select all

nvencc64.exe --check-environment
NVEncC (x64) 4.23 (r939) by rigaya, Nov  8 2018 14:15:24 (VC 1900/Win/avx2)
  [NVENC API v8.1, CUDA 8.0]
 reader: raw, avi, avs, vpy, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP8, VP9, VC-1, MPEG1, MPEG4]
Environment Info
OS : Windows 10 x64 (17134)
CPU: Intel Core i7-3820 @ 3.60GHz [TB: 3.68GHz] (4C/8T)
RAM: Used 8744 MB, Total 16325 MB
GPU: #0: GeForce GTX 1050 Ti (768 cores, 1493 MHz)[PCIe2x16][416.94]

Code: Select all

nvencc64.exe --check-hw
NVEncC (x64) 4.23 (r939) by rigaya, Nov  8 2018 14:15:24 (VC 1900/Win/avx2)
  [NVENC API v8.1, CUDA 8.0]
 reader: raw, avi, avs, vpy, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP8, VP9, VC-1, MPEG1, MPEG4]
Loaded nvEncodeAPI64.dll.
InitCuda: device #0.

Checking Environment Info...
NVEncC (x64) 4.23 (r939) by rigaya, Nov  8 2018 14:15:24 (VC 1900/Win/avx2)
OS Version     Windows 10 x64 (17134)
CPU            Intel Core i7-3820 @ 3.60GHz [TB: 3.68GHz] (4C/8T)
GPU            #0: GeForce GTX 1050 Ti (416.94)
NVENC / CUDA   NVENC API 8.1, CUDA 10.0, schedule mode: auto
cuInit: Success.
cuDeviceGetCount: Success.
cuDeviceGet: ID:0.
cuDeviceComputeCapability: Success: 6.1.
NVENC capabilities: OK.
using cuda schedule mode: auto.
cuCtxCreate: Success.
cuCtxPopCurrent: Success.
cuvidInit: Success.
cuvidCtxLockCreate: Success.
InitCuda: Success.
nvEncodeAPICreateInstance(APIVer=0x71020008): Success.
NvEncOpenEncodeSessionEx(device_type=NV_ENC_DEVICE_TYPE_CUDA): Success.
nvEncDestroyEncoder: success.
Closing perf monitor...
Avaliable Codec(s)
H.264/AVC
H.265/HEVC
I suppose back-tracking to use a few commits earlier for https://git.videolan.org/?p=ffmpeg/nv-c ... ;a=summary may fix that.

I wonder why the NV Headers git is updated to the later NVENC API 8.2 when it is not yet built/released with the very latest NVIDIA driver ?

hydra3333
Posts: 179
Joined: Sun Apr 28, 2013 1:03 pm
Contact:

Re: ffmpeg/nvenc fails "nvenc API version. Required: 8.2 Found: 8.1"

Post by hydra3333 » Wed Nov 14, 2018 8:49 am

Yes, building against https://git.videolan.org/?p=ffmpeg/nv-c ... ;a=summary commit 450c616c7242afc577fb6ecd01732495fc263520 works.

oviano
Posts: 16
Joined: Sat May 14, 2016 9:15 am

Re: ffmpeg/nvenc fails "nvenc API version. Required: 8.2 Found: 8.1"

Post by oviano » Wed Nov 14, 2018 6:21 pm

Yes, I found this too.

I'm using jb's suite, and had to build against a slightly earlier version of nv-codec-headers.

This has been noted in Nvidia's forum - it seems to me that Nvidia's driver should be reporting 8.2, not 8.1, now that they have released the 8.2 SDK.

https://devtalk.nvidia.com/default/topi ... c-sdk-8-2/

hydra3333
Posts: 179
Joined: Sun Apr 28, 2013 1:03 pm
Contact:

Re: ffmpeg/nvenc fails "nvenc API version. Required: 8.2 Found: 8.1"

Post by hydra3333 » Wed Dec 05, 2018 11:51 pm

Does anyone know if there's any action over at nvidia ?

oviano
Posts: 16
Joined: Sat May 14, 2016 9:15 am

Re: ffmpeg/nvenc fails "nvenc API version. Required: 8.2 Found: 8.1"

Post by oviano » Thu Dec 06, 2018 7:20 am

I reported it in the Nvidia forums but when/if they will fix it I don't know.

hydra3333
Posts: 179
Joined: Sun Apr 28, 2013 1:03 pm
Contact:

Re: ffmpeg/nvenc fails "nvenc API version. Required: 8.2 Found: 8.1"

Post by hydra3333 » Thu Dec 06, 2018 8:08 am

OK. Thanks.

Post Reply