views:

96

answers:

0

Hello, I have implemented video capturing by:

IImagePickerController *imagePicker = [[UIImagePickerController alloc] init];    
imagePicker.sourceType =  UIImagePickerControllerSourceTypeCamera;  
NSArray *sourceTypes = [UIImagePickerController availableMediaTypesForSourceType:imagePicker.sourceType];
if ([sourceTypes containsObject:(NSString *)kUTTypeMovie ]){
    imagePicker.mediaTypes =  sourceTypes;
}           
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];

I can record video and send it to YouTube using YouTube API, but if the video length is more then about 5 minutes, and I click USE - the application is closed. But no problem appear if I select even 10 minutes video from library (i see "Compressing video" progress), video is saved to my view and uploaded to YouTube.

Can anybody tell me what the problem could be?