In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
FFmpeg command line how to achieve video matting, in view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
How to use the FFmpeg command line to achieve video matting! Talk less, and then let's get down to business.
I. Preface
When it comes to matting, the first thing you may think of is the picture and the powerful PS (Photoshop). For video, you can also achieve matting, which can be achieved using the FFmpeg command line.
II. Orders
Ffmpeg-I in_1.mp4-I in_3.mp4-shortest-filter_complex "[1 out v] chromakey=red:0.3:0.9 [ckout]; [0 in_3.mp4 v] [ckout] overlay [out]"-map "[out]" output.mp4
III. Parameter interpretation
-I: specify the name of the input video file. Note that matting requires two video files.
-shortest: indicates encoding within the shortest input
-filter_complex: indicates the use of complex filters
Chromakey=red:0.3:0.9: chromakey is the core filter used in matting. The following parameters are used for matting. Interested friends can learn more chromakey chromaticity filters by themselves.
Overlay: the video of matting is combined with the destination video using overlay filter.
A description of the use of tags in the same grid.
IV. Material preparation
Two video files, one is used as the target video overlaid after matting, and the other has a more obvious background color, we matting in this video. The video used for matting measured by the author is made of two portrait photos with a red background in order to demonstrate a more intuitive effect. As shown below:
Target Video (in_1.mp4)
For matting video (in_3.mp4)
V. actual combat video
6. the effect of matting after merging.
All right, that's it for this issue, the old rule, go down and practice hard!
This is the answer to the question about how to achieve video matting on the FFmpeg command line. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.