Hardware decoding failure due to invalid parameter

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:

[mpeg2video @ 0000026adf73eb00] decoder->cvdl->cuvidCreateDecoder(&decoder->decoder, params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument

Thanks in advance.Frontline_WHRODT_2019_05_14_21_59_00.wtv-Frontline-2019-05-15T07-06-32.9029270-04-00.log.zip (106.0 KB)

Actually the error returned by the graphics drivers is related to decoding and not encoding. It’s still using the hardware encoder:

2019-05-15T07:11:59 MCEBuddy.AppWrapper.FFmpeg --> Stream #0:0: Video: hevc (hevc_nvenc) (Main) (hev1 / 0x31766568), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1–1, 2000 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
2019-05-15T07:11:59 MCEBuddy.AppWrapper.FFmpeg --> Metadata:
2019-05-15T07:11:59 MCEBuddy.AppWrapper.FFmpeg --> encoder : Lavc58.42.100 hevc_nvenc

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 at it Goose. I’ll just leave it alone then since it actually seems to be operating correctly.