Reputation: 654
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.
Upvotes: 1
Views: 1507
Reputation: 52347
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.
Upvotes: 2