0

I have Nvidia 1050Ti gpu

I test ffmpeg with cuda

ffmpeg -hwaccel nvdec -hwaccel_output_format cuda  -i input.mp4 -y  \ 
-c:v h264_nvenc -c:a libmp3lame -b:v 3M \
-filter_complex hwdownload,scale=w=iw*min(1280/iw\,720/ih):h=ih*min(1280/iw\,720/ih),hwupload out.mp4

Error:

[hwupload @ 00000199b49c1080] A hardware device reference is required to upload frames to.
[Parsed_hwupload_2 @ 000001999ba8ee80] Query format failed for 'Parsed_hwupload_2': Invalid argument
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

I want full hardware transcode without using CPU.

Alex
  • 77
  • 1
  • 8
  • Please note that the [tag:ffmpeg] tag states: "Only questions about programmatic use of the FFmpeg libraries, API, or tools are on topic. Questions about interactive use of the command line tool should be asked on [su] or [video.se]." – David Buck Oct 29 '20 at 09:40

1 Answers1

4

NVIDIA FFMPEG TRANSCODE GUIDE

You can follow it to full transcode using hardware NVIDIA GPU.

You need manual compile FFmpeg with CUDA feature enabled. Because scale is a software using CPU resource. In another side is scale_npp and scale_cuda using GPU resource (limited options).

hwdownload: frame down to ram, it's mean data in GPU VRAM -> RAM.

hwupload: invert of hwdownload. Notice: NVENC only works with GPU VRAM.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Tín Trung
  • 56
  • 2