In the application that I am developing, I would like to allow the user to choose the resolution of the video recording. Due to the specification, I cannot use the AVCaptureSessionPreset constants.
Obtaining a list format has a resolution above 3000 pixels, which, of course, cannot work for capturing video, but only for taking pictures.
AVCaptureDeviceFormat: 0x17020c830 'vide' / '420f' 3264x2448, {2-30 fps}, HRSI: 3264x2448, fov: 58.040, max. zoom: 153.00 (upscales @ 1.00), AF System: 2, ISO: 29.0-1856.0, SS: 0.000013-0.500000
I cannot find a way to see if a particular format is suitable for video recording.
The problem is that with this resolution, if I try to capture a video, the application throws an exception saying that there is no active or activated connection.
- [AVCaptureMovieFileOutput startRecordingToOutputFileURL: recordDelegate:] - no active / activated connections.
I also do not want to restrict hard limits for each type of device.
I also can not limit the restriction to AVCaptureSessionPresetHigh , because, as noted in Apple's note , is not the maximum maximum format.
Is there a way to figure out if AVCaptureDeviceFormat is suitable for capturing video?
ios avfoundation avcapturesession
Andrea
source share