简体   繁体   English

启用UIImagePickerController视频压缩

[英]Enable UIImagePickerController video compression

Is there a way to enable video compression on video files recorded with UIImagePickerController? 有没有一种方法可以对使用UIImagePickerController录制的视频文件启用视频压缩?

When videos are selected from cameraroll with UIImagePickerController they are automatically compressed. 当使用UIImagePickerController从cameraroll中选择视频时,它们将被自动压缩。

Are there any other way of compress a video? 还有其他压缩视频的方法吗? I've got access to the file with a NSURL. 我可以使用NSURL访问该文件。

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. 您可以设置UIImagePickerController的videoQuality属性以不同的比特率获取副本。

For example "High" is: UIImagePickerControllerQualityTypeHigh = 0 例如,“高”是:UIImagePickerControllerQualityTypeHigh = 0

http://developer.apple.com/iphone/library/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/doc/c_ref/UIImagePickerControllerQualityType http://developer.apple.com/iphone/library/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/doc/c_ref/UIImagePickerControllerQualityType

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

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