“The End” effect

So let’s explain this one: there is a clip with “The End” written in the middle, and above this clip there is the actual movie. The actual movie has a mask which represents a white (=opaque) circle on a black (=transparent) background. At the begining, that circle is so large that you see all the actual movie and you don’t see the “The End” clip. Then the circle becomes progressively smaller and as a consequence you see less of the actual movie and more of the “The End” clip.

from moviepy.editor import *
from moviepy.video.tools.drawing import circle

clip = VideoFileClip("../../videos/badl-0006.mov", audio=False).\
w,h = clip.size

# The mask is a circle with vanishing radius r(t) = 800-200*t               
clip.mask.get_frame = lambda t: circle(screensize=(clip.w,clip.h),
                                       col1=1, col2=0, blur=4)

the_end = TextClip("The End", font="Amiri-bold", color="white",

final = CompositeVideoClip([the_end.set_pos('center'),clip],
                           size =clip.size)