ffmpeg 前100帧不显示图片水印,请问是什么情况?

醉马踏千秋 2020-05-13 04:08:40

ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=x='if(eq(mod(n\,100)\,0),100,x)':y='150'" -c:a copy -y output.mp4


按理来说,n如果为第50帧,那么mod(50,\100) 余数应该为 50,eq(50\,0)返回的应该是0(false),即:会执行x = x,但是这里的x是什么呢?NAN?
这个该怎么改?
求大神~
...全文
178 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
醉马踏千秋 2020-05-15
  • 打赏
  • 举报
回复
引用 1 楼 ArcRain 的回复:
参考文档的参数说明:https://ffmpeg.org/ffmpeg-filters.html#overlay-1 x y Set the expression for the x and y coordinates of the overlaid video on the main video. Default value is "0" for both expressions. In case the expression is invalid, it is set to a huge value (meaning that the overlay will not be displayed within the output visible area). x,y代表了水印位置的坐标位置。默认为0。如果表达式无效,会被设置为一个很大的数字(意味着水印会在可视区域以外而不会显示了)
那么这个怎么改?我看不错哪里有问题诶~
ArcRain 2020-05-13
  • 打赏
  • 举报
回复
参考文档的参数说明:https://ffmpeg.org/ffmpeg-filters.html#overlay-1 x y Set the expression for the x and y coordinates of the overlaid video on the main video. Default value is "0" for both expressions. In case the expression is invalid, it is set to a huge value (meaning that the overlay will not be displayed within the output visible area). x,y代表了水印位置的坐标位置。默认为0。如果表达式无效,会被设置为一个很大的数字(意味着水印会在可视区域以外而不会显示了)

2,543

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧