title: Difference between clip.to_videofile and clip.write_videofile
body: <p>what is the difference between <code>clip.to_videofile</code> and <code>clip.write_videofile</code>?  </p>
  
  <p>Do they have any effect on the frames of a CompositeVideoClip?   </p>
  
  <p>i wrote a code:</p>
  
  <pre><code>video=CompositeVideoClip([clip1,clip2.set_start(dur)] 
  video.write_videofile("video.mp4",fps=clip1.fps) # or video.to_videofile("video.mp4",fps=clip1.fps)
  clip=VideoFileClip("video.mp4")
  video.save_frame("frame1.png")
  clip.save_frame("frame2.png") 
  from PIL import Image
  import numpy as np
  im1=Image.open("frame1.png")
  image1=np.asarray(im1)
  im2=Image.open("frame2.png")
  image2=np.asarray(im2)
  </code></pre>
  
  <p>when i compared the two arrays image1 and image2, they were not the same...Can anyone explain me why does this happen? and what do i do if i have keep the frame from getting changed when i write a composite clip into a video?</p>