views:

37

answers:

1

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.

A: 

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

CDeutsch
Thanks for your answer! When a video is selected from cameraroll (thru UIImagePickerController) a progressbar is shown while the video is compressed. When a video is recorded by UIImagePickerController, the progressbar is never shown. I'm looking for a way to always compress the video.
Marcus