q770787217
V2EX  ›  FFmpeg

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

  •  
  •   q770787217 · Oct 9, 2020 · 3341 views
    This topic created in 2055 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   ·   4773 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 466ea39e · 33ms · UTC 04:02 · PVG 12:02 · LAX 21:02 · JFK 00:02
    ♥ Do have faith in what you're doing.