iOS AVfoundation overlay video with video

人走茶凉 提交于 2019-12-10 12:24:47

问题


I have main video and I want to overlay it with another animated video with alpha channel like "Action Movie FX" application. How can I do it with AVfoundation, or can you suggest third-party framework?

Thanks


回答1:


GPUImage by Brad Larson is a great third-party framework for this kind of thing. It has many different blending algorithms you can choose from. This thread has code similar to what you want to do.




回答2:


I would suggest that you take a look at my 3rd party framework to do this sort of task under iOS. You can find example Xcode projects named AVRender and Fireworks that show the exact kind of composition you describe. The compositions could be done either offline or online and can be implemented fully lossless or with a lossy encoding to h.264 as the final output. That main thing is that you will want to use a technology with a full alpha channel as h.264 does not support an alpha channel by default.



来源:https://stackoverflow.com/questions/20268812/ios-avfoundation-overlay-video-with-video

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