video editing library in IOS

非 Y 不嫁゛ 提交于 2019-12-22 06:36:04

问题


I am looking for a video editing library in IOS.

Editing tasks: -> Adding text or marks on top of the video frame.

In my application user should be able to select a video from video library and also play the video in a movie player. And user able to pause the video then add some text or marks using free hand. we need to merge added text and marks in this video.


回答1:


AVFoundation will do all that and more. The user interface for the app is, of course, up to you. But all the video manipulation is quite simple to implement using this powerful, built-in library.

Read about AVFoundation here.




回答2:


you can use GPUImage for your task. for set image and text use this code..

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];

and then write the movie.



来源:https://stackoverflow.com/questions/10901112/video-editing-library-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!