FFMPEG小白求助CUDA全硬件加速问题
dwing吧
全部回复
仅看楼主
level 7
xjq522240 楼主
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!
2021年03月19日 06点03分 1
level 7
xjq522240 楼主
这个全硬件加速是真的快,我软解码加硬解码1080P的速度基本在4-5X,用全硬件就16.X了Video Encode占用在80-91%,Video Decode占用30%左右(不知道还能不能提升)
2021年03月19日 06点03分 3
level 7
xjq522240 楼主
这些命令加进去也是可以的 -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
2021年03月19日 06点03分 4
level 7
xjq522240 楼主
有没有大佬哇
2021年03月19日 19点03分 5
吧务
level 14
解码的数据都在gpu上当然不能用cpu滤镜
2021年03月20日 11点03分 6
准确地说是在显存里,不是gpu(
2021年03月20日 11点03分
@Mr-Z♂ 那我得用什么指令才可以运行啊,有没有类似的介绍啊!
2021年03月20日 13点03分
level 5
似乎是因为解码->编码都是gpu运行,上面那些滤镜需要软件(cpu)执行,所以。。。
或许cuda有相应api但是没有合并到ffmpeg里面
2021年03月20日 13点03分 7
吧务
level 14
ffmpeg里面似乎也有几个gpu滤镜,但是我感觉应该不好用。建议用nvencc(github.com/rigaya/NvEnc)
2021年03月20日 15点03分 8
我是用的nvenc啊只解码加了cuvid,然后就报Impossible to convert between the formats supported by the filter 'Parsed_scale_cuda_0' and the filter 'auto_scaler_0'
2021年03月20日 17点03分
@xjq522240 nvencc≠h264_nvenc
2021年03月20日 23点03分
@qwe7989199 nvencc=?
2021年03月20日 23点03分
@xjq522240 纯硬编码的命令行工具,看层主链接
2021年03月21日 01点03分
1