In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to achieve FFmpeg multi-grid, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Let's use the FFmpeg command line to achieve the multi-grid effect of the picture! When it comes to the multi-grid, I believe our first reaction is the nine-grid, but because using the FFmpeg command line to achieve the parameters of the nine-grid is really too bloated, the effect of realizing the four-grid in our case is cool enough! All right, let's get back to business:
Command line parameters
Ffmpeg-re-I test.mp4-filter_complex "nullsrc=size=1920x1080 [base]; [0VV] setpts=PTS-STARTPTS,scale=960x540 [upperleft]; [1test.mp4 v] setpts=PTS-STARTPTS,scale=960x540 [upperright]; [2test.mp4 v] setpts=PTS-STARTPTS,scale=960x540 [lowerleft]; [3test.mp4 v] setpts=PTS-STARTPTS,scale=960x540 [lowerright]; [base] [upperleft] overlay=shortest=1 [tmp1]; [tmp1] [upperright] overlay=shortest=1:x=960 [tmp2] [tmp2] [lowerleft] overlay=shortest=1:y=540 [tmp3]; [tmp3] [lowerright] overlay=shortest=1:x=960:y=540 "- CVR v libx264 out_ 1080p.mp4II, parameter interpretation-re-I: in the process of implementing multiple grids, this means multiple inputs, followed by the video file name.
-filter_complex: indicates the use of a composite filter, followed by the specific parameters of the filter in quotation marks
Nullsrc: understand it as a canvas, that is, we want to draw all the videos on the canvas and specify its size in the parameters.
[upperleft]: indicates the parameter of the nth video, setpts indicates the setting method of pts, scale indicates the zoom size of the video, and [upperleft] indicates the tag corresponding to the nth video. In this case, n is 0min1, 1, 2, 3 next, please take a closer look:
First of all, add the content of [upperleft] to [base], and use the overlay filter to create a new tag tmp1 when the filter superimposed starting position is (0memo) (left empty defaults to origin).
Based on [tmp1], use overlay to stack with [upperright] again to generate the tag [tmp2].
Based on [tmp2], use overlay with [lowerleft] to generate tags [tmp3]; based on [tmp3], use overlay with [lowerright] to stack again, and all four tags are built. -CRARV points out how to encode the synthesized video. 3. In actual combat, due to the bloated parameters, it will not be typed one by one. Let's take a look at the effect of the command execution:
Fourth, the effect is good, this is the end of today's issue, welcome friends to come next time, and don't forget to practice a lot! On how to achieve FFmpeg multi-grid to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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: 257
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.