Ffmpeg video watermarking

 September
2021-08-03 / 4 Comments / 150 reading / Checking for inclusion

 ffmpeg_ test.png

Install ffmpeg

Centos 7

 **Install the EPEL release. Because the installation needs to use other repo sources, it needs to be supported by EPEL sudo yum install -y epel-release rpm **If there is a missing code prompt, execute this command sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7  **Import a code sudo rpm --import  http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro  **Install the nux dextop source sudo rpm -Uvh  http://li.nux.ro/download/nux/dextop/el7/x86_ 64/nux-dextop-release-0-1.el7.nux.noarch.rpm **Install ffmpeg sudo yum install -y ffmpeg **Check whether ffmpeg is successfully installed, and the version of ffmpeg will be displayed ffmpeg -version

Ffmpeg de watermarking

Generate a frame image of the video

 INFILE=FFmpeg_ music_ mv.mp4 ffmpeg -hide_ banner -ss 3 -y -i "${INFILE}" -f image2 -vframes 1 ${INFILE}.jpg **Ffmpeg-music-mv.mp4 is the video in the current directory **The current directory obtains a frame image ffmpeg-music-mv.mp4.jpg

Get watermark coordinates
reference resources: ffmpeg-watermark-position-extraction-tools

Open web page Upload the image obtained above, and manually move the mask to the watermark position [size] to cover the watermark

Command: area will generate commands (only capture the content of the video for 15 seconds)
ffmpeg -hide_ Banner - loglevel error - Y - I source video name. MP4 - VF delogo = x = 771: y = 20: w = 144: H = 58: Show = 0 - t 15 output name of watermark. Mp4

De watermark
 INFILE=FFmpeg_ music_ Mv.mp4 source video ffmpeg -hide_ banner -loglevel error -y -i FFmpeg_ music_ mv.mp4 -vf delogo=x=771:y=20:w=144:h=58:show=0 -t 15 222.mp4

Complete content removal time parameters: -t 15
command

 Infile = source video.mp4 ffmpeg -hide_ Banner - loglevel error - Y - I source video. MP4 - VF delogo = x = 240: y = 446: w = 256: H = 114: Show = 0 after processing. Mp4

Source video preview:

 expression Video preview to remove watermark:

two

Comments (4)

cancel
  1.  head portrait
    Dark
    Android · Google Chrome

    The certificate is out of date, boss

    reply
    1.  head portrait
      September author
      Windows 10 · Google Chrome
      @ Dark

      All right, boss. We'll take care of it right away

      reply
  2.  head portrait
    webroam
    Windows 10 · Google Chrome

    Ha ha ha, learn about it~~~

    reply
  3.  head portrait
    Dark
    Android · Google Chrome

    I don't know what happened to those white whoring factory videos expression

    reply