FFmpeg 在使用 png、视频、绘制文本创建输入时遇到问题

FFmpeg getting issue while creating input with png ,video,draw text

我收到以下命令的错误“无法在过滤器 Parsed_drawtext_3 上找到未标记的输入板 0 的匹配流”,我不知道哪里出错了。谁能帮忙解决这个问题?

ffmpeg -i test.png -i test.mp4 -y -filter_complex [1:v]scale=1152:648[scale0];[scale0]rotate=0:c=black@0:ow=rotw(0):oh=roth(0)[rotate0];[0:v][rotate0]overlay=304.2:172.29;drawtext=fontfile=test.ttf:text=hi text:fontsize=40:fontcolor=white:x=426.05:y=852.04 -pix_fmt yuv420p est.mp4
ffmpeg -y -i test.png -i test.mp4 -filter_complex "[1:v]scale=1152:648,rotate=0:c=black@0:ow=rotw(0):oh=roth(0)[rotate0];[0:v][rotate0]overlay=304.2:172.29,drawtext=fontfile=test.ttf:text='hi text':fontsize=40:fontcolor=white:x=426.05:y=852.04,format=yuv420p" est.mp4
  • 用逗号加入simple filters。这样就形成了一个过滤器链。
  • 使用分号 (;) 加入过滤器链或 complex filters
  • 用双引号 (") 将过滤图(完整的过滤器行)和单引号 (') 中的绘图文本 text 包裹起来。