Ffmpeg unknown decoder 'h265_cuvid' for GeForce rtx 2060

  • My board is GeForce RTX 2060 and I want to decode h.265 encoded video using gpu-accelerated ffmpeg.
    Environment:
    Ubuntu 18.04
    Cuda 10.2
    Driver 440.33.01

  • When I run related command I get " Unknown decoder ‘h265_cuvid’ ". By the way, no problem for ‘h264_cuvid’.

  • When I control available decoders using “ffmpeg -decoders | grep cuvid”, it gives the response given below. When I check NVDEC Support Matrix, it says both encoding and decoding for H.265 is available for GeForce RTX 2060.

ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
V… h264_cuvid Nvidia CUVID H264 decoder (codec h264)
V… hevc_cuvid Nvidia CUVID HEVC decoder (codec hevc)
V… mjpeg_cuvid Nvidia CUVID MJPEG decoder (codec mjpeg)
V… mpeg1_cuvid Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)
V… mpeg2_cuvid Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)
V… mpeg4_cuvid Nvidia CUVID MPEG4 decoder (codec mpeg4)
V… vc1_cuvid Nvidia CUVID VC1 decoder (codec vc1)
V… vp8_cuvid Nvidia CUVID VP8 decoder (codec vp8)
V… vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)

  • Please help me, how can I use ‘h265_cuvid’, what I am doing wrong?

As it says in the list, you use hevc_cuvid.

Also, you shouldn’t use the _cuvid family of decoders unless you have a very specific reason to do so. Using the proper hwaccel mode: -hwaccel nvdec is the recommended option.

1 Like