AVFoundation以MP4格式录制视频 [英] AVFoundation record video in MP4 format

查看:89
本文介绍了AVFoundation以MP4格式录制视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AVFoundation在IOS 5上录制视频.我希望内容在MP4容器中.我一直在搜索,找不到一条指定用于记录视频的格式的消息.我宁愿在第一张照片上记录到MP4文件中,而不是将其记录到mov文件中,然后在单独的mp4中将其重新编码经过.有人知道该怎么做吗?

I am using AVFoundation to record video on IOS 5. I would like the content to be in an MP4 container. I have been searching around and cannot find a message that specifies the format to record the video in. I would rather record to the MP4 file on the first shot instead of recording it to a mov file and then reencode it in a mp4 on a separate pass. Does anyone know how to do this?

我在上面说要录制到mov时就在上面猜测.它记录到的默认文件格式是什么?

I guessed above when I said it records to a mov. What is the default file format it records to?

我通常对AVFoundation和IOS还是陌生的,因此,如果其中的一些显而易见,并且很难找到它,请原谅.

I am new with AVFoundation and IOS in general so please excuse me if some of this is obvious and I am having difficulty finding it.

谢谢您的帮助

推荐答案

我目前不知道如何在基础类中进行此操作,但是您当然可以使用

I am currently unaware of how to do it in foundation classes, but you can certainly do it using AVAssetWriter look for option outputFileType and shouldOptimizeForNetworkUse.

这篇关于AVFoundation以MP4格式录制视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆