我正在尋找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