In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces FFmpeg how to make card video, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.
Scripting language articles
Php,python,go can be used as a scripting language to deal with program logic, here I choose go, the advantage is that go supports multithreading at the language level, speeding up the processing speed of the program.
Step on the pit: go run main.go prompts undefined, but go build, and then runs the compiled file, no problem.
If there are multiple go files under the main package, you should use go run a.go b.go c.go or go run *. Go to run it, and compile in the same way
With go run main.go, the compiler will only load the main.go file, not other files in the main package. Only files in non-main packages will be loaded automatically through dependencies. So you need to enter multiple files as parameters
two。 The trample point program has been running very slowly, and then many script commands will be executed quickly with multithreading.
Wg: = & sync.WaitGroup {} app: = new (models.Process) for I: = 0; I < 50; iTunes + {wg.Add (1) go func (wg * sync.WaitGroup, I int) {xxx wg.Done ()} (wg, I)} wg.Wait () Video processing
1. The picture is unified into one size.
Convert-resize 720x1280 ^-gravity Center-crop 720x1280+0+0 from.jpg to.jpg
two。 If you add a text mask to the picture
/ / compose:args=70x90 transparency is set to / / if the mask is png, the generated mask must also be png, otherwise the image will blur convert from.jpg-compose dissolve-define compose:args=70x90 cover.png-geometry 720x1280+0+0-composite to.png
3. The combination of photos and music to form a card video requires the generation of an indexed txt file.
File 'z1.png'duration 1.989file' z2.png'duration 0.485file 'z3.png'duration 0.468file' z4.png'duration 0.485
And then
Ffmpeg-y-I bmg.mp3-f concat-safe 0-I 1.txt-vsync vfr-pix_fmt yuv420p-vf fps=10 out.mp4
4. To add an ending ad picture, you need a picture to generate a video
Ffmpeg-f image2-stream_loop 10-I. / over.jpg-libx264 v libx264-vf fps=10-pix_fmt yuv420p-t 1-y single_jpg.mp4
5. Multiple methods for merging multiple video connections into one reference FFMpeg lossless merging video
FFmpeg concat separator
This method has a high success rate and is the best, but requires FFmpeg version 1.1 or above. First create a text file filelist.txt, and then use for to loop out the following:
File 'input1.mkv'file' input2.mkv'file 'input3.mkv'
And then
/ / the-c copy parameter is removed here, and the first black screen / / merged video must be the same fpsffmpeg-f concat-I filelist.txt output.mkv.
Convert a single picture to video
Ffmpeg-f image2-stream_loop 75-I. / 22.png-libx264 v libx264-vf fps=10-pix_fmt yuv420p-t 10-y single_jpg.mp4 on how to make card points video sharing 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: 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.
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.