I am trying to applay complex filter through CUDA hevc_cuvid with GPU nvidia GeForce GTX 1080 with ffmpeg, input is 10bit 4k hevc video mkv.
I installed latest nvidia drivers, CUDa nad compiled lates ffmpeg. I tried a lot of combinations and codes but no luck.
ffmpeg -hwaccel_device 0 -hwaccel cuvid -c:v hevc_cuvid -i /home/select/2160p.UHD.mkv -i /home//select/4k_UHD_logo.png -filter_complex "[0:v]scale_npp=1920:1080,hwdownload,format=nv12 [base]; [base][1:v] overlay=main_w-overlay_w-15:main_h-overlay_h-15 [marked]" -map "[marked]" -t 00:01:00.000 -gpu 0 -c:v hevc_nvenc -preset slow -rc cbr_hq -b:v 5000k -maxrate 7000k -bufsize 1000k -acodec aac -ac 2 -dts_delta_threshold 1000 -ab 128k /home/select/filtered_2_1min.mp4
Ffmpeg returns this error :
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1608 [SAR 1:1 DAR 160:67], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
Stream mapping:
Stream #0:0 (hevc_cuvid) -> scale_npp
Stream #1:0 (png) -> overlay:overlay
overlay -> Stream #0:0 (hevc_nvenc)
Press [q] to stop, [?] for help
[Parsed_scale_npp_0 @ 0x561d514dce40] Unsupported input format: p010le
[Parsed_scale_npp_0 @ 0x561d514dce40] Failed to configure output pad on Parsed_scale_npp_0
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #1:0
and with other ffmpeg code, but also no luck :
ffmpeg -hwaccel_device 0 -hwaccel cuvid -c:v hevc_cuvid -i /home/select/2160p.UHD.mkv -i /home//select/4k_UHD_logo.png -filter_complex "[0:v]scale_npp=hwdownload,format=nv12 [base]; [base][1:v] overlay=main_w-overlay_w-15:main_h-overlay_h-15[v]; [v]hwupload_cuda[v]" -map "[v]" -t 00:01:00.000 -gpu 0 -c:v hevc_nvenc -preset slow -rc cbr_hq -b:v 5000k -maxrate 7000k -bufsize 1000k -acodec aac -ac 2 -dts_delta_threshold 1000 -ab 128k /home/select/filtered_1min.mp4
Ffmpeg returs this error :
Stream mapping:
Stream #0:0 (hevc_cuvid) -> scale_npp
Stream #1:0 (png) -> overlay:overlay
hwupload_cuda -> Stream #0:0 (hevc_nvenc)
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'Parsed_scale_npp_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #1:0
Conversion failed!
Without CUDA hevc_cuvid ffmpeg do the job but complex filter use alot of system CPU ( it takes arounfd 40 % of Z800 2x6core cpus !!!) and that is not goal here, I want to use full GPU capabilities like with CUDA h264_cuvid
/root/ffmpeg-build-static-binaries/bin/ffmpeg -hwaccel_device 0 -hwaccel cuvid -i /home/select/2160p.UHD.mkv -i /home//select/4k_UHD_logo.png -t 00:01:00.000 -filter_complex "[0:v][1:v] overlay=main_w-overlay_w-15:main_h-overlay_h-15" -gpu 0 -pix_fmt yuv420p -c:v hevc_nvenc -preset slow -rc cbr_hq -b:v 3000k -map 0:a:0 -acodec aac -ac 2 -dts_delta_threshold 1000 -ab 128k /home/select/filtered_1min.mp4
ffmpeg version N-93064-ged20fbc Copyright (c) 2000-2019 the FFmpeg developers
THe same code ffmpeg but input as h264 video with h264_cuvid is OK.
I’d be incredibly grateful for any help with this problem.