shinjico
帖子: 5
注册时间: 2012-02-19 17:09

ffmpeg在使用n卡硬解加速的时候,为何无法使用-vf滤镜

平时用ffmpeg来快转一些视频,使用这个命令,pascal可以达到170fps左右

代码: 全选

ffmpeg -i  <input>  -vf scale=1280:720,deband -vcodec hevc_nvenc -pix_fmt p010le -preset slow -level 4.1 -cq 18 <output.hevc>
最近弄了点4k 60fps hevc测试,发现cpu软解太慢,想要用显卡来硬解加速,于是加了一段代码

代码: 全选

ffmpeg -hwaccel cuvid -c:v hevc_cuvid  -i  <input>  -vf scale=1280:720,deband -vcodec hevc_nvenc -pix_fmt p010le -preset slow -level 4.1 -cq 18 output.hevc
使用之后ffmpeg提示滤镜无法使用

Stream mapping:
Stream #0:0 -> #0:0 (hevc (hevc_cuvid) -> hevc (hevc_nvenc))
Press [q] to stop, [?] for help
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
Conversion failed!

问题出在哪里,求解?.......
myfreer
帖子: 11
注册时间: 2017-03-02 15:16

Re: ffmpeg在使用n卡硬解加速的时候,为何无法使用-vf滤镜

去掉-c:v hevc_cuvid
cylx
帖子: 32
注册时间: 2017-03-03 21:47

Re: ffmpeg在使用n卡硬解加速的时候,为何无法使用-vf滤镜

代码: 全选

ffmpeg -c:v hevc_cuvid -i input -c:v hevc_nvenc -vf scale=1280:720,deband -pix_fmt p010le output

回到 “视频编码器 / Video encoder discussion”