赞
踩
在时间轴上按前后顺序拼接,类似于接龙:
- from moviepy.editor import VideoFileClip, concatenate_videoclips
-
- if __name__ == '__main__':
- # Load First video
- clip1 = VideoFileClip("Sample1.mp4")
-
- # Load Second Video
- clip2 = VideoFileClip("Sample2.mp4")
-
- # Load third video
- clip3 = VideoFileClip("Sample3.mp4")
-
- # Merge video
- final_clip = concatenate_videoclips([clip1, clip2, clip3])
-
- # Save Merged video file
- final_clip.write_videofile("Front_inside_final.mp4")
在空间上按上下,或者按左右,或者按上下左右进行拼接,类似拼图:
- from moviepy.editor import VideoFileClip, clips_array, vfx
-
- if __name__ == '__main__':
-
- clip1 = VideoFileClip("clip_1.mp4").margin(10) # add 10px contour
- clip2 = VideoFileClip("clip_2.mp4").margin(10)
-
- # stacking video vertically
- final_clip
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。