I am trying to overlay an image on a base video. This is currently the code I have:
clip = VideoFileClip("base_video.mp4")
cat = (ImageClip("title.png")
.set_start(0) #which second to start displaying image
.set_duration(4) #how long to display image
.set_position(("center", "center")))
clip = CompositeVideoClip([clip, cat])
clip.write_videofile("asdf.avi",fps=24, codec='rawvideo')
I found this code on reddit and it seems to work but it converts the mp4 file to an avi file (I tried changing the ".avi" to ".mp4" and it doesn't work). Was wondering if there was another way to do so while keeping the mp4 file type.
Thank you so much in advance!