简体   繁体   English

如何以编程方式在iOS中实现带音频的屏幕录制?

[英]How to implement screen recording with audio in iOS programmatically?

I have a requirement where I have screen recording with audio as well. 我也有需要同时录制带有音频的屏幕的要求。 I have done some Google and got to know about how can we implement screen recording but I am wondering how to save audio while screen recording. 我已经完成了一些Google工作,并且知道如何实现屏幕录像,但是我想知道如何在屏幕录像时保存音频。

Is there any possibility that we can merge the video and audio and then save the final data on disk? 我们是否可以合并视频和音频,然后将最终数据保存在磁盘上?

But I am not sure that will it be feasible because there will be difference in syncing with audio and video frames. 但是我不确定这是否可行,因为与音频和视频帧同步会有差异。

For screen recording I got a link of ScreenCaptureView which actually lets you save the screen recording. 对于屏幕录像,我得到了ScreenCaptureView的链接,该链接实际上使您可以保存屏幕录像。

On iOS9 there is ReplayKit it's a framework that can be used to make screen recording on video games. 在iOS9上有ReplayKit,它是一个可用于在视频游戏上进行屏幕录制的框架。 It seems that you can use also for common screen capture. 看来您也可以将其用于常见的屏幕捕获。
For lower platforms it's a kind of big deal, video screen capturing exists but is a private framework ( I guess IOSurface). 对于较低的平台,这很重要,虽然存在视频屏幕捕获,但是它是一个私有框架(我想是IOSurface)。 There are some work arounds as in this project , basically it starts to grab sigle screenshot and append them into a movie file, without audio 项目中存在一些变通办法,基本上它开始获取sigle屏幕截图并将其添加到没有音频的电影文件中

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

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