启用 UIImagePickerController 视频压缩
有没有办法对使用 UIImagePickerController 录制的视频文件启用视频压缩?
当使用 UIImagePickerController 从相机胶卷中选择视频时,它们会自动压缩。
还有其他方法可以压缩视频吗?我可以通过 NSURL 访问该文件。
Is there a way to enable video compression on video files recorded with UIImagePickerController?
When videos are selected from cameraroll with UIImagePickerController they are automatically compressed.
Are there any other way of compress a video? I've got access to the file with a NSURL.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道如何在录制时更改压缩。
您可以设置 UIImagePickerController 的 videoQuality 属性以获取不同比特率的副本。
例如“高”为: UIImagePickerControllerQualityTypeHigh = 0
http://developer.apple.com/iphone/library/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/doc/c_ref/UIImagePickerControllerQualityType
I'm not aware of a way to change the compression as it's being recorded.
You can set the videoQuality property of the UIImagePickerController to get a copy at a different bitrate.
For example "High" is: UIImagePickerControllerQualityTypeHigh = 0
http://developer.apple.com/iphone/library/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/doc/c_ref/UIImagePickerControllerQualityType