Simulate AVLayerVideoGravityResizeAspectFill: crop and center video to mimic preview without losing sharpness
问题 Based on this SO post, the code below rotates, centers, and crops a video captured live by the user. The capture session uses AVCaptureSessionPresetHigh for the preset value, and the preview layer uses AVLayerVideoGravityResizeAspectFill for video gravity. This preview is extremely sharp. The exported video, however, is not as sharp, ostensibly because scaling from the 1920x1080 resolution for the back camera on the 5S to 320x568 (target size for the exported video) introduces fuzziness from