Float64 TotalSeconds = 3; //Total seconds
int32_t preferredTimeScale = 30; //Frames per second
CMTime maxDuration = CMTimeMakeWithSeconds(TotalSeconds, preferredTimeScale); //<<SET MAX DURATION
movieFileOutput.maxRecordedDuration = maxDuration;
movieFileOutput.minFreeDiskSpaceLimit = 1024 * 1024;
//add output file
if ([videoCamera.captureSession canAddOutput:movieFileOutput]) {
[videoCamera.captureSession addOutput:movieFileOutput];
}
When i try to add my outputSource.Camera screen is white.
//output file movieFileOutput = [AVCaptureMovieFileOutput new];
Float64 TotalSeconds = 3; //Total seconds int32_t preferredTimeScale = 30; //Frames per second CMTime maxDuration = CMTimeMakeWithSeconds(TotalSeconds, preferredTimeScale); //<<SET MAX DURATION movieFileOutput.maxRecordedDuration = maxDuration; movieFileOutput.minFreeDiskSpaceLimit = 1024 * 1024;
//add output file if ([videoCamera.captureSession canAddOutput:movieFileOutput]) { [videoCamera.captureSession addOutput:movieFileOutput]; } When i try to add my outputSource.Camera screen is white.