It's kinda hard / nearly impossible to drop frames manually without screwing your video but you can configure your encoder like this
// in you initialisation code
NSError *err;
AVCaptureDevice* dev = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
[dev lockForConfiguration:&err];
[self configureCameraForFrameRate:dev frameRate:10];
[dev unlockForConfiguration];
- (void)configureCameraForFrameRate:(AVCaptureDevice *)device frameRate:(NSInteger)rate;
{
AVCaptureDeviceFormat *bestFormat = nil;
AVFrameRateRange *bestFrameRateRange = nil;
for ( AVCaptureDeviceFormat *format in [device formats] ) {
for ( AVFrameRateRange *range in format.videoSupportedFrameRateRanges ) {
if ( range.maxFrameRate > bestFrameRateRange.maxFrameRate ) {
bestFormat = format;
bestFrameRateRange = range;
}
}
}
if ( bestFormat ) {
device.activeFormat = bestFormat;
CMTime time = CMTimeMake(1, rate);
device.activeVideoMinFrameDuration = time;
//NSLog(@"%d %lld",bestFrameRateRange.minFrameDuration.timescale, bestFrameRateRange.minFrameDuration.value);
device.activeVideoMaxFrameDuration = time;
}
}
Not sure it's the best way to achieve this but ... ^^'