Why does ffmpeg fail to “convert between the formats” with hevc_nvenc when I’m not doing video filtering?

  Kiến thức lập trình

I’m doing some nvidia GPU hevc transcoding to get stuff done at faster speeds. Most of the ~2000 titles that I’m transcoding work fine, but a handful are failing like

Impossible to convert between the formats supported by the filter 'Parsed_hwupload_cuda_3' and the filter 'auto_scale_0'
[vf#0:0 @ 0x55b72ac9a3c0] Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while filtering: Function not implemented

Side Question: Can anyone tell me how to disable the automatic syntax highlighting in code blocks? Using “`text doesn’t work.

I’m aware of the need to hwdownload and hwupload during a filtering pipeline, but when I remove all video filters from the command, it instead says

Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scale_0'

Here are a couple of examples of commands producing the errors. With filters and an error mentioning Parsed_hwupload_cuda_3:

"ffmpeg" "-hwaccel" "cuda" "-hwaccel_output_format" "cuda" "-hide_banner" "-y" "-i" 
    "in.mkv" "-max_muxing_queue_size" "1024" "-map" "0" "-c" "copy" "-filter:v:0" 
    "hwdownload,format=nv12,crop=1456:1080:232:0,hwupload_cuda" "-c:0" "hevc_nvenc" 
    "-metadata:s:0" "encoded_by=My smart encoder script" "-f" "matroska" "out.mkv"

and without filters and the error mentioning Parsed_null_0:

"ffmpeg" "-hwaccel" "cuda" "-hwaccel_output_format" "cuda" "-hide_banner" "-y" "-i" 
    "in.mkv" "-max_muxing_queue_size" "1024" "-map" "0" "-c" "copy" "-c:0" "hevc_nvenc" 
    "-metadata:s:0" "encoded_by=My smart encoder script" "-f" "matroska" "out.mkv"

Note: The quoting in the commands is because I’m generating them with a script and logging them out before running.

I can’t find any info about that auto_scale_0 filter. Why is it failing like this?

LEAVE A COMMENT