Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5926 closed defect (invalid)

Encoding with nvenc results in 'Codec not supported'

Reported by: alexjs Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: nvenc
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Attempting to use hevc_nvenc codec results in 'No NVENC capable devices found'.

This is mentioned on https://trac.ffmpeg.org/wiki/HWAccelIntro as being resolvable by:

Note: If you get the No NVENC capable devices found error make sure you're encoding to a supported pixel format. See encoder info as shown above.

However the problem occurs with all pixel formats and all variants (h264_nvenc too, e.g.). The driver version hits the minimum requirement for nvenc mentioned in various documents on the Internet.

How to reproduce:

% ffmpeg -i in/Foreman_ProRes.mov -c:v hevc_nvenc -profile main -pixel_format yuv420p -preset default out/output.mp4 -v 56

[...]

[hevc_nvenc @ 0x23c2880] Loaded Nvenc version 7.0
[hevc_nvenc @ 0x23c2880] Nvenc initialized successfully
[hevc_nvenc @ 0x23c2880] 1 CUDA capable devices found
[hevc_nvenc @ 0x23c2880] [ GPU #0 - < GRID K520 > has Compute SM 3.0 ]
[hevc_nvenc @ 0x23c2880] Codec not supported
[hevc_nvenc @ 0x23c2880] No NVENC capable devices found
[hevc_nvenc @ 0x23c2880] Nvenc unloaded
Stream mapping:
  Stream #0:0 -> #0:0 (prores (native) -> hevc (hevc_nvenc))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Version:

ffmpeg version: N-82215-g3932ccc Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
built on ...

Configuration [matches Standard Ubuntu, but with nvenc]:
--prefix=/home/ubuntu/ffmpeg_build --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --extra-libs=-ldl --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-gpl


Encoding on: Nvidia GRID K520 (AWS G2 instance)
Nvidia details:  NVIDIA-SMI 367.57                 Driver Version: 367.57
SDK Details: Video_Codec_SDK_7.0.1

Change History (4)

comment:1 by Hendrik, 10 years ago

GRID K520 is a Kepler GPU, those do not support HEVC.
Its also quite possible that the GRID GPUs do not have the encoder block at all.

Last edited 10 years ago by Hendrik (previous) (diff)

comment:2 by Carl Eugen Hoyos, 10 years ago

Component: ffmpegundetermined
Keywords: nvenc added
Resolution: invalid
Status: newclosed

comment:3 by alexjs, 10 years ago

Thanks both - apologies for the noise then.

Quick clarification, I see the same behaviour with h264_nvenc (as below) -- but it looks like h264 should be possible on Kepler? Could this be PEBKAC or is it a pure incompatibility? I'm assuming given the 'yuv444p not supported' message, it's because the older GPU doesn't have yuv444p support, and pixel_format doesn't (can't?) override it in this case?

$ ffmpeg -i in/Foreman_ProRes.mov -c:v h264_nvenc -profile main -preset default -pixel_format yuv420p out/output.mp4 -v 56
[...]
Splitting the commandline.
Reading option '-i' ... matched as input file with argument 'in/Foreman_ProRes.mov'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_nvenc'.
Reading option '-profile' ... matched as option 'profile' (set profile) with argument 'main'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'default'.
Reading option '-pixel_format' ... matched as AVOption 'pixel_format' with argument 'yuv420p'.
Reading option 'out/output.mp4' ... matched as output file.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '56'.
Finished splitting the commandline.
[...]

[h264_nvenc @ 0x2dcb880] Loaded Nvenc version 7.0
[h264_nvenc @ 0x2dcb880] Nvenc initialized successfully
[h264_nvenc @ 0x2dcb880] 1 CUDA capable devices found
[h264_nvenc @ 0x2dcb880] [ GPU #0 - < GRID K520 > has Compute SM 3.0 ]
[h264_nvenc @ 0x2dcb880] YUV444P not supported
[h264_nvenc @ 0x2dcb880] No NVENC capable devices found
[h264_nvenc @ 0x2dcb880] Nvenc unloaded

comment:4 by alexjs, 10 years ago

Incidentally I see the same behaviour with Nvidia Telsa K80 cards (below - same ffmpeg CLI) - which are a newer Compute SM. I am increasingly thinking PEBKAC, but I can't quite work it out...

[h264_nvenc @ 0x3d96880] Loaded Nvenc version 7.0
[h264_nvenc @ 0x3d96880] Nvenc initialized successfully
[h264_nvenc @ 0x3d96880] 1 CUDA capable devices found
[h264_nvenc @ 0x3d96880] [ GPU #0 - < Tesla K80 > has Compute SM 3.7 ]
[h264_nvenc @ 0x3d96880] YUV444P not supported
[h264_nvenc @ 0x3d96880] No NVENC capable devices found
[h264_nvenc @ 0x3d96880] Nvenc unloaded
Note: See TracTickets for help on using tickets.