AVCaptureMovieFileOutput startRecordingToOutputFileURL:recordingDelegate:] Captureing Разрешение 1080p60 с кодеком ProRes на этом устройстве поддерживается только на внешнем запоминающем устройстве.
Это должно быть возможно, как и в других приложениях, таких как Blackmagic cam (https: //www.blackmagicdesign.com/ca/products/blackmagiccamera) позволяет это сделать.
Фрагменты кода ниже для справки:
Код: Выделить всё
do {
try self.videoDeviceInput.device.lockForConfiguration()
self.videoDeviceInput.device.activeFormat = self.videoDeviceInput.device.findFormat()!
self.videoDeviceInput.device.activeColorSpace = .appleLog
let frameRate = CMTimeMake(value: 1, timescale: 60)
self.videoDeviceInput.device.activeVideoMaxFrameDuration = frameRate
self.videoDeviceInput.device.activeVideoMinFrameDuration = frameRate
self.videoDeviceInput.device.unlockForConfiguration()
} catch {
print("Could not lock device for configuration: \(error)")
}
Код: Выделить всё
// Start recording video to a temporary file.
let outputFileName = NSUUID().uuidString
let outputFilePath = (NSTemporaryDirectory() as NSString).appendingPathComponent((outputFileName as NSString).appendingPathExtension("mov")!)
movieFileOutput.startRecording(to: URL(fileURLWithPath: outputFilePath), recordingDelegate: self)
Подробнее здесь: https://stackoverflow.com/questions/776 ... ternal-app