1

I am using AVRecorder to save recording and AVAssetExportsession to append multiple files. But output of the Exportsession is too large.

So I would like to convert it to a lower size before uploading it to the server. How can I convert this to a lower sampling rate.

Gregory Higley
  • 15,923
  • 9
  • 67
  • 96
Abin George
  • 644
  • 6
  • 21

1 Answers1

2

Use AVAssetWriter (Apple docs: https://developer.apple.com/library/mac/documentation/AVFoundation/Reference/AVAssetWriter_Class/index.html), which will allow you to choose bitrate/channel/etc options for the file.

This related question (AVAssetWriter How to write down-sampled/compressed m4a/mp3 files) has a full code sample using AVAssetWriter if you need that -- be sure, of course, to take note of the answer to that question, in regards to locations for the exported file.

Community
  • 1
  • 1
jnpdx
  • 45,847
  • 6
  • 64
  • 94