FFmpeg 添加水印

发布时间:2020-06-28 19:36:35 作者:fengyuzaitu
来源:网络 阅读:1029

在左上角添加水印fengyuzaitu
ffmpegd.exe -i video.mp4 -vf drawtext=fontfile=arial.ttf:text=fengyuzaitu output.mp4


居中添加水印fengyuzaitu
ffmpegd.exe -i video.mp4 -vf drawtext=fontfile=arial.ttf:x=w/2:y=h/2:text=fengyuzaitu output.mp4


指定水印颜色和宽度
ffmpegd.exe -i video.mp4 -vf drawtext=fontfile=arial.ttf:x=w/2:y=h/2:fontsize=24:fontcolor=yellow:text=fengyuzaitu output.mp4


添加当前时间戳
ffmpegd.exe  -i video.mp4 -vf drawtext="fontfile=arial.ttf:text='%{localtime\:%H\\\:%M\\\:%S}'" output.mp4


遇到问题
[Parsed_drawtext_0 @ 0000015FE818EE80] Cannot find a valid font for the family Sans
[AVFilterGraph @ 0000015FE6473A80] Error initializing filter 'drawtext' with args 'fontfile=arial.ttf:text=fengyuzaitu'
Error reinitializing filters!
Failed to inject frame into filter network: No such file or directory
Error while processing the decoded data for stream #0:1


解决
拷贝C:\Windows\Fonts目录下需要的字体到程序执行的目录下


推荐阅读:
  1. ffmpeg 去除图片中的水印
  2. ffmpeg命令解析

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

ffmpeg filter ffm peg

上一篇:移动端position:fixed小结

下一篇:源码编译安装LAMP环境

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》