Reduce video bitrate swift - ios

Im using uiimagepicker for the user to pick a video from photo library.
After setting video quality to low in image picker settings, a 5 minute or even a 2 min recorded video is still too big for upload. Is there anyway to compress the video size further. My guess is that i need to reduce the bitrate.
I am of course using assets to manage the file

Related

Difference in quality when video is uploaded directly from camera and when it is selected from gallery

Problem
I am currently developing an iPhone app, where I need to upload a video with a multipart post request.
I am using AfNetworking and UIImagePickerController.
I set the quality of the UIImagePickerController to high.
When I try to upload a video that has just been recorded in the app, the quality is significantly lower, than when I choose a previously recorded video from the gallery.
Question
Does anybody have experience like this one ?

Itunesconnect App Preview Video

I have tried many times to upload App Preview video.
But each time I failed.
Please recommend me best tool to convert my video to availble and how to.
Thanks
You must use Safari to upload your video.
I use QuickTime Player to record the screen of my app.
In QuickTime Player you can record in portrait and landscape, but you cannot rotate your screen during the record.
Open QuickTime Player > File > New Movie Recording (then select your device for camera and microfone).
Sample of record screen:
Apple App Preview Video Guidelines
As you can imagine, Apple wants to generate a similar Look & Feel for all videos. Therefore they released some guidelines, which you should mind when creating a preview video.
15-30 seconds length
Maximum file size of 500 mb
.mov, .m4v, .mp4 format
Only use screen capture
No (very less) copy – due to the reason that you can’t internationalize your video and only upload it once in one language
Don’t overlay animated hands, you can use touch hotspots if really necessary
For games: Show more gameplay scenes than cutscenes
You can use voice over – but mind the internationalization part – Apple recommends to only use a very limited and professional voice over if you have to
Your preview video should only contain content for which you have the full rights (don’t show you app streaming content from an iTunes Playlist or a YouTube video)
App Preview Video Format
Now the most important part – which format or size should your video have. As you have already read in my screenshot size article it can be quite frustrating creating a lot screenshots in different sizes.
Apple recommends you to use the following app preview resolutions (this is already a summary, that you have to create the least amount of different video versions):
iPhone 5+ iPhone 6 Plus: 1920 x 1080
iPhone 6: 1334 x 750
iPad: 1200 x 900

Compress iOS video using Phonegap

Is there any tips, suggestions, or available plugins for Phonegap that might be available to Capture a video using Phonegap's capture feature, then programmatically compress or reduce the quality of the video such that it can be uploaded to a server?
The video file sizes can become rather large with videos longer than 5 minutes. I would strongly prefer not to have save the video to the iPhone.
Currently it is not possible. You might have a look at this plugin, but up to Cordova 3.5 it is not possible to compress a video, and you can set its duration only on iOS

Phonegap video capture reduce output file size

When capturing video with phonegap on iOS the file size for a even a 1min capture is ridiculously large. Well, far to large to upload over a 3G connection reliably. I read that there is a native AVCaptureSession object that will allow the bitrate to be altered in order to reduce the file size. Has anyone implemented this in the phonegap video capture or can give me any pointers?
Found the deatils I needed here:
How can I reduce the file size of a video created with UIImagePickerController?
The important line for Phonegap users is in CDVCapture.m:
pickerController.videoQuality = UIImagePickerControllerQualityTypeHigh;
There are several presets that can be used e.g.
UIImagePickerControllerQualityTypeLow
phonegap provide quality argument when to navigate camera set :
quality:50
this is recommended for ios. if u need to reduce mean reduce quality.It have integer value (0-100) use this .....

Compress video like iOS's camera roll

Background:
I am recording a video and then uploading it.
Problem:
I compressed the video using this solution (medium quality) but it doesn't:
keep the original dimensions of the video
have as good a compression ratio as camera roll's.
I need similar compression (size and dimensions) like camera roll.
If it's not possible, do we have a workaround, say, automatically select the file from the iOS video picker (for upload)?
You can use AVAssetWriter and set custom compression settings. You can even compress the video while you're recording so you don't have to re-process the video before upload. Search around, there's tons of examples.

Resources