Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use FFmpeg to add watermark to video

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to use FFmpeg to add watermark for video". In daily operation, I believe many people have doubts about how to use FFmpeg to add watermark for video. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful for you to answer the doubt of "how to use FFmpeg to add watermark for video". Next, please follow the editor to study!

I. preparatory work

Video files and environment preparation work, consistent with the previous, do not repeat! It is important to note that since it is a watermark, we need to prepare a picture to be used as a watermark (you can choose by yourself)!

Add watermark command

After the environment and documents are ready, you can do specific operations!

Manipulate the command line:

Ffmpeg-I 2_6.mp4-vf "movie=logo.png [wm]; [in] [wm] overlay=100:50 [out]" 2_6_out.mp4

After executing this command, you will get a video file named 2_6_out.mp4 with watermark effect! The effect is as follows:

III. Analysis of specific orders

-I: indicates the specified input file

-vf: sets the video filter (vf is the abbreviation for video filter)

"": in the above command, the contents in quotation marks are the contents of the specific filter

The specific content of the filter is explained:

The general format of the filter is: filter name = the specific content of the filter (there can be multiple)

The filter used in this example:

Movie:movie filter

Specific content of movie filter: logo.png [wm]; [in] [wm] (using logo.png, defined as tag [wm]; acting [wm] on [in] (that is, in input file))

Overlay:overlay filter

Overlay specific content: overlay=100: 50 [out] indicates the specific location in the filter. The original overlay=100:50 indicates that the watermark image starts from the video position of the horizontal 100pixel, vertical position of 50 pixels, defined as the tag out, and then acts on [wm] [in].

Output file: specify the output file name to include a suffix in the video format (e.g. .mp4)

At this point, the study on "how to use FFmpeg to add watermarks for video" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report