简体   繁体   English

录制视频,包括在iOS中的记录叠加

[英]Recording video including record overlay in iOS

I'm using AVFoundation to record video. 我正在使用AVFoundation录制视频。 I added some overlay views on it such as 2 labels. 我在上面添加了一些叠加视图,例如2个标签。

My idea is recording video also recording the overlay views into result video. 我的想法是录制视频,还将覆盖视图录制到结果视频中。 I mean the result video will also have the overlay views go through with video 我的意思是结果视频还将在视频中显示叠加视图

How can I do it? 我该怎么做?

The view hierarchy does not get reflected in the recorded media. 视图层次结构不会反映在记录的媒体中。 In order to achieve this you could attempt to capture the frames of the view hierarchy and composite your own movie, which is likely will be of poor quality due to dropped frames. 为了实现这一点,您可以尝试捕获视图层次结构的帧并合成您自己的电影,由于掉帧,这可能质量很差。 Or you can attempt to composite the video after it's recorded. 或者,您也可以在录制后尝试合成视频。

Both of these methods will require deeper understanding of AVFoundation. 这两种方法都需要对AVFoundation有更深入的了解。

This tutorial covers modifying a video file with overlays. 本教程介绍如何使用叠加层修改视频文件。

http://www.raywenderlich.com/30200/avfoundation-tutorial-adding-overlays-and-animations-to-videos http://www.raywenderlich.com/30200/avfoundation-tutorial-adding-overlays-and-animations-to-videos

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

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