Using the latest ffmpeg(3.4.2) compiled with the latest CUDA (9.1) I am unable to encode 10 bit h264 (see below output). How do I convert pix format in hardware, since apparently scale_cuda does NOT support pixel format changes even though it can take that as an argument. If I add “-pix_fmt yuv420p” it works, but my cpu utilization skyrockets (ffmpeg uses 100% out of 800%), leading me to believe the reformatting is in software:
ffmpeg -y -v verbose -c:v hevc_cuvid -i ~/bbb_hevc_3840x1920.mp4 -c:v h264_nvenc output.mp4
…
[hevc_cuvid @ 0x3a49fc0] Formats: Original: nv12 | HW: p010le | SW: p010le
[graph 0 input from stream 0:0 @ 0x3a66460] w:3840 h:2160 pixfmt:p010le tb:1/15360 fr:60/1 sar:1/1 sws_param:flags=2
[h264_nvenc @ 0x3a9c380] Loaded Nvenc version 8.1
[h264_nvenc @ 0x3a9c380] Nvenc initialized successfully
[h264_nvenc @ 0x3a9c380] 1 CUDA capable devices found
[h264_nvenc @ 0x3a9c380] [ GPU #0 - < GeForce GTX 1050 Ti > has Compute SM 6.1 ]
[h264_nvenc @ 0x3a9c380] 10 bit encode not supported
[h264_nvenc @ 0x3a9c380] No NVENC capable devices found
[h264_nvenc @ 0x3a9c380] Nvenc unloaded
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