dwing吧 关注:5,620贴子:88,176
  • 6回复贴,共1

为何qsv里的scale_qsv不能使用

只看楼主收藏回复

ffmpeg -hwaccel qsv -i input.mp4 -vf scale_qsv=1280:720 -c:v h264_qsv -an output.mp4
会报Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'的错误
log里显示的scale_qsv部分是:
[Parsed_scale_qsv_0 @ 0000018bff490e00] Setting 'w' to value '1280'
[Parsed_scale_qsv_0 @ 0000018bff490e00] Setting 'h' to value '720'
[graph 0 input from stream 0:0 @ 0000018b807fef00] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0000018b807fef00] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0000018b807fef00] Setting 'time_base' to value '1/941235'
[graph 0 input from stream 0:0 @ 0000018b807fef00] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0000018b807fef00] Setting 'frame_rate' to value '941235/15703'
[graph 0 input from stream 0:0 @ 0000018b807fef00] w:1920 h:1080 pixfmt:yuv420p tb:1/941235 fr:941235/15703 sar:1/1
[format @ 0000018bff490f00] Setting 'pix_fmts' to value 'nv12|p010le|qsv'
[auto_scaler_0 @ 0000018bff1fa340] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0000018bff1fa340] w:iw h:ih flags:'bicubic' interl:0
[Parsed_scale_qsv_0 @ 0000018bff490e00] auto-inserting filter 'auto_scaler_0' between the filter 'graph 0 input from stream 0:0' and the filter 'Parsed_scale_qsv_0'
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0: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
是哪个步骤错了ma


IP属地:广东1楼2020-03-07 15:32回复
    输入前添加 -c:v h264_qsv (或别的qsv解码器,使用ffmpeg -decoders|findstr qsv查看)
    比如 ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mkv


    IP属地:福建3楼2020-03-07 18:02
    收起回复
      [AVHWDeviceContext @ 000002a59db60a40] Using D3D9Ex device.[AVHWDeviceContext @ 000002a59db60940] Initialize MFX session: API version is 1.28, implementation version is 1.20[AVHWDeviceContext @ 000002a59db60940] Error setting child device handle: -16
      这次提示-16这个错误了,我记得看qsvencc里好像提到过插了独显的话就不能使用d3d9的?


      IP属地:广东4楼2020-03-07 18:40
      回复
        ffmpeg -i "input" -init_hw_device qsv -filter_hw_device qsv0 -vf format=nv12,hwupload=extra_hw_frames=120,scale_qsv=w=960:h=720.....


        IP属地:广东5楼2020-03-15 01:45
        收起回复
          ffmpeg -probesize 100M -analyzeduration 100M -i "%~dp1%~nx1" -init_hw_device qsv -filter_hw_device qsv0 -c:v h264_qsv -preset slow -b:v 5M -vsync cfr -filter_complex format=nv12,hwupload=extra_hw_frames=120,deinterlace_qsv=mode=advanced,scale_qsv=w=960:h=720,hwdownload,format=nv12,colormatrix=bt470:bt709[v] -af aresample=async=1000:osf=flt -ac 2 -c:a aac -b:a 320k -map [v] -map 0:a:0 -max_muxing_queue_size 1024 "%~dp1%~nx1.mkv"
          这个亲测可用,我一般用来转DVD...


          IP属地:广东6楼2020-03-15 01:46
          回复