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.
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
Related
I am working on media recording on IOS. I was able to record with both audio and video using UIImagePickerController. For my specification I want to record only audio. Is it possible with UIImagePickerController? or Do I need to think about other methods?
thanks.
UIImagePickerController cannot be used to record audio. Instead you should take a look at the SpeakHere sample code from Apple.
Also check Audio Queue - Recording to a compressed audio format on how to record as compressed audio format and conserve disk space.
I know that I can access raw video images from the iPhone's camera with AVCaptureVideoDataOutput. I also know that I can record video to a file with AVCaptureMovieFileOutput. But how can I first access the raw video images, manipulate them and then write the manipulated ones into the video file? I've already seen apps in the app store, which do this, so it must be possible.
Ok, I now know, that it's done with AVAssetWriter.
I'm using UIImagePickerController to allow my user to select a video .
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?
Try to set the videoQuality property of UIImagePickerController
The video quality setting specified by this property is used during video recording. It is also used whenever picking a recorded movie. Specifically, if the video quality setting is lower than the video quality of an existing movie, displaying that movie in the picker results in transcoding the movie to the lower quality. UIImagePickerController Reference
Available quality values are:
UIImagePickerControllerQualityTypeHigh
UIImagePickerControllerQualityTypeMedium
UIImagePickerControllerQualityTypeLow
UIImagePickerControllerQualityType640x480
UIImagePickerControllerQualityTypeIFrame1280x720
UIImagePickerControllerQualityTypeIFrame960x540
Please see UIImagePickerController Reference for detail.
Am developing a app which will upload video to the server which is picked form local iphone photo library.
here i want to restrict the user not to upload more than 3min of video..Question is how to get the duration of the video which is picked from local photo library using uiimagepickercontroller.
will it contain any property for that..?
Thanks
I am not sure but did u try imagePickerController.videoMaximumDuration = urDuration;
You can get the size of your videofile.If you want to put check according to the size that is possible or you can get the duration by using mpmovieplayer class but for that you have to get the full video file .I dont think so you want to do this so its gud if you can put a check according to the size.
We are using the MPMoviePlayerController to control video playback, I just wanted to know (as I couldnt find any mention online) whether it took advantage of #2x files when displayed on iPod4/iPhone4, like the UIImage does
No, #2X it's only for UIimages.
It doesn't do it automatically like UIImage will. But you could always implement a system your self. Using a subclass, category or just in your current code before set what file is played by the movie player. So the code would be something like. If it has a retina display append #2x to the file path.