imaginary-cloud/CameraManager

Recorded video Rotates automatically when preview

aiyub007 opened this issue · 1 comments

cameraManager.cameraOutputQuality = .iFrame960x540

using this cameraOutputQuality

When I check in the folder video is a portrait but when I preview the video it gives me landscape always
and for the asset, if portrait video it shows me wrong dimensions [w = 960 x height = 540]
I am facing the issue on ios 14.2 and in iPhone 11

let layerInstruction: AVMutableVideoCompositionLayerInstruction = AVMutableVideoCompositionLayerInstruction(assetTrack: videoTrack)
        if needToApplyFix {
            layerInstruction.setTransform(videoTrack.preferredTransform, at: .zero)
        }

Solved it!!!``