我需要使用 iphone 捕获 5 分钟的视频,然后修剪捕获的视频并将其保存为二进制数据格式。如果有任何机构曾经这样做过,请帮助我这样做。
像那张图片http://www.askdavetaylor.com/3-blog-pics/apple-iphone-video-editing-4.png
- (BOOL) startCameraControllerFromViewController: (UIViewController*) controller
usingDelegate: (id <UIImagePickerControllerDelegate, UINavigationControllerDelegate>) delegate {
NSLog(@"Camera Working");
if (([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypeCamera] == NO)
|| (delegate == nil)
|| (controller == nil))
return NO;
cameraUI = [[UIImagePickerController alloc] init];
cameraUI.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;
// Displays a control that allows the user to choose picture or
// movie capture, if both are available: video and image capturing
//cameraUI.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];
// Hides the controls for moving & scaling pictures, or for
// trimming movies. To instead show the controls, use YES.
cameraUI.videoMaximumDuration = 300; // 5x60 sec
cameraUI.allowsEditing = YES;
cameraUI.delegate = delegate;
[controller presentModalViewController: cameraUI animated: YES];
return YES;
}