Log in

View Full Version : ffmpeg nvenc -> No NVENC capable devices found


Selur
13th October 2019, 19:06
H.265 encoding:
ffmpeg -y -noautorotate -nostdin -threads 8 -i "F:\TestClips&Co\files\5000frames.mp4" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0 -vcodec hevc_nvenc -preset 5 -profile:v 1 -level 0 -tier main -rc vbr_hq -2pass 1 -qmin 0 -qmax 51 -b:v 1500k -surfaces 32 -no-scenecut 0 -refs 3 -nonref_p 1 -strict_gop 1 -bsf:v hevc_mp4toannexb "E:\Temp\5000frames_20_03_45_2010_01.265"
fails with:
ffmpeg version N-95342-g83ea44f741-g365083556e+3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.0 (Rev2, Built by MSYS2 project)
configuration: --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libaom --enable-libopenmpt --enable-version3 --enable-libsvthevc --enable-libkvazaar --enable-libxavs --enable-libzmq --enable-libvmaf --enable-vapoursynth --enable-mbedtls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DZMQ_STATIC --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads --extra-cflags=-DKVZ_STATIC_LIB
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 59.102 / 58. 59.102
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 62.100 / 7. 62.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\TestClips&Co\files\5000frames.mp4':
Metadata:
major_brand : hvc1
minor_version : 0
compatible_brands: iso4hvc1
creation_time : 2018-01-27T15:58:44.000000Z
encoder : Hybrid 2018.01.26.1
Duration: 00:03:20.00, start: 0.000000, bitrate: 33 kb/s
Stream #0:0(und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt470bg/unknown/unknown), 640x480 [SAR 1:1 DAR 4:3], 31 kb/s, 25 fps, 25 tbr, 25k tbn, 25 tbc (default)
Metadata:
creation_time : 2018-01-27T15:58:44.000000Z
handler_name : 265#video:fps=25@GPAC0.7.2-DEV-rev357-g7115eeb89-ab-suite
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> hevc (hevc_nvenc))
[hevc_nvenc @ 000001e4d8774940] No NVENC capable devices found
Error initializing

H.264 encoding:
ffmpeg -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "F:\TestClips&Co\files\5000frames.mp4" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f yuv4mpegpipe - | NVEnc --y4m -i - --fps 25.000 --codec h265 --profile main10 --level auto --tier high --sar 1:1 --lookahead 16 --output-depth 10 --vbrhq 0 --vbr-quality 0.00 --max-bitrate 240000 --gop-len 0 --ref 3 --bframes 0 --no-b-adapt --mv-precision Q-pel --preset default --colormatrix bt470bg --cuda-schedule sync --output "E:\Temp\5000frames_20_02_54_5810_01.265"
fails with:
ffmpeg version N-95342-g83ea44f741-g365083556e+3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.0 (Rev2, Built by MSYS2 project)
configuration: --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libaom --enable-libopenmpt --enable-version3 --enable-libsvthevc --enable-libkvazaar --enable-libxavs --enable-libzmq --enable-libvmaf --enable-vapoursynth --enable-mbedtls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DZMQ_STATIC --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads --extra-cflags=-DKVZ_STATIC_LIB
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 59.102 / 58. 59.102
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 62.100 / 7. 62.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, avi, from 'F:\TestClips&Co\files\Test-AC3-5.1.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:00:33.40, start: 0.000000, bitrate: 555 kb/s
Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 159 kb/s, 25 fps, 25 tbr, 25 tbn, 30k tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (h264_nvenc))
[h264_nvenc @ 0000017cb722eac0] No NVENC capable devices found
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
Conversion failed!
I'm on Windows 10 pro with a GeForce 1070 Ti and latest 436.48 drivers.

NVEncC 4.52 and DGIndexNV 2053.0.0.189 both work fine, but since the NVEncC 4.51 stated 'Update to NVENC SDK 9.1, now NVIDIA graphics driver 436.15 or later is required' I wonder if this is a driver vs. API issue.


-> Anyone else experiencing this? Or is this just my machine?
Any idea how to fix this?

I tried the latest build from zeranoe (20191013-4f4334b) and a build I compiled on my machine using MBAS.
I deinstalled and reinstalled the NVIDIA drivers.

Cu Selur

poisondeathray
13th October 2019, 19:16
I didn't look too closely but it probably has to do with the syntax change regarding -refs 3

see this
https://trac.ffmpeg.org/ticket/8254

Selur
14th October 2019, 16:09
Good catch! removing '-refs 3' from the call and the error doesn't happen.
Reading the ticket, really seems like the main issue is that:
a. ffmpeg has no option to check what features are supported by the used card
b. the error message is really misleading

Thanks!

Cu Selur

nevcairiel
14th October 2019, 16:40
a. ffmpeg has no option to check what features are supported by the used card

Of course it does. It specifically checks if this option is supported on your hardware when you try to use it and errors out if not, which imho is one of the better approaches. You request a specific setting, and if it can't fullfill it, it errors and tells you (well, see second point), instead of just doing something else that you didn't ask for.


b. the error message is really misleading


The real problem is that the actual message to explain why it fails is not shown on a default log level, that should probably be changed so that users know why its not working.

Selur
14th October 2019, 17:17
"No NVENC capable devices found" and a device not capable of supporting a specific options for me are two totally different things.
Something similar to NVEnCs '--check-features' would really be helpful with ffmpegs NVEnc support.
Identifying that feature X is not supported by having to run into an error is less than optimal from my point of view.

Cu Selur