title: How to add static and dynamic overlays to video with AVAssetWriter?
body: <p>What's the right way to add an image overlay to a video created with AVAssetWriter?</p>
  
  <p>It's possible to do so with AVAssetExportSession, but this question is about how to do so with AVAssetWriter so there is more control over the quality and output.</p>
  
  <p>There are two scenarios:</p>
  
  <p>1) Simple: Add single overlay that is present the entire duration of the video (similar to a watermark).</p>
  
  <p>2) Complex: Add different overlays that animate in and out of the video at different times (similar to using AVVideoCompositionCoreAnimationTool).</p>