FFmpeg中h264_qsv编码器显示支持p010le像素格式但转码报错的问题咨询
FFmpeg中h264_qsv编码器显示支持p010le像素格式但转码报错的问题咨询
我遇到了一个奇怪的问题,一直没法解决。
当我查看当前使用的FFmpeg版本中h264_qsv编码器的特性时,它显示该编码器支持三种像素格式:
I:\Downloads>ffmpeg -hide_banner -h encoder=h264_qsv Encoder h264_qsv [H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration)]: General capabilities: delay hybrid Threading capabilities: none Supported hardware devices: qsv qsv qsv Supported pixel formats: nv12 p010le qsv h264_qsv encoder AVOptions: -async_depth E..V....... Maximum processing parallelism (from 1 to INT_MAX) (default 4) -avbr_accuracy E..V....... Accuracy of the AVBR ratecontrol (from 0 to INT_MAX) (default 0) -avbr_convergence E..V....... Convergence of the AVBR ratecontrol (from 0 to INT_MAX) (default 0) -preset E..V....... (from 1 to 7) (default medium) veryfast 7 E..V....... [and so on.]
但当我把像素格式p010le复制到转码用的批处理文件中(默认用nv12时是可以正常工作的),就会报错:
I:\Capture>ffmpeg -hide_banner -err_detect ignore_err -loglevel info -stats -benchmark -init_hw_device qsv:hw,child_device_type=qsv -hwaccel qsv -hwaccel_output_format qsv -vsync vfr -ec deblock -ss 00:01:32.432 -to 00:10:53.064 -i "Little Cheeser 1936 raw.avi" -strict normal -fflags +igndts+genpts -c:a aac -q:a 0.9 -ac 1 -af dynaudnorm -g 60 -async_depth 128 -vf "hwupload=extra_hw_frames=128,format=p010le,vpp_qsv=cw=948:ch=720:cx=0:cy=0" -q:v 28 -c:v h264_qsv -preset veryslow -rdo 1 -extbrc 1 -look_ahead_depth 100 -look_ahead_downsampling auto -avbr_accuracy 500 -mbd rd -refs 4 -me_range 1024 -trellis 2 -idct auto -subq 8 -adaptive_i 1 -adaptive_b 1 -flags +aic+mv4+qpel+ilme+loop -movflags +faststart "Little Cheeser 1936.mp4" Input #0, avi, from 'Little Cheeser 1936 raw.avi': Duration: 00:11:06.16, start: 0.000000, bitrate: 4157 kb/s Stream #0:0: Video: h264 (High 4:2:2) (H264 / 0x34363248), yuv422p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 3943 kb/s, 60 fps, 60 tbr, 60 tbn, 120 tbc Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s File 'Little Cheeser 1936.mp4' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv)) Stream #0:1 -> #0:1 (ac3 (native) -> aac (native)) Press [q] to stop, [?] for help Impossible to convert between the formats supported by the filter 'Parsed_hwupload_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 #0:0 bench: maxrss=60096kB Conversion failed!
(我在报错前插入了一个空白行,方便定位)
我已经尝试过把视频滤镜流简化成只保留format=p010le,但还是遇到同样的失败。我也试过在命令中单独使用-pix_fmt p010le(不在视频滤镜里),同样会报错。我还把命令精简到最基础的形式,但问题依然存在。
我不明白为什么FFmpeg会在编码器信息里显示支持p010le,实际却用不了。有没有人能帮我理清这个问题?
备注:内容来源于stack exchange,提问作者Bart Lederman
相关产品推荐
相关产品推荐

