I need to process each frame of the captured video frame, although it AVCaptureDevice.formatsprovided so many different frame sizes, it seems that it AVCaptureSessionsupports only those frame sizes that are defined in the presets.
I also tried to install AVCaptureDevice.activeFormatbefore AVCaptureInputDeviceor after, no matter what setting I set, if I set AVCaptureSessionPresetHighto AVCaptureSession, it always gives me a 1280x720 frame. Similarly, if I set AVCaptureSessionPreset640x480, then I can only get a frame size of 640x480.
So, how can I set my own video fragment size, for example 800x600? Using Media Foundation under windows or V4L2 under Linux, it is easy to set any custom frame size when capturing.
It seems impossible to do under Mac.
source
share