我正在寻找IOS中的视频编辑库。IOS中的视频编辑库
编辑任务: - >在视频帧的顶部添加文本或标记。
在我的应用程序中,用户应该能够从视频库中选择视频,并在电影播放器中播放视频。用户可以暂停视频,然后使用空闲手段添加一些文字或标记。我们需要合并此视频中添加的文字和标记。
我正在寻找IOS中的视频编辑库。IOS中的视频编辑库
编辑任务: - >在视频帧的顶部添加文本或标记。
在我的应用程序中,用户应该能够从视频库中选择视频,并在电影播放器中播放视频。用户可以暂停视频,然后使用空闲手段添加一些文字或标记。我们需要合并此视频中添加的文字和标记。
AVFoundation将做所有这些和更多。当然,该应用的用户界面取决于您。但所有的视频操作都很容易使用这个强大的内置库来实现。
您可以使用GPUImage您的任务。对于设置图像和文字使用此代码..
contentView.backgroundColor = [UIColor clearColor];
UIImageView *ivTemp = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 147, 59)];
// UIImage *currentFilteredVideoFrame = [selectedFilter imageFromCurrentFramebuffer];
ivTemp.image = [UIImage imageNamed:@"minimumtrackimage"];
ivTemp.userInteractionEnabled = YES;
[contentView addSubview:ivTemp];
UILabel *lblDemo = [[UILabel alloc] initWithFrame:CGRectMake(0, 100, 200, 30)];
lblDemo.text = @"is this text on video?";
lblDemo.font = [UIFont systemFontOfSize:30];
lblDemo.textColor = [UIColor redColor];
lblDemo.tag = 1;
lblDemo.hidden = YES;
lblDemo.backgroundColor = [UIColor redColor];
[contentView addSubview:lblDemo];
GPUImageUIElement *uiElementInput = [[GPUImageUIElement alloc] initWithView:contentView];
[uiElementInput addTarget:selectedFilter];
__unsafe_unretained GPUImageUIElement *weakUIElementInput = uiElementInput;
[weakUIElementInput update];
然后写影片。
谢谢Heiberg,你有这样的样品吗? – prakashsofts
http://www.viggiosoft.com/blog/blog/2011/10/15/video-composition-with-ios/ 此外,ADC网站上还有大量的示例代码。 http://developer.apple.com/library/ios/navigation/#section=Frameworks&topic=AVFoundation – Heiberg