title: How to concatenate videos in moviepy?
body: <p>I am trying to use moviepy to generate video with texts. First, I want to show one messages and then another one. In my case I want to show "Dog" for one second and than "Cat Cat". For that I use the following code:</p>
  
  <p>from moviepy.editor import *</p>
  
  <pre><code>def my_func(messeges):
  
      clips = {}
      count = 0
      for messege in messeges:
          count += 1
          clips[count] = TextClip(messege, fontsize=270, color='green')
          clips[count] = clips[count].set_pos('center').set_duration(1)
          clips[count].write_videofile(str(count) + '.avi', fps=24, codec='mpeg4')
  
      videos = [clips[i+1] for i in range(count)]
      video = concatenate(videos)
      video.write_videofile('test.avi', fps=24, codec='mpeg4')
  
      video = VideoFileClip('test.avi')
      video.write_gif('test.gif', fps=24)
  
  if __name__ == '__main__':
  
      ms  = []    
      ms += ['Dog']
      ms += ['Cat Cat']
      my_func(ms)
  </code></pre>
  
  <p>This is the result that I get:</p>
  
  <p><img src="https://i.stack.imgur.com/4e1Xm.gif" alt="enter image description here"></p>
  
  <p>Does anybody know why do I have problems with cats?</p>