开发者

Edit video using UIVideoEditorController

开发者 https://www.devze.com 2023-03-19 03:56 出处:网络
I want to trim video so i am using UIVideoEditorController but when i check can edit file 开发者_JAVA百科then it return false for all the files, mp4,mov,m4v. So any one will please guide me what is th

I want to trim video so i am using UIVideoEditorController but when i check can edit file 开发者_JAVA百科then it return false for all the files, mp4,mov,m4v. So any one will please guide me what is the problem.

  1. Will you please give me the link of any tutorial of using UIVIdeoEditorcontroller


UIVideoEditorController does not work on simulator so it always returns false, it will work fine on device.


You can find editing of video by path through UIVideoEditorController.

UIVideoEditorController* videoEditor = [[UIVideoEditorController alloc] init];
videoEditor.delegate=self;

NSString* videoPath = [[NSBundle mainBundle] pathForResource:@"video" ofType:@"MOV"];
if ( [UIVideoEditorController canEditVideoAtPath:videoPath] )
{
    videoEditor.videoPath = videoPath;
    videoEditor.videoMaximumDuration = 10.0;

    //[self.customAvPlayerView addSubview:videoEditor.view];

    [self presentViewController:videoEditor animated:YES completion:nil];
} 
else
{
    NSLog( @"can't edit video at %@", videoPath );
}

http://www.raywenderlich.com/forums/viewtopic.php?t=11571&p=60182

0

精彩评论

暂无评论...
验证码 换一张
取 消