Trying to get this to work. Have a Quadro P1000 card, all the cuda checks pass but in execution, it fails and defaults to software. Log file attached, here’s the error I’m finding:
The hardware decoder request from ffmpeg is being rejected by the graphics card so it’s failing. There could be a few reasons, maybe it didn’t identify the video stream correctly to use the right codec or maybe it doesn’t support mpeg2 video decoding for that specific stream configuration.
You may not see much performance improvement since your original video is mpeg2 and mpeg2 decoding is pretty efficient in software, it may just take more time for it to copy all the video data over to the graphics memory, decode it and pass it back to ffmpeg and then pass it back to the video card for encoding. Usually h.264 and h.265 will see the biggest boost in hardware decoding.
If you would still like to try it, you can try to add this to your profile ffmpeg-general line, it forces the card to use a specific hardware decoder,
-c:v mpeg2_cuvid
This should be the last parameter on the ffmpeg-general line
Thanks for taking a look. So, I recently had to rebuild my server and when I reinstalled and rebuilt my MCE profiles, I unchecked “select best audio” and checked “multichannel audio”.
I can’t explain it, but I haven’t had the issue since.
I offer that in case anyone else is having a similar issue.
Or I could have just had a corrupted driver or something and when I rebuilt the server, it fixed it.
[h264 @ 0x5641628791c0] decoder->cvdl->cuvidCreateDecoder(&decoder->decoder, params) failed → CUDA_ERROR_INVALID_VALUE: invalid argument
[h264 @ 0x5641628791c0] Using more than 32 (37) decode surfaces might cause nvdec to fail.
[h264 @ 0x5641628791c0] Try lowering the amount of threads. Using 16 right now.
[h264 @ 0x5641628791c0] Failed setup for format cuda: hwaccel initialisation returned error.
You’ll likely slow it down and consume more CPU by enabling decoding for the reasons mentioned above when using other software features (like audio encoding, filters etc). Try not using it.