I was writing an app that does some real-time video processing using an AVCaptureSession with a AVCaptureVideoDataOutput as output and an AVCaptureDeviceInput with the camera as input. Then the requirements changed, and now I need to save the video file as it comes in, and process the video (it no longer needs to be in real-time)
Is it possible to either a) attach an AVCaptureMovieFileOutput and a AVCaptureVideoDataOutput to the same AVCaptureSession? Trying it and preliminary searches both suggest this isn't possible, but someone here might know a way.
b) Record to a file using AVCaptureMovieFileOutput and then use the file as in input to the AVCaptureSession instead of the camera? This would allow me to reuse all the code from before. I haven't been able to find a way to use a file as an input to an AVCaptureSession though.
If neither of these methods are possible, what is the best method to save and process a video on iOS (either simultaneously or sequentially)?