在运行 iOS4 的 iPhone 上做视频捕获 API即时编码视频?
我目前正在研究编写一个应用程序来为特定用例录制一小时的视频/音频的可能性。
由于视频将长达一个小时,我希望即时编码,而不是在录制完成后进行编码,以将磁盘使用量降至最低。
视频捕获 API 是否会将大型未压缩文件写入磁盘并随后进行编码,或者它们是否可以即时编码,从而将优化的文件写入磁盘?
重要的是,视频以低于 iPhone 宣传的 720/1080p 的分辨率录制,因为由于视频长度(需要上传),我需要减小文件大小。
您所拥有的任何信息都将不胜感激,甚至只是指向正确方向的指针。
I'm just researching at the moment the possibility of writing an app to record an hours worth of video/audio for a specific use case.
As the video will be an hour long I would want to encode on-the-fly and not after the recording has finished to keep disk usage to a minimum.
Do the video capture APIs write a large uncompressed file to disk that has to be encoded after or can they encode on-the-fly resulting in a optimised file written to disk?
It's important that the video is recorded at a lower resolution than the iPhone's advertised 720/1080p as I need to keep the file sizes down due to length of video (which will need to be uploaded).
Any information you have would be appreciated or even just a pointer in the right direction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,他们不会将未压缩的内容记录到磁盘上(除非这是您想要的)。您可以指定录制为 MOV/MP4 并以 H264 编码视频。此外,您还可以控制编码的平均比特率。如果需要,您还可以指定捕获大小、输出编码大小以及缩放选项。有关演示代码,请查看 WWDC 2010 示例代码中的 AVCamDemo。该演示代码现在可以在文档中找到。
No they do not record uncompressed to disk (unless this is what you want). You can specify to record to a MOV/MP4 and have the video encoded in H264. Additionally you can control the average bit rate of the encoding. You can also specify the capture size, and output encoding size along with scaling options if needed. For demo code check out AVCamDemo in the WWDC 2010 sample code. This demo code may now be available in the docs.