简体   繁体   English

ios在另一个视频上叠加Alpha通道视频

[英]ios overlaying alpha channel video on another video

I have been trying to create a video template which uses alpha channel video overlayed on the mp4 videos and images. 我一直在尝试创建一个视频模板,该模板使用叠加在mp4视频和图像上的alpha通道视频。

This is how I need to create a video http://viewptch.ptchcdn.com/rendered/52b28a9f8d4f980f3a3f99c3_cb44bf2b/52b28a9f8d4f980f3a3f99c3_lrg_main_main.mov For overlaying alpha video on another videos, I have used AVAnimator, I was succeeded for playing a preview using AVFoundation, AVSynchronizedLayer and AVAnimator. 这就是我需要创建视频http://viewptch.ptchcdn.com/rendered/52b28a9f8d4f980f3a3f99c3_cb44bf2b/52b28a9f8d4f980f3a3f99c3_lrg_main_main.mov在另一个视频上叠加Alpha动画的原因,我使用AVFounder进行了动画播放和AVAnimator。

When rendering video from composition, frames of alpha channel videos renders very slowly. 从合成渲染视频时,alpha通道视频的帧渲染速度非常慢。

I need to create a video with alpha channel video on top of another video. 我需要在另一个视频的顶部创建一个带有Alpha通道视频的视频。

Can any one please suggest me what are the possible ways to render a video like http://viewptch.ptchcdn.com/rendered/52b28a9f8d4f980f3a3f99c3_cb44bf2b/52b28a9f8d4f980f3a3f99c3_lrg_main_main.mov ? 任何人都可以建议我如何呈现视频,例如http://viewptch.ptchcdn.com/rendered/52b28a9f8d4f980f3a3f99c3_cb44bf2b/52b28a9f8d4f980f3a3f99c3_lrg_main_main.mov

You mention that you have looked at AVAnimator, did you download the KittyBoom example project and try it out? 您提到您已经看过AVAnimator,是否下载了KittyBoom示例项目并进行了试用? The specifics of how it works are detailed in this post . 这篇文章详细介绍了它的工作原理。 One thing to note is that when you build and run on the device, you need to turn Debug mode off otherwise it will not execute quickly because a number of extra checks are done in debug mode. 要注意的一件事是,在设备上构建并运行时,需要关闭“调试”模式,否则它将无法快速执行,因为在调试模式下进行了许多额外的检查。 Also, you have to make sure to test on the actual device, the simulator is not a good measure of performance on a real device. 另外,您必须确保在实际设备上进行测试,模拟器并不是衡量真实设备性能的好方法。 Performance is a key problem with video that contains an alpha channel as iOS does not support video with an alpha channel by default. 对于包含Alpha通道的视频,性能是一个关键问题,因为iOS默认情况下不支持带有Alpha通道的视频。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM