I have a simple video editing view that uses AVPlayer. I create a AVMutableComposition using one or several AVURLAsset. All works fine but the videos are always rotated 90 degrees. i.e. if the source video was taken in portrait mode. AVPlayer shows it in landscape mode and vice versa. I have gone through the documentation and "goolgled" it to death and can't find a solution. MAybe I'm looking in the wrong places.
Can anyone help?
Thanks in Advance;
Jean-Pierre
Without having the code to examine, it is difficult to know what is going on... But most probably, your issue is caused because you are losing the value of your
preferredTransform
property.All
AVAssetTrack
objects have apreferredTransform
property that is used to specify if videos should be rotated or not. If you are creating newAVMutableAssetTrack
objects, you might need to set the value of that property so the video stays in the intended orientation.