我使用p4000卡和ffmpeg满足所有要求(驱动程序,工具包,cuda编译) 我想通过此命令在视频上添加水印
./bin/ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input.mp4 -i input.png -filter_complex "overlay=10:10" -c:v h264_nvenc 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'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #1:0
感谢您的建议
答案 0 :(得分:0)
-hwaccel cuvid
意味着解码后的帧将直接进入hw编码器(不能复制到系统内存中),因此此时无法向解码帧添加滤波器。尝试删除-hwaccel cuvid,但速度会很慢。 https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDACUVIDNVDEC