AVAssetWriter ignores transform value AVAssetWriter ignores transform value xcode xcode

AVAssetWriter ignores transform value


I record in portrait mode only and i was able to avoid this issue by getting rotated pixel data directly from the camera using setVideoOrientation on the AVCaptureConnection to pass to AVAssetWriter (see https://developer.apple.com/library/ios/qa/qa1744/_index.html)

for (AVCaptureConnection *connection in [videoOutput connections] ) {            for ( AVCaptureInputPort *port in [connection inputPorts] ) {                if ( [[port mediaType] isEqual:AVMediaTypeVideo] ) {                    [connection setVideoOrientation:AVCaptureVideoOrientationPortrait];                }            }}