h265 to h264 transcode -> No NVENC capable devices found


I am having difficulties in using the NVEnc capabilities of my GTX970. I want to transcode some h265 videos to h264 (so they play nice on the raspberry pi 3).

Most of the time I have no issues, but from time to time, ffmpeg will complain that No NVENC capable devices found.

It puzzles me, as h264_nvenc is available for the GTX970 (I am aware hevc_nvenc is not), but for some videos it works, some other does not.

The full error message I receive is:

[h264_nvenc @ 0x55b80d12ff00] No NVENC capable devices found
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

I have played with size, bit rate and rate and I can’t find a suitable combination that will make ffmpeg happy.

I am completely lost now as I fail to understand why it fails.

1 Like

Try adding -loglevel verbose so you get more information.

Thanks, after adding -loglevel verbose I got the explanation:

[h264_nvenc @ 0x55e83b7bbb00] 1 CUDA capable devices found
[h264_nvenc @ 0x55e83b7bbb00] [ GPU #0 - < GeForce GTX 1060 3GB > has Compute SM 6.1 ]
[h264_nvenc @ 0x55e83b7bbb00] 10 bit encode not supported
[h264_nvenc @ 0x55e83b7bbb00] No NVENC capable devices found

I changed it to 8bit with: -pix_fmt yuv420p and now it’s working like a charm ^_^