When you change the rectangle during recording, the recording format is changed and it cannot continue recording to the same output. However, you can continue to write to the new file.
- (void)captureOutput:(AVCaptureFileOutput *)captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connections error:(NSError *)error {
source share