title: AVAssetWriter can merge two video files
body: <p>Do not tell me to use AVAssetExportSession, thank you.</p>
  
  <p>I tried this, but failed.</p>
  
  <pre><code>for (int i =0; i &lt; count; i++) {
  
          assetWriterInput = nil;
          assetWriterInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:videoSettings];
  
          NSParameterAssert(assetWriterInput);
          NSParameterAssert([assetWriter canAddInput:assetWriterInput]);
  
          [assetWriterInput setExpectsMediaDataInRealTime:YES];
          [assetWriter addInput:assetWriterInput];
  }        
  [assetWriter startWriting];
  </code></pre>