Thursday, 31 May 2018

Reducing the size of a video exported with AVAssetExportSession - iOS Swift

I'm currently exporting a video in the following way:

   let exporter = AVAssetExportSession.init(asset: mixComposition, presetName: AVAssetExportPreset1280x720)
   exporter?.outputURL = outputPath
   exporter?.outputFileType = AVFileType.mp4
   exporter?.shouldOptimizeForNetworkUse = true
   exporter?.videoComposition = mainCompositionInst

A 15s video consumes about 20MB in data. Comparing this to Snapchat's 2MB videos, this number seems totally unacceptable.

I already reduced the quality of the export- and capture session (1280x720).

The video is filmed on a custom camera. UIImagePickerController is not used.

Is there any way I can reduce the size of my videos? Thanks a lot!



from Reducing the size of a video exported with AVAssetExportSession - iOS Swift

1 comment:

  1. https://www.wizweb.in

    Wizweb Technology is a leading software development company custom website design, software development, SMS Provider, Bulk sms, transactional sms, promotional sms, mobile app development, Hosting Solution, seo(search engine optimization) and Digital marketing etc.

    ReplyDelete