0

I'm pretty new to Python and trying to add a .gif file or .mp4 file before every image inserted into an .mp4 video file using MoviePy. The code below is adding .jpg files from a folder and putting them together into an .mp4 video that shows each image for 10 seconds then to the next image in the folder. However, I would like add a .gif or .mp4 file before each image.

Here's the code:

from moviepy.editor import *
from glob import glob


#MAKE MOVIE
def makeMovie():
clips = [ImageClip(clip).set_duration(10) for clip in glob("imagesfolder\*.jpg")] #This adds the images from folder together
#After every image added to the video add a .gif or .mp4 file after it

 video_clip = concatenate_videoclips(clips, method="compose")
 video_clip.write_videofile("memes.mp4", fps=24, remove_temp=True, codec="libx264", 
 audio_codec="aac")

makeMovie()

I want to do something like ==> clips = [ImageClip(clip).set_duration(10) for clip in glob("imagesfolder/*.jpg") + "duckanim0000-0079.mp4"]

Emossauce
  • 3
  • 3
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Oct 15 '22 at 02:59

0 Answers0