mafioso mafioso - 6 months ago 51
iOS Question

How to take high quality videos/photos in swift?

How can I improve the camera quality? I want to take a pic/vid that shows up in fullscreen? If I set the session preset to AVCaptureSessionPresetPhoto it's high quality and fullscreen but just for photos and not for videos. I've tried everything else but nothing works.
Currently, it looks like this:

enter image description here


Use AVCaptureSessionPresetHigh

Then you need to set you video gravity for full screen to work.

captureVideoPreviewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;