Code below works well except one thing. While zooming out it start from the original image size and scale it down so there is black space on the edges.
How to implement zooming out effect without "black space"?
from moviepy.editor import *
def zoomOut(t):
return 1 - 0.03 * t # Zoom-in.
def zoomIn(t):
return 1 + 0.03 * t # Zoom-in.
ImageClip(img_file)
.resize(zoomIn) #.resize(zoomOut)
.set_position(('center', 'center'))
.set_duration(2)
vid = concatenate(slides, method="compose")
vid.write_videofile('test.mp4', fps=24)