title: How would I put together a video using the AVAssetWriter in swift?
body: <p>I'm currently making a small app that timelapses the webcam on my mac, saves the captured frame to png, and I am looking into exporting the captured frames as a single video.</p>
  
  <p>I use CGImage to handle the original images and have them set in an array but I'm unsure on there to go from there. I gather from my own research that I have to use AVAssetWriter and AVAssetWriterInput somehow.</p>
  
  <p>I've had a look about on here, read the apple docs and searched google. But all the guides etc, are in obj-c rather than swift which is making it really difficult to understand (As I have no experience in Obj-C).</p>
  
  <p>Any help would be very much appreciated.</p>
  
  <p>Many Thanks,
  Luke.</p>