AVCaptureSession录制的视频,保存在图册中,视频封面有时是黑色的。
self.captureSession = [[[AVCaptureSession alloc] init] autorelease];
[self.captureSession startRunning];
[self.captureOutput startRecordingToOutputFileURL:fileUrl recordingDelegate:self];
startRunning启动摄像。在启动摄像头的过程中,有可能摄像头正在捕获周围的光线,此过程已经在写入数据了,所以该过程录制的视频就是黑色,或者暗色的。
解决办法:
startRunning后延时1-2秒,等摄像头启动完毕,调整好与周围的光线。
网友评论