def test_afterimage(): ai = ImageClip("media/afterimage.png") masked_clip = mask_color(ai, color=[0, 255, 1]) # for green some_background_clip = ColorClip((800, 600), color=(255, 255, 255)) final_clip = CompositeVideoClip([some_background_clip, masked_clip], use_bgclip=True).with_duration(0.2) final_clip.write_videofile(os.path.join(TMP_DIR, "afterimage.mp4"), fps=30)
def test_afterimage(): ai = ImageClip("media/afterimage.png") masked_clip = mask_color(ai, color=[0,255,1]) # for green some_background_clip = ColorClip((800,600), color=(255,255,255)) final_clip = CompositeVideoClip([some_background_clip, masked_clip], use_bgclip=True) final_clip.duration = 5 final_clip.write_videofile( os.path.join(TMP_DIR, "afterimage.mp4"), fps=30)
def test_afterimage(): ai = ImageClip("media/afterimage.png") masked_clip = mask_color(ai, color=[0, 255, 1]) # for green some_background_clip = ColorClip((800, 600), color=(255, 255, 255)) final_clip = CompositeVideoClip([some_background_clip, masked_clip], use_bgclip=True) final_clip.duration = 5 final_clip.write_videofile("/tmp/afterimage.mp4", fps=30)
def test_afterimage(): with ImageClip("media/afterimage.png") as ai: masked_clip = mask_color(ai, color=[0, 255, 1]) # for green with ColorClip((800, 600), color=(255, 255, 255)) as some_background_clip: with CompositeVideoClip([some_background_clip, masked_clip], use_bgclip=True) as final_clip: final_clip.duration = 5 final_clip.write_videofile(os.path.join( TMP_DIR, "afterimage.mp4"), fps=30)
def mask(): meme_clip_loc = os.path.join(os.path.dirname(__file__), "videos/kickdoor.mp4") main_clip = VideoFileClip(meme_clip_loc) main_clip = mask_color.mask_color(main_clip, [110, 246, 24], 5)