title: Why is my implementation of creating a movie in moviepy so inefficient?
body: <p>I am using moviepy, a python module for creating movies, to create movies of one pic of mike, followed by one pic of emily with a different song every 2 pictures. I implemented this in the following way:</p>
  
  <pre><code>clips = []
  for i in range(n):
      audio = AudioFileClip(audiofiles[i]).set_duration(10)
      video1 = ImageClip(images_mike[i]).set_duration(5)
      video2 = ImageClip(images_emily[i]).set_duration(5)
      video = concatenate([video1,video2],method='compose')
      movie.set_audio(audio)
      clips.append(movie)
  video = concatenate(clips,method='compose')
  video.write_videofile('my_movie.mp4')
  </code></pre>
  
  <p>audiofiles, is a list of audio filenames. images_mike and images_emily are each lists of image filenames. </p>
  
  <p>But this method is really really slow. video.write_videofile('my_movie.mp4') can take an hour to compile a 4 minute clip. Furthermore, I run into memory allocation errors when im trying to make a 10 minute clip. What is wrong with this implementation? Surely this isn't right.</p>
  
  <p>I don't know if this is relevant, but im on a laptop, with 16gb ram and i7 processor. </p>