开发者

Edit video using UIVideoEditorController

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜