简体   繁体   English

iphone 4 - 如何在视频顶部录制视频叠加?

[英]iphone 4 - How do I record the video overlay on top of the video also?

Does anyone know how to do this? 有谁知道如何做到这一点?

Is anyone able to provide an example? 有人能提供一个例子吗? I believe this is out of NDA now as was available in version 4.0 ? 我认为这是现在的版本4.0中的NDA吗?

Take a look to AVFoundation framework , specially to avcapture avsession avinputdevice, etc. You can find some listings in the iPhone dev center forums: search "avcapture" AVFoundation is the framework you want to use to record, modify raw frames, show them, an offcourse add some overlay 看看AVFoundation框架,特别是avseture avsession avinputdevice等。您可以在iPhone开发中心论坛中找到一些列表:搜索“avcapture”AVFoundation是您要用来记录,修改原始帧,显示它们的框架,幕后添加一些叠加

If you want to do only overlay then, UIImagePickerController should b enough. 如果你只想做叠加,那么UIImagePickerController应该足够了。

If i understand, what you are trying to do corectly, you have set up video capture someting like suggested by Apple in this Q&A: http://developer.apple.com/iphone/library/qa/qa2010/qa1702.html 如果我明白,你正在尝试做什么,你已经设置了像苹果在这个问答环节中建议的视频捕捉: http//developer.apple.com/iphone/library/qa/qa2010/qa1702.html

From there it shouldn't be much of a Problem to use the method described in this answer: blend two uiimages based on alpha/transparency of top image to blend the preview with your overlay, provided you draw it in a UIImage first. 从那里开始,使用本答案中描述的方法应该没有太大的问题:如果您首先在UIImage中绘制它, 请将基于顶部图像的alpha /透明度的两个uiimages混合以将预览与您的叠加层混合。 Feed the resulting images to a buffer and save it accordingly. 将生成的图像输入缓冲区并相应地保存。

Though, this method most certainly wouldn't give you a lot of frames per second. 虽然,这种方法肯定不会给你每秒很多帧。

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

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