title: Exporting Multiple Tracks: AVMutableComposition and AVAssetExportSession
body: <p>I have 4 videos files which I have edited and added to a mutable composition. I am trying to use the export session to export the files, however, when I am exporting, only the first track in the list of tracks below gets exported</p>
  
  <pre><code>&lt;AVAssetExportSession: 0x60800001da50, asset = &lt;AVMutableComposition: 0x6080002240a0 tracks = (
      "&lt;AVMutableCompositionTrack: 0x600000224ca0 trackID = 1, mediaType = vide, editCount = 8&gt;",
      "&lt;AVMutableCompositionTrack: 0x600000226da0 trackID = 2, mediaType = vide, editCount = 10&gt;",
      "&lt;AVMutableCompositionTrack: 0x60000023e180 trackID = 3, mediaType = vide, editCount = 3&gt;",
      "&lt;AVMutableCompositionTrack: 0x60000023e500 trackID = 4, mediaType = vide, editCount = 7&gt;"
  )&gt;, presetName = AVAssetExportPreset1280x720, outputFileType = (null)
  </code></pre>
  
  <p>Only the first track with trackID = 1 gets exported. Here is the export session source:</p>
  
  <pre><code>   // Create path to output file
      NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
      NSString *documentsDirectory = [paths objectAtIndex:0];
      NSString *myPathDocs =  [documentsDirectory stringByAppendingPathComponent:
                               [NSString stringWithFormat:@"ProcessedVideo-%d.mov", arc4random() % 1000]];
      NSURL *url = [NSURL fileURLWithPath:myPathDocs];
  
      AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset:batchComposition presetName:AVAssetExportPreset1280x720];
  
      NSLog(@"%@", exporter);
  
      exporter.outputURL = url;
      exporter.outputFileType = AVFileTypeQuickTimeMovie;
  
      [exporter exportAsynchronouslyWithCompletionHandler:^(void) {
          switch (exporter.status) {
              case AVAssetExportSessionStatusCompleted:
                  NSLog(@"Completed");
                  break;
              case AVAssetExportSessionStatusFailed:
                  NSLog(@"Failed:%@",exporter.error);
                  break;
              case AVAssetExportSessionStatusCancelled:
                  NSLog(@"Canceled:%@",exporter.error);
                  break;
              default:
                  break;
          }
      }];
  </code></pre>
  
  <p>Does anyone have any ideas how I can get all 4 tracks to export to a single .mov file using export session?</p>