I am using a AVCaptureMovieFileOutput to record clips from a USB camera
using captureOutputShouldProvideSampleAccurateRecordingStart : YES
and control the starting and stopping of the AVCaptureMovieFileOutput inside the call
captureOutput:didOutputSampleBuffer:fromConnection:
I frequently get false negatives for the AVErrorRecordingSuccessfullyFinishedKey
in my AVCaptureFileOutputRecordingDelegate
captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:
is reporting the error:
Error Domain=AVFoundationErrorDomain Code=-11823 "Cannot Save" UserInfo={NSLocalizedRecoverySuggestion=The requested file name is already in use. Try a different file name or location., NSLocalizedDescription=Cannot Save, AVErrorRecordingSuccessfullyFinishedKey=false}
However, the file has been written successfully and is un-damaged.
Why is AVCaptureFileOutput returning an error?
tested on 10.12.6 and 10.13.3
Nothing I can find will alleviate this problem. The filePath I am recording to is unique, and the path is writable. the file *does* get written!
The only recourse I can see is to verify the results myself and ignore error -11823 if the file actually exists.
any help? is there any way to get more information about why the AVCaptureMovieFileOutput thinks that it was unsuccessful?
|K<