Iphone 使用UIVideoEditorController编辑视频
我想修剪视频,所以我使用UIVideoEditorController,但当我选中CanEdit文件时,所有文件mp4、mov、m4v都返回false。所以任何人都可以告诉我问题出在哪里Iphone 使用UIVideoEditorController编辑视频,iphone,cocoa-touch,uivideoeditorcontroller,Iphone,Cocoa Touch,Uivideoeditorcontroller,我想修剪视频,所以我使用UIVideoEditorController,但当我选中CanEdit文件时,所有文件mp4、mov、m4v都返回false。所以任何人都可以告诉我问题出在哪里 你能给我任何使用UIVIdeoEditorcontroller教程的链接吗 UIVideoEditorController在模拟器上不工作,因此它总是返回false,在设备上可以正常工作。您可以通过UIVideoEditorController通过路径找到视频编辑 UIVideoEditorController
UIVideoEditorController在模拟器上不工作,因此它总是返回false,在设备上可以正常工作。您可以通过
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 );
}
花了一整晚才发现这一点。