V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
q770787217
V2EX  ›  FFmpeg

ffmpeg 怎么使用滤镜增加文字水印 ?

  •  
  •   q770787217 · Oct 9, 2020 · 3306 views
    This topic created in 2038 days ago, the information mentioned may be changed or developed.
    ffmpeg 怎么使用滤镜增加文字水印 ?
    下面这个命令是使用滤镜给视频加图片水印,怎么加文字水印 ?
    ffmpeg -i 1.mp4 -i 1.png ^ -filter_complex "pad=height=ih+40:color=#71cbf4,overlay=(main_w-overlay_w)/2:main_h-overlay_h" ^ birds3.mp4
    4 replies    2020-10-10 10:58:50 +08:00
    zjlletian
        1
    zjlletian  
       Oct 9, 2020
    把文字先做成图不就行了。。。。
    superrichman
        2
    superrichman  
       Oct 9, 2020 via iPhone
    ps 做一个透明的 png 图片 上面写几个文字
    fixmestan
        3
    fixmestan  
       Oct 10, 2020 via Android
    直接用 drawtext 滤镜,设置一下 alpha 参数,看起来应该和水印差不多吧
    snowwalf
        4
    snowwalf  
       Oct 10, 2020
    ffmpeg -i 01.mp4 -filter:v drawtext="fontfile=/System/Library/Fonts/NewYork.ttf:text='Hello World':[email protected]:fontsize=56:y=h-line_h-10:x=-text_w+(w+text_w)/10*mod(t\,10)" -codec:v libx264 -codec:a copy -y paomadeng-1.mp4
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1200 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 23:55 · PVG 07:55 · LAX 16:55 · JFK 19:55
    ♥ Do have faith in what you're doing.