[FFmpeg-trac] #7537(undetermined:new): Problems with nvdec/cuvid

FFmpeg trac at avcodec.org
Wed Nov 7 11:36:09 EET 2018


#7537: Problems with nvdec/cuvid
-------------------------------------+-------------------------------------
             Reporter:  boris-       |                     Type:  defect
  petrov                             |                 Priority:  normal
               Status:  new          |                  Version:  git-
            Component:               |  master
  undetermined                       |               Blocked By:
             Keywords:               |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Why are there two separate implementations of nvidia hardware
 acceleration? As far as I understand nvdec is simply a rebranding of
 cuvid. Yet in FFmpeg they coexist and exhibit different behaviors.

 1. Is either of nvdec/cuvid the recommended one to use? Is either one
 deprecated?
 2. cuvid does not auto-detect the decoder. This works correctly: `ffmpeg
 -hwaccel cuvid -c:v h264_cuvid -i ...`, and so does `ffmpeg -hwaccel nvdec
 -i ...`, but this does not: `ffmpeg -hwaccel cuvid -i ...`
 3. cuvid is noticably (although not drastically) faster. Maybe around
 15-20%
 4. `ffmpeg -decoders` displays some cuvid-related things, but nothing
 nvdec-related
 5. nvdec is not displayed when running `ffmpeg -hwaccels`
 6. When using scale_npp with cuvid it can be used with just `-vf
 scale_npp=...` whereas nvdec requires `-vf hwupload_cuda,scale_npp=...`

 The output for `ffmpeg`:


 {{{
 ffmpeg version 4.1.git Copyright (c) 2000-2018 the FFmpeg developers
   built with gcc 8 (SUSE Linux)
   configuration: --extra-libs='-lm -lpthread'
 --prefix=/home/lapis/ffmpeg_build --pkg-config-flags=--static --extra-
 cflags='-I/home/lapis/ffmpeg_build/include -I/opt/cuda/include/' --extra-
 ldflags='-L/home/lapis/ffmpeg_build/lib -L/opt/cuda/lib64/'
 --bindir=/home/lapis/bin --enable-version3 --enable-pic --enable-gpl
 --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-
 libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
 --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
 --enable-ffnvcodec --enable-cuda --enable-cuvid --enable-nvdec --enable-
 nvenc --enable-libnpp --enable-libsmbclient
   libavutil      56. 23.100 / 56. 23.100
   libavcodec     58. 36.100 / 58. 36.100
   libavformat    58. 21.100 / 58. 21.100
   libavdevice    58.  6.100 / 58.  6.100
   libavfilter     7. 43.100 /  7. 43.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 }}}


 I'm not sure which of those are bugs, which are by design, which are
 normal. I'll appreciate any insight. Thanks!

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7537>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list