Does ffmpeg really use my Graphics card to encode?

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

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?

5

1 Answer

According to theVideo Encode and Decode GPU Support Matrix, your GPU supports hardware-assisted decode and encode, also calledNVENC.

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 postmake ffmpeg chose Nvidia CUDA over Intel QSVmentioned 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"
7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like