dwing吧 关注:5,623贴子:88,220
  • 13回复贴,共1

FFMPEG小白求助CUDA全硬件加速问题

只看楼主收藏回复

ffmpeg -y -vsync 0 -hwaccel_device 0 -hwaccel cuvid -hwaccel_output_format cuda -ss 00:00:00 -to 00:02:00 -accurate_seek -i input.mp4 -c:v h264_nvenc -profile:v main -level 4.2 -crf 0 -vb 4000K -tune flim -gpu 1 -threads 8 -2pass 1 -vf scale_cuda=1920:1080 output.mp4
这个命令是可以正常运行的,但是不能加翻转,锐化,EQ等指令,一加就报错,求大佬看看怎么解决!
Impossible to convert between the formats supported by the filter 'Parsed_scale_cuda_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
[aac @ 000001c73baf7840] Qavg: 214.372
[aac @ 000001c73baf7840] 2 frames left in the queue on closing
Conversion failed!


IP属地:上海1楼2021-03-19 14:18回复
    这个全硬件加速是真的快,我软解码加硬解码1080P的速度基本在4-5X,用全硬件就16.X了Video Encode占用在80-91%,Video Decode占用30%左右(不知道还能不能提升)


    IP属地:上海3楼2021-03-19 14:25
    回复
      这些命令加进去也是可以的 -qmin 0 -g 250 -bf 3 -b_ref_mode middle -temporal-aq 1 -rc-lookahead 20 -i_qfactor 0.5 -b_qfactor 1.1 -rc vbr_hq -spatial_aq 1


      IP属地:上海4楼2021-03-19 14:25
      回复
        有没有大佬哇


        IP属地:上海5楼2021-03-20 03:51
        回复
          解码的数据都在gpu上当然不能用cpu滤镜


          IP属地:福建来自Android客户端6楼2021-03-20 19:19
          收起回复
            似乎是因为解码->编码都是gpu运行,上面那些滤镜需要软件(cpu)执行,所以。。。
            或许cuda有相应api但是没有合并到ffmpeg里面


            IP属地:四川7楼2021-03-20 21:39
            回复
              ffmpeg里面似乎也有几个gpu滤镜,但是我感觉应该不好用。建议用nvencc(github.com/rigaya/NvEnc)


              IP属地:福建来自Android客户端8楼2021-03-20 23:08
              收起回复