iOS视频 - ZhiJianShuSheng/Read-And-Learn GitHub Wiki

简介

三种视频捕获方法

  • UIImagePickerController
  • AVCaptureSession + AVMovieFileOutput
  • AVCaptureSession + AVAssetWriter

捕获视频

UIImagePickerController

//判断是否支持相机录制
if ([UIImagePickerController  
       isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
    NSArray *availableMediaTypes = [UIImagePickerController
      availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];
    if ([availableMediaTypes containsObject:(NSString *)kUTTypeMovie]) {
        // 支持视频录制
    }
}