如何录制video并以当前重放速度放慢速度?

我可以从临时url获取video并将video保存在照片库中。

如何制作带有缓变慢动作的video? 我知道这可以通过currentplayrate来完成。 我不知道如何应用它。

如何调整速度,然后将其保存到照片库?

注:我使用MPMoviePlayerViewController来播放/修剪和保存video。

参考编号:

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { // 1 - Get media type NSString *mediaType = [info objectForKey: UIImagePickerControllerMediaType]; // 2 - Dismiss image picker [self dismissModalViewControllerAnimated:NO]; // Handle a movie capture if (CFStringCompare ((__bridge_retained CFStringRef)mediaType, kUTTypeMovie, 0) == kCFCompareEqualTo) { // 3 - Play the video MPMoviePlayerViewController *theMovie = [[MPMoviePlayerViewController alloc] initWithContentURL:[info objectForKey:UIImagePickerControllerMediaURL]]; theMovie.moviePlayer.currentPlaybackRate = 4.0f; [self presentMoviePlayerViewControllerAnimated:theMovie]; // 4 - Register for the playback finished notification [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie]; } }