title: How to set preferredTransform in AV Foundation video file copy
body: <p>I am using AVAssetReader and AVAssetWriter to transcode video from one file to another. AVAssetReaderTrackOutput was added to the AVAssetReader. Unfortunately, the single track's  preferredTransform property was not copied from the input to the output, so a video recorded in portrait orientation is played back in landscape.</p>
  
  <p>How can I set the preferredTransform property in the output file?</p>