UIImagePickerController with camera source: video cropping does not work

I use UIImagePickerControllerto record videos with sourceTypeinstalled on UIImagePickerControllerSourceTypeCamera.

I set it allowsEditingto true so that the video can be edited before the collector returns. But after I edit the video using the cropping interface and click "Select", I will only return the original entry in the delegate, not the cropped version. What am I doing wrong? I am using iPhone OS 3.1.3. I remember that this was used to work in an earlier version, but it does not seem to work in the latest OS. Any help is appreciated?

By the way, I confirmed that if the source is video UIImagePickerControllerSourceTypeSavedPhotosAlbum, then cropping works in version 3.1.3. Thus, cropping with the source because the camera does not work. It is interesting to note that the β€œSelect” button appears as the source of the video / photo album, and soon after clicking on it, the controller displays a message that β€œThe video has been trimmed ...”. I do not receive this message when using the camera source.

Here is the code snippet that I use to record video using the camera source.

- (void) recordVideo {
   UIImagePickerController *picker = [[UIImagePickerController alloc] init];
   picker.delegate = self;
   picker.allowsEditing = YES;
   picker.sourceType = UIImagePickerControllerSourceTypeCamera;
   picker.mediaTypes =  [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
   picker.videoQuality = UIImagePickerControllerQualityTypeHigh;

   [self presentModalViewController:picker animated:YES];
   [picker release];   
}

The implementation of my delegate is as follows:

- (void)imagePickerController:(UIImagePickerController *)picker 
didFinishPickingMediaWithInfo: (NSDictionary *)info {

  [picker dismissModalViewControllerAnimated:YES];
  self.videoPath = [[info objectForKey:UIImagePickerControllerMediaURL] path];
  ...
}

Many thanks,

Chris.

+5
source share
1 answer

I just stumbled upon this myself ... and found this post when looking for a solution.

, , UIVideoEditorController...

- , UIImagePickerController , SDK - ?

0

All Articles