使用UIImagePickerController选择电影时避免视频压缩? [英] Avoid Video Compression when Selecting Movie with UIImagePickerController?

查看:1598
本文介绍了使用UIImagePickerController选择电影时避免视频压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用UIImagePickerController来允许我的用户从资源库中选择一个视频。

I'm using UIImagePickerController to allow my user to select a video from the asset library.

当用户在第二个屏幕上选择选择按钮时,视图显示进度条和压缩视频...消息。

When the user selects the "Choose" button on the second screen, the view displays a progress bar and a "Compressing Video..." message.

为什么会发生这种情况?

Why is this happening?

有没有办法我可以避免这种压缩操作?

Is there some way I can avoid this compression operation?

推荐答案

答案:目前没有办法控制UIImagePickerController如何压缩所选视频。

Answer: There is currently no way to control how UIImagePickerController compresses the picked video.

我只是做了一些快速测试。使用我创建的测试应用程序,我选择了相同的视频两次 - 一次与 videoQuality 属性设置为 UIImagePickerControllerQualityTypeHigh 并且一次设置为 UIImagePickerControllerQualityTypeLow 。复制的结果文件大小完全相同,15.1MB,帧大小为360x480。原来是72.5MB,帧大小为480x640。显然这个属性不会影响所使用的压缩。

I just did some quick tests. Using a test app I created, I picked the same video two times -- once with the videoQuality property set to UIImagePickerControllerQualityTypeHigh and once with it set to UIImagePickerControllerQualityTypeLow. The resulting files that were copied over are exactly the same size, 15.1MB with a frame size of 360x480. The original was 72.5MB with a frame size of 480x640. Apparently this property doesn't affect the compression used at all.

这篇关于使用UIImagePickerController选择电影时避免视频压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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