title: Why does AVAssetExportSession produce an empty file?
body: <p>I'm trying to export a .mov file from a source video created by UIImagePickerController. The problem is that the output file AVAssetExportSession creates is only 668 bytes. Why is it failing? my code:</p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
  {
      NSURL *imagePickerVideoURL = [info objectForKey:UIImagePickerControllerMediaURL];
      NSString *filename = @"vid1.mov";
  
      AVAsset *video = [AVAsset assetWithURL:imagePickerVideoURL];
      AVAssetExportSession *exportSession
        = [AVAssetExportSession exportSessionWithAsset:video presetName:AVAssetExportPresetMediumQuality];
      exportSession.shouldOptimizeForNetworkUse = YES;
      exportSession.outputFileType = AVFileTypeQuickTimeMovie;
      exportSession.outputURL = [pathToSavedVideosDirectory URLByAppendingPathComponent:filename];
      NSLog(@"processing video...: %@", exportSession);
      [exportSession exportAsynchronouslyWithCompletionHandler:^{
                         NSLog(@"done processing video!");
                     }];
  }
  </code></pre>