Ffmpeg video watermarking

2021-08-03 / 4 Comments / 390 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

Watermark removal
 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

 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 mp4

Source video preview:

 expression Video preview to remove watermark:


Comments (4)

  1.  head portrait
    Android · Google Chrome

    The certificate is out of date, boss

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

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

  2.  head portrait
    Windows 10 · Google Chrome

    Ha ha ha, learn about it~~~

  3.  head portrait
    Android · Google Chrome

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