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.
How can I set the preferredTransform property in the output file?