[FFmpeg-trac] #6420(undetermined:new): hwaccel cuvid breaks B-Frames with h264_nvenc

FFmpeg trac at avcodec.org
Thu May 25 17:53:21 EEST 2017


#6420: hwaccel cuvid breaks B-Frames with h264_nvenc
-------------------------------------+-------------------------------------
             Reporter:  ahakon       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  cuvid        |               Blocked By:
  h264_cuvid h264_nvenc              |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 When you transcode using h264_cuvid for deconding and h264_nvenc for
 encoding, if you enable "hwaccel cuvid" for a full GPU processing, then
 you can't enable B-frames.

 This works (decode h264_cuvid / encode h264_nvenc + 1 B-Frames):
 {{{
 % ffmpeg -c:v h264_cuvid -i <inputfile>  \
 -c:v h264_nvenc -bf:v 1 -c:a copy <outputfile>
 }}}

 This doesn't work (decode h264_cuvid / encode h264_nvenc + 1 B-Frames /
 hwaccel cuvid enabled):
 {{{
 % ffmpeg -hwaccel cuvid -c:v h264_cuvid -i <inputfile>  \
 -c:v h264_nvenc -bf:v 1 -c:a copy <outputfile>
 }}}

 However, this works (decode h264_cuvid / encode h264_nvenc + No B-Frames /
 hwaccel cuvid enabled):
 {{{
 % ffmpeg -hwaccel cuvid -c:v h264_cuvid -i <inputfile>  \
 -c:v h264_nvenc -bf:v 0 -c:a copy <outputfile>
 }}}

 The error when it fails is
 {{{
 [h264_nvenc @ 0x2f43120] EncodePicture failed!: no encode device (1)
 }}}

 So, when you use "-hwaccel cuvid" is imposible to use B-Frames.

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


More information about the FFmpeg-trac mailing list