from vidpy import Clip, Composition video = 'videos/hand1.mp4' clips = [] for i in range(0, 5): clip = Clip(video) # attempt to automatically remove background color # you can also specify a color with color='#00ff00' clip.chroma(amount=0.2) # start the clips 1/2 second after last clip clip.set_offset(i * 0.5) # change the clips x coordinate clip.position(x=(i * 100) - 300) # loop the clip 3 times clip.repeat(3) clips.append(clip) comp = Composition(clips, bgcolor='#ff4dff', duration=4) comp.save('chroma_overlay.mp4')
import glob from vidpy import Clip, Composition, Text clips = [] face_files = glob.glob("face*.mp4") start = 0 for f in face_files: clip = Clip(f) clip.set_offset(start) clip.repeat(20) clip.opacity(.5) clips.append(clip) start += .5 textclip = Text("Your faces look cool!", font="Comic Sans MS", color="#ff0000") clips.append(textclip) comp = Composition(clips) comp.preview() # clip1 = Clip("face-5.mp4") # clip1.repeat(50) # clip1.fx('frei0r.cartoon', {'0': .999}) # # comp = Composition([clip1]) # comp.preview() # clip2 = Clip("face-3.mp4") # clip1.repeat(100)