[FFmpeg-trac] #6409(avcodec:new): "h264_cuvid" and "h264_nvenc" can't share GPU memory

FFmpeg trac at avcodec.org
Mon May 22 15:52:49 EEST 2017


#6409: "h264_cuvid" and "h264_nvenc" can't share GPU memory
-------------------------------------+-------------------------------------
             Reporter:  ahakon       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avcodec      |                  Version:  git-
             Keywords:               |  master
  h264_cuvid,h264_nvenc,hw,cuda      |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 When transcoding using CUDA hardware, you can't use intermediate GPU
 memory. Then you need to copy to regular RAM using the hwdownload filter.

 This doesn't work:
 {{{
 % ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint 2 -resize 1280x720 -i
 <inputfile>  \
 -c:v h264_nvenc -preset:v:0 medium -b:v:0 2500k \
 -c:a copy <outputfile>
 }}}

 This works:
 {{{
 % ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint 2 -resize 1280x720 -i
 <inputfile>  \
 -filter:v
 scale_npp=w=720:h=576:format=nv12:interp_algo=2,hwdownload,format=nv12 \
 -c:v h264_nvenc -preset:v:0 medium -b:v:0 2500k \
 -c:a copy <outputfile>
 }}}

 Please, fix this! It's a must have that the chain decoder/filters/encoder
 uses only GPU frames without innecessary download/uploads to RAM.

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


More information about the FFmpeg-trac mailing list