MoviePy
样例
from moviepy.editor import *
clip = VideoFileClip("myHolidays.mp4").subclip(50,60)
clip = clip.volumex(0.8)
txt_clip = TextClip("My Holidays 2013",fontsize=70,color='white')
txt_clip = txt_clip.set_pos('center').set_duration(10)
video = CompositeVideoClip([clip, txt_clip])
video.write_videofile("myHolidays_edited.webm")
from moviepy.editor import VideoFileClip, concatenate_videoclips
clip1 = VideoFileClip("myvideo.mp4")
clip2 = VideoFileClip("myvideo2.mp4").subclip(50,60)
clip3 = VideoFileClip("myvideo3.mp4")
finalclip = concatenate_videoclips([clip1, clip2, clip3])
finalclip.write_videofile("my_concatenate.mp4")
from moviepy.editor import VideoFileClip, clips_array, vfx
clip1 = VideoFileClip("myvideo.mp4").margin(10)
clip2 = clip1.fx(vfx.mirror_x)
clip3 = clip1.fx(vfx.mirror_y)
clip4 = clip1.resize(0.6)
final_clip = clips_array([
[clip1, clip2],
[clip3, clip3]
])
final_clip.resize(width=480).write_videofile("my_stack.mp4")