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

查看:41
本文介绍了使用 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.

为什么会这样?

有什么办法可以避免这种压缩操作?

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天全站免登陆