As described here , you can set the pixel buffer attributes in the output file of your QTCaptureSession to change the resolution of the captured video. For example:
[[[myCaptureSession outputs] objectAtIndex:0] setPixelBufferAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:480], kCVPixelBufferHeightKey,
[NSNumber numberWithInt:640], kCVPixelBufferWidthKey, nil]];
sets the resolution of the video to 640x480 for the first output in the capture session. It also needs to adjust the camera settings themselves in order to return image frames of this size (if supported by the camera hardware).
You can also use basic MPEG4 encoding instead of h.264 to record live video. This can be set using code similar to the following:
NSArray *outputConnections = [mCaptureMovieFileOutput connections];
QTCaptureConnection *connection;
for (connection in outputConnections)
{
if ([[connection mediaType] isEqualToString:QTMediaTypeVideo])
[mCaptureMovieFileOutput setCompressionOptions:[QTCompressionOptions compressionOptionsWithIdentifier:@"QTCompressionOptionsSD480SizeMPEG4Video"] forConnection:connection];
}
Codingh.264, especially the Quicktime implementation, uses much more processor power for encoding than basic MPEG4.
source
share