2

I have a NVIDIA Quadro P620. I have a lot of research on how to accelerate my transcoding using my graphic card.

I stumble on this page https://trac.ffmpeg.org/wiki/HWAccelIntro#Usewiththeffmpegcommand-linetool

So, I tried

ffmpeg -hwaccel cuda -i input.avi output.mp4

It did not turn out any faster than

ffmpeg -i input.avi output.mp4

It actually took longer for transcoding.

I can see it spend the same CPU usage on resmon as without -hwaccel option.

Did I do something wrong? How do I know ffmpeg is correctly using my GPU?

1 Answers1

5

According to the Video Encode and Decode GPU Support Matrix, your GPU supports hardware-assisted decode and encode, also called NVENC.

The only troubling point here is the list of codecs that your GPU supports, which are: H.264 and H.265. If your videos are not encoded with these codecs, hardware acceleration might not work for you.

For the right codecs and for reference, the Stack Overflow post make ffmpeg chose Nvidia CUDA over Intel QSV mentioned that hardware acceleration was working with the following command:

ffmpeg -hide_banner -hwaccel cuda -i "input.avi" -c:a copy -ac 1 -c:v h264_nvenc -preset hq -movflags faststart -qp 30 "output.mp4"
harrymc
  • 498,455