6

我正在寻找IOS中的视频编辑库。

编辑任务: -> 在视频帧顶部添加文本或标记。

在我的应用程序中,用户应该能够从视频库中选择一个视频,并在电影播放器​​中播放该视频。用户可以暂停视频,然后使用徒手添加一些文本或标记。我们需要合并此视频中添加的文本和标记。

4

2 回答 2

5

AVFoundation 将做所有这些甚至更多。该应用程序的用户界面当然取决于您。但是使用这个强大的内置库,所有的视频操作都非常简单。

在此处阅读有关 AVFoundation 的信息。

于 2012-06-05T16:52:52.090 回答
1

您可以将 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];

然后写电影。

于 2017-08-29T09:49:34.900 回答