AVAssetWriter rotate buffer for video orientation
问题 I'm working on a live recording app in Swift using AVFoundation and I have an issue with the video orientation. I use AVAssetWriter and not AVCaptureMovieFileOutput because I need to record in square format (correct me if I'm wrong). I tried to use videoInput.transform but I heard that it is not supported in all video player. I can't use avcaptureconnection.videoOrientation based on the device orientation because there is some "Main UI thread stop". I read that the best solution is to rotate