Hi I want to setup AV
capture session to capture images with specific resolution (and, if possible, with specific quality) using iphone camera. here\'s setuppi
Refer to Apple's guide Capturing Still Images section regarding which sizes you'll get if you set one or another preset.
The parameter you should change is captureSession.sessionPreset
Try to go with something like this where cx and cy are your custom resolutions:
NSDictionary *videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:
AVVideoScalingModeResizeAspectFill,AVVideoScalingModeKey,
AVVideoCodecH264, AVVideoCodecKey,
[NSNumber numberWithInt:cx], AVVideoWidthKey,
[NSNumber numberWithInt:cx], AVVideoHeightKey,
nil];
_videoInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:videoSettings];