Opened 7 years ago

Closed 7 years ago

#6409 closed defect (invalid)

"h264_cuvid" and "h264_nvenc" can't share GPU memory

Reported by: Andreas Håkon Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: h264_cuvid, h264_nvenc, hw, cuda
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.

Change History (2)

comment:1 by Timo R., 7 years ago

Your exact commandline works perfectly fine for me.
Please provide the full uncut output you get, and test with latest ffmpeg master and latest nvidia drivers.

comment:2 by Andreas Håkon, 7 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.