views:

158

answers:

2

Why is it that if I pick a video from the library in my application I'm given this horribly pixelated/compressed video but if I take the video with the camera in my application I'm given a nice video file, this is on the iphone 4.

Sample of video taken w/in the app: http://photos.smugmug.com/photos/912709066_Kcc8p-1280.mp4

Sample of video picked from the library: http://photos.smugmug.com/photos/912709325_hw7Bv-1280.mp4

Both are 720p. Setting videoQuality to 'UIImagePickerControllerQualityTypeHigh' doesn't help, which makes sense really since that appears to be just for setting the recording resolution when using the camera.

Sam

A: 

i had the same assumption as Shizam till i saw an FTP app upload a video just fine on an iPhone 4. its not the quality of the imported video thats the problem. if you download the app's sandbox and look at the imported video you will see its fine.

go to Window/Organizer and select your device. there will be a list of Applications in the bottom right. select the app in question and click the expansion triangle. you will see "Application Data" click on the little black downward arrow and tell it when to save the data. then go look at the video in the tmp folder. you will see its fine.

the problem comes when you try to send it out via HTTP. for what ever reason Apple decided to add an extra crappy video compression to videos sent over HTTP. if you FTP the file to the server the video quality is actually very good similar to what you get when you email the video to yourself. Apple gives you a working example of how to FTP to and from a server.

iHorse
But the 'compressing video' step happens right after you pick the vido from the library before the application even has a chance to touch the data, at that point it doesn't know what you plan on doing w/the video. After it hands the file off to you the data is set, how you send it to wherever isn't changed or you'd get HTTP errors, the file size for example.
Shizam
A: 

See my post here. You can improve the quality by changing some settings. http://stackoverflow.com/questions/3159061/avoid-video-compression-when-selecting-movie-with-uiimagepickercontroller/3337238#3337238

CDeutsch
Thanks but I've already set it to 'High' and the Compressing Video dialog still appears, I wish there were a way to get to the uncompressed version.
Shizam